[Bf-python] Higher level object functions proposal.

Campbell Barton cbarton at metavr.com
Thu May 27 02:03:33 CEST 2004


Hi All, there are a number of functions on objects that are available in 
blender but can only be done manualy (and slowly) in python

# ob - is a blender object
# Object is the blender module

ob.sel = 1/0 # Sets weather the objetcs selected. (Active object will be 
the last object set)

ob.ApplySizeRot()  # Only for single user mesh, Would be good for 
exporters that ATM need to pass each vert and normal through a 4x4 
matrix, mabe better  ob.ApplyMatrix(matrix)

newOb = Object.Frees(ob) # Like Alt+C, good for subsurf mabe a better 
name couild be used?

Object.Join([ob1, ob2,ob2]) # Joins a list of objects (Ctrl+J) Using the 
firsty object as the active object whos center will be used. all objects 
will be MOVED into the first.

ob.Center( (x,y,z) ) # Sets the objects center (purple dot) in global 
coords, with no values the objects center will be moved to be at the 
objects center.

newOb = ob.Copy() # Shift+D, duplicate is a big word- Duplicate() ?

newOb = ob.CopyLinked() # Alt+D, DuplicateLinked() / ob.DupLink()

newOb = Object.Boolean('UNION', obA, obB) # UNION. INTERSECT, or 
DIFFERENCE, the boolena is a bit crappy atm but could still be added for 
when it improves.







More information about the Bf-python mailing list