Search found 42 matches

by reD_Fox
Mon Jun 04, 2007 6:51 pm
Forum: Python
Topic: Some Questions about Blender API
Replies: 1
Views: 2573

Hello, I'm not able to answer your questions to the extent that they deserve, but perhaps I can provide a little help anyway. 1) I haven't looked into it, but I'm assuming you can't. I'm pretty sure lamps have the same issue. Basically, you need a mesh in python before you can access materials. 2) e...
by reD_Fox
Mon Jun 04, 2007 6:41 pm
Forum: Python
Topic: Need help to write an export plugin that does the following:
Replies: 1
Views: 2083

Hello, Yes it is possible, but not directly. You need to loop through all the faces, store adjacency data, and then loop through them again using this data to accomplish what you described in your post. If you need further direction I can provide some more helps, but I would also recommend you check...
by reD_Fox
Thu May 17, 2007 2:18 pm
Forum: Python
Topic: Problem with updating .py files in Blender
Replies: 2
Views: 2301

Hello,

This might be of some use to you:
http://docs.python.org/lib/built-in-funcs.html#l2h-61

Levi
by reD_Fox
Tue May 15, 2007 6:48 pm
Forum: Python
Topic: Lamp Texture
Replies: 1
Views: 1944

Sorry, I'm told you can't.
However, you could try posting a feature request to the bf-python mailing list:
http://lists.blender.org/mailman/listinfo/bf-python
Just make sure your request is intelligent, cordial, and clearly explains how and why you would like access to that data.

Levi
by reD_Fox
Tue May 15, 2007 6:36 pm
Forum: Python
Topic: shareFrom fails
Replies: 2
Views: 4055

Yes, I am a bit puzzled as well. However, it seems you'll probably need to find a work-around. It seems that an object needs to be assigned mesh data before the shareFrom() function recognizes it as having a "Mesh" type. For instance, the following script fails: import Blender ob1 = Blender.Object.N...
by reD_Fox
Sat May 12, 2007 6:10 pm
Forum: Python
Topic: 3DS Exporter Prefixes Object Names
Replies: 3
Views: 4015

Do you know why it was doing it that way to begin with?
Yeah, it was to prevent duplicate names. The current CVS (and the upcoming Blender 2.44) will have this issue resolved.

Glad to be of assitance!

Levi
by reD_Fox
Sat May 12, 2007 5:34 pm
Forum: Python
Topic: 3DS Exporter Prefixes Object Names
Replies: 3
Views: 4015

Hello, In order to correct this "problem," you need to locate and open the "3ds_export.py" script file in a text editor (I'm assuming you are still using Blender 2.43). Line 973 should be the following: object_chunk.add_variable("name", _3ds_string(str(i) + ob.name)) Change this to object_chunk.add_...
by reD_Fox
Thu May 10, 2007 3:54 pm
Forum: Python
Topic: Create layer keys with python
Replies: 3
Views: 2548

I'm sorry, I misunderstood your question. You can't animate objects changing layers using keys , via python or anything else. Once an object is said to be on a layer, it stays there until the user moves it (regardless of which frame it was on when moved). However, you could use a Frame Change script...
by reD_Fox
Thu May 10, 2007 4:14 am
Forum: Python
Topic: Accessing mesh users ?
Replies: 4
Views: 2496

Yes, revans got it right, with one small exception:
mesh_obj.getData(False,True).name
should be changed to
mesh_obj.getData(name_only=True)
for performance reasons.
The former loads the mesh into memory, then gets its name, when all you need is the mesh's name.

Levi
by reD_Fox
Thu May 10, 2007 3:58 am
Forum: Python
Topic: Applying scale and rotation from a script?
Replies: 1
Views: 2930

Hello, Ryan. There doesn't appear to be a function already in place to do what you want. However, it's fairly straightforward to accomplish yourself. def applyTransform(obj): mat = obj.getMatrix() me = obj.getData(mesh=True) for v in me.verts: v.co = v.co*mat mat.identity() There may be a better way...
by reD_Fox
Wed May 09, 2007 3:11 pm
Forum: Python
Topic: Accessing mesh users ?
Replies: 4
Views: 2496

Boy, this may not be the right answer, but it's the only way I can think to do it:

Loop through all objects, comparing ob.getData(name_only=True) to the mesh's name.

I don't think the mesh is even aware of who all has its data (but I could be wrong).

Levi
by reD_Fox
Wed May 09, 2007 3:01 pm
Forum: Python
Topic: Create layer keys with python
Replies: 3
Views: 2548

Try the following link, I think it contains the information you need:
http://www.blender.org/documentation/24 ... tml#layers

Levi
by reD_Fox
Fri May 04, 2007 4:02 pm
Forum: Python
Topic: problem exporting a 3D drawing in .X3D
Replies: 6
Views: 2944

OK, when you say a "high distance between them," are the objects themselves bigger (i.e. everything is scaled larger, including the distance between the objects), or are they just positioned wrong? If the former, it's normal and your solution would be to just scale everything smaller. If the latter,...
by reD_Fox
Thu May 03, 2007 4:12 pm
Forum: Python
Topic: problem exporting a 3D drawing in .X3D
Replies: 6
Views: 2944

Hmm, now we're treading into the realm of general Blender help and support. If you have general questions about Blender, the BlenderArtists.org forum might be a better place to ask (the blender.org forums are generally for development discussions): http://blenderartists.org/forum/index.php However, ...
by reD_Fox
Wed May 02, 2007 3:26 pm
Forum: Python
Topic: problem exporting a 3D drawing in .X3D
Replies: 6
Views: 2944

I haven't looked at the specs, but I doubt that X3D supports the curve format, and I doubt that Blender's exporter converts them for you. Try converting the curves to a mesh first (ALT-C), and then exporting.

Levi