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 ;-)
http://www.blender.org/forum/viewtopic.php?t=7646
and loading of old corrupt blendfiles.
Makes sure bhead.len is not < 0 (hacked blendfile)
also sets buffer to 0 when fails to read correctly (wasn't set so
was causing problems)
The second thing was provided by pidhash.
Kent
turns out that oops->id->lib isnt initialized? anyhow
if (oops->id && oops->id->lib) // works
where
if (oops->id->lib) // crashes
so made the needed change in a few places.
Final (?) updates for 2.40 :) :
- Bob Holcomb sent a better version of his 3ds importer
- Added doc info to bvh2arm: links to doc and mocap tute from author
Jean-Baptiste Perin
- Alessandro Pirovano improved the Lightwave importer.
- Mikael Lagre updated the collada scripts (fixed a bug with camera
lens value)
- Adam Saltsman improved the wings importer (ongoing work with
his pal Toastie).
- Anthony D'Agostino GPL'd his scripts (used Blender's BAL
license previously)
Thanks to all script authors for their work, interest and kindness.
Again, Tom (LetterRip) has played an important part in this, thanks and
welcome :).