- python defined classes will be used when available (otherwise automaically generated metaclasses are made as before)
- use properties rather then functions for python defined rna class's
- call the classes getattr AFTER doing an RNA lookup, avoids setting and clearing exceptions for most attribute lookups, tested UI scripts are ~25% faster.
- extending rna py classes this way is a nicer alternative to modifying the generated metaclasses in place.
Example class
--- snip
class Object(bpy.types.ID):
def _get_children(self):
return [child for child in bpy.data.objects if child.parent == self]
children = property(_get_children)
--- snip
The C initialization function looks in bpy_types.py for classes matching RNA structure names, using them when available.
This means all objects in python will be instances of these classes.
Python properties/funcs defined in ID py class will also be available for subclasses for eg. (Group Mesh etc)
- separated python console from the interactive console
- added shell console type (simple example)
- console types are autodetected and can be selected in the menu
Added RNA functions for adding and removing Driver Targets. Unfortunately, I couldn't do this by simply adding callbacks for the add/remove of the collection, as I've had to add to extra RNA functions to do that.
Example usage - driving Lamp Distance with Cube LocZ:
myOb= bpy.data.objects["Lamp"]
myOb.driver_add("data.distance")
# drivers is list of F-Curves that have driver data
drivers= myOb.animation_data.drivers
distDriver= drivers[0].driver
dtar= distDriver.add_target("ctrl1")
dtar.id_type= 'OBJECT'
dtar.id= bpy.data.objects["Cube"]
dtar.rna_path= "location"
dtar.array_index= 2
- In 2.4x this was numpad *, however that would only align on the Z axis.
- New behavior for VIEW3D_OT_viewnumpad, holding Shift with Numpad 1/3/7 sets the left/top/front etc on the normal axis.
- Uses active bone, face, edge, vert, curve handel & object (just like the view manipulator with 'Normal' selected).
The cause of this is in the bullet library, seems like some kind
of poor handling of many repeated allocations by Mac OS X, but the
allocation is unnecessary, so removed it.
Patch submitted to bullet:
http://code.google.com/p/bullet/issues/detail?id=303
useful for python but in rare cases this also happens for users.
Active layer getting out of sync is an old bug but hard find when it happens.
This at least fixes segfaulting on adding objects.
- made the console banner printing function into a python operator (includes sys.version)
- added 'C' into the consoles default namespace for convenience
* #19819: 'Select' operator for Hooks was crashing when Hooks didn't have any vertices assigned yet
* Default twist resolution mode for curves is now 'Minimise'. This seems to work better for Curve Deforms and other purposes. Can be changed if other ways are better after some more testing.
* Spline IK now has more options for controlling how the x and z axis scaling is determined. There is now a choice between using the radius of the curve, the x+z scaling from the bones, or no scaling (default). This does break old files a bit, but this is to have a more stable base for later.
Depgraph update was commented out in undo system because of globals, restored this with new context/id-based depgraph
* Fix in UV editor UV menu
* Slightly nicer default names for adding forcefields with Add menu
* #19790: Circle Select doesn't work for Armature edit mode or pose mode
* Duplicate bones (Shift-D) was calling the wrong operator. This now uses the macro version, instead of the copy only.