Home | Trees | Indices | Help |
|
---|
|
This object gives access to the Objects in a Scene in Blender.
Example:
from Blender import Scene scn = Scene.GetCurrent() scn.objects.selected = [] # select none scn.objects.selected = scn.objects # select all scn.objects.context = scn.objects # select all and move into the scenes display layer # get a list of mesh objects obs = [ob for ob in scn.objects if ob.type == 'Mesh'] # Select only these mesh objects scn.objects.selected = obs # print all object names for ob in scn.objects: print ob.name # make a list of objects that you can add and remove to # will not affect the current scene scene_obs = list(scn.objects)
Instance Methods | |||
Object |
|
||
None |
|
||
None |
|
Instance Variables | |
Object |
active the active object in the scene. |
Object |
camera the active camera in the scene. |
sequence of Object |
context an iterator over all the visible selected objects in a scene. |
sequence of Object |
selected an iterator over all the selected objects in a scene. |
Method Details |
Adds a new object to the scene. Data is either object data such as a Mesh or Curve, or the string "Empty" for an Empty object. The type of the object is determined by the type of the data.
|
Adds an existing object to the scene. If the object is already linked to the scene, no action is taken and no exception is raised.
|
Removes an object from the scene. If the object is not linked to the scene, no action is taken and no exception is raised.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Mon Aug 31 23:12:24 2009 | http://epydoc.sourceforge.net |