Module Scene :: Class SceneObjects
[frames | no frames]

Class SceneObjects


The SceneObjects (Scene ObjectSeq) object

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)

Method Summary
None link(object)
Adds an existing object to the scene.
Object new(data)
Adds a new object to the scene.
None unlink(object)
Removes an object from the scene.

Instance Variable Summary
Object active: the active object 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

link(object)

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.
Parameters:
object - the object
           (type=Object)
Returns:
None

new(data)

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.
Parameters:
data - the object data for the new object
           (type=string or object data)
Returns:
the new object.
           (type=Object)

unlink(object)

Removes an object from the scene. If the object is not linked to the scene, no action is taken and no exception is raised.
Parameters:
object - the object
           (type=Object)
Returns:
None

Instance Variable Details

active

the active object in the scene.
Type:
Object

context

an iterator over all the visible selected objects in a scene.
Type:
sequence of Object

selected

an iterator over all the selected objects in a scene.
Type:
sequence of Object

Generated by Epydoc 2.1 on Thu May 10 20:31:59 2007 http://epydoc.sf.net