TypeError for pythonCoder error.
RuntimeError for blender not being able to be joined. (Sorry stivs, no BadJuJu yet)
Documented this in the epydocs also.
Object.GetSelected now dosnt return None if there is no 3d view. - wasnt documented and likely would mess up scripts that always expected a list. - Just return an empty list instead.
getting 7200 objects did take: 1.18 sec, now 0.0012 sec
It was doing a full object list lookup for every object in the scenes base using the name to compare.
now it just gets the object directly from the base and converts it to a python object, adding it to the list.
- Cam
eg.
ret_val = ob.join(objects)
Now it dosent depend on the current selection, or change the selection context.
Made respective join_* functions return 0 if the join was not mode, 1 when it workes.
Changed Pythons Object.Duplicate() to take keyword parms to enable duplication of spesific data.
Eg- Object.Duplicate(mesh=1) # to duplicate mesh data also.
NMesh lists before trying to build a new mesh (used by mesh.PutRaw() and
mesh.update()). It was possible to put junk into the NMesh lists, resulting
in some messed-up meshes.
even though its error messages suggested it did. Thanks to Yann for the
patch (I also added the ability to accept parameters without requiring
them to be in a tuple). Also documented the New() function.
Object.Join()
Seperated the join calls from space.c and view3dmenu into join_menu() in space.c, like the select_group_menu(),
okee's from join_curve, join_mesh.. etc are in join_menu() so python can call them without UI menu's in the way.
this is also a bit neater since there were 2 places that were doing what join_menu() does now.
- Cam
Object.Duplicate(linked=1)
Basicly a wrapper for adduplicate();
There was previously no easy way to copy objects in python. even the ways that do exist dont take modifiers, particles etc into account.
Uses the current selection.. epydocs included also.
- Cam
Still need to do Mball and Text.
Ken- this is fairly straight fwd but if you dont like it - its line 4867 of Mesh.c and 1 block that can be removed.
I tested for memory leaks and correct material user adjustment.
This is realy needed for using getFromObject to export to external rendering engines.
- Hope its ok.
Cam
There is a lot of very dangerous (and slow) string manipulation code in
there. I do not want to appear arrogant, but a bit of basic code QA in this
module certainly can't hurt.
Please see the diff for further explanation ;-)
a the beztriple, so things like the hidden and handle select states were
set to random values. Added a beztriple.hide attribute so that the
hide attribute can be set/cleared from the BPy API.
- malformed nmeshes could crash Blender with a sigsegv. Related to old
behavior that accepted "faces" with one or two verts.
- removing unused var (store_edges) + doc update.
Image.New(name, w,h,depth)
Image.start- for animtex
Image.end - for animtex
Image.speed - for animtex
Image.packed - read only bool
See the pydocs for details.
when it duplicated mesh data.
I'm not thrilled with how I implemented this code, but currently don't
know a better way. If someone more familiar with how blender duplicates
objects and converts things to meshes wants to have a look, it would be
appreciated.
Previously the only way to get the current image was flaky and relyd on the image being assigned to a mesh.
try:
me = Scene.GetCurrent().getAttiveObject().getData(mesh=1)
image = me.faces[me.activeFace].image
except:
image = None
...Can new be replaced by the following, and works even when there is no mesh.
image = Image.GetCurrent()
epydocs:
Get the currently displayed Image from Blenders UV/Image window.
When multiple images are displayed, the last active UV/Image windows image is used.
* this resolves a number of outstanding issues with the armature api and gets this ready for release
- add/remove bones possible
- rolls work correctly now!
- ik'ing to parent should work
- flags for tip/root/bone selection
- etc.