Home | Trees | Index | Help |
|
---|
Module Scene :: Class Scene |
|
Method Summary | |
---|---|
Add a new script link to this Scene. | |
Delete script links from this Scene. | |
Scene |
Make a copy of this Scene. |
Blender Object or None |
Get this scene's active object. |
list of Blender Objects |
Get all objects linked to this Scene. |
Blender Object |
Get the currently active Camera for this Scene. |
list of integers |
Get the layers set for this Scene. |
string |
Get the name of this Scene. |
Blender Radiosity |
Get the radiosity context for this scene, see Radio . |
RenderData |
Get the rendering context for this scene, see Render . |
list |
Get a list with this Scene's script links of type 'event'. |
Link an Object to this Scene. | |
Make this Scene the currently active one in Blender. | |
bool |
Play a realtime animation. |
Set the currently active Camera in this Scene. | |
Set the visible layers for this scene. | |
Set the name of this Scene. | |
boolean |
Unlink an Object from this Scene. |
Update this Scene in Blender. |
Instance Variable Summary | |
---|---|
Vector (wrapped) | cursor : the 3d cursor location for this scene. |
bool | fakeUser : When set to True, this datablock wont be removed, even if nothing is
using it. |
integer (bitmask) | Layers : The Scene layers (check also the easier to use layers ). |
list of integers | layers : The Scene layers (check also Layers ). |
string or None | lib : path to the blend file this datablock is stored in (readonly). |
string | name : unique name within each blend file. |
sequence of objects | objects : The scene's objects. |
IDGroup |
properties : Returns an IDGroup reference to this datablocks's ID
Properties. |
RenderData | radiosity : The scenes radiosity settings. |
RenderData | render : The scenes render settings. |
bool | tag : A temporary tag that to flag data as being used within a loop. |
Timeline | timeline : The timeline for this scene, named markers are
stored here. |
int | users : The number of users this datablock has. |
World or None | world : The world that this scene uses (if any) |
Method Details |
---|
addScriptLink(text, event)Add a new script link to this Scene. Using OpenGL functions within a scene ScriptLink will draw graphics over the 3D view. There is an issue with the zoom of the floating panels also scaling graphics drawn by your scriptlink. This makes matching OpenGL graphics to mouse location impossible. Make sure that you use floating point for operations that you would usually use int functions for: glRasterPos2f rather then glRasterPos2i. The following example shows how you can use the OpenGL model view matrix to obtain the scale value. Example:from Blender import BGL view_matrix = BGL.Buffer(BGL.GL_FLOAT, 16) BGL.glGetFloatv(BGL.GL_MODELVIEW_MATRIX, view_matrix) gl_scale = 1/viewMatrix[0] # Now that we have the scale we can draw to the correct scale. BGL.glRect2f(10*gl_scale, 10*gl_scale, 110*gl_scale, 110*gl_scale)
|
clearScriptLinks(links=None)Delete script links from this Scene. If no list is specified, all script links are deleted.
|
copy(duplicate_objects=1)Make a copy of this Scene.
|
getActiveObject()Get this scene's active object.
|
getChildren()Get all objects linked to this Scene. (deprecated). Note: new scripts should use theobjects attribute instead. In cases where
a list is required use list(scn.objects).
|
getCurrentCamera()Get the currently active Camera for this Scene.
|
getLayers()Get the layers set for this Scene.
|
getName()Get the name of this Scene.
|
getRadiosityContext()Get the radiosity context for this scene, seeRadio .
|
getRenderingContext()Get the rendering context for this scene, seeRender .
|
getScriptLinks(event)Get a list with this Scene's script links of type 'event'.
|
link(object)Link an Object to this Scene.
|
makeCurrent()Make this Scene the currently active one in Blender. |
play(mode=0, win='<VIEW3D>')Play a realtime animation. This is the "Play Back Animation" function in Blender, different from playing a sequence of rendered images (for that checkRender.RenderData.play ).
|
setCurrentCamera(camera)Set the currently active Camera in this Scene.
|
setLayers(layers)Set the visible layers for this scene.
|
setName(name)Set the name of this Scene.
|
unlink(object)Unlink an Object from this Scene.
|
update(full=0)Update this Scene in Blender.
|
Instance Variable Details |
---|
cursorthe 3d cursor location for this scene.
|
fakeUserWhen set to True, this datablock wont be removed, even if nothing is using it. All data has this disabled by default except for Actions.
|
LayersThe Scene layers (check also the easier to uselayers ). This value is a bitmask with at
least one position set for the 20 possible layers starting from the low
order bit. The easiest way to deal with these values in in hexadecimal
notation. Example:
scene.Layers = 0x04 # sets layer 3 ( bit pattern 0100 ) scene.Layers |= 0x01 print scene.Layers # will print: 5 ( meaning bit pattern 0101)After setting the Layers value, the interface (at least the 3d View and the Buttons window) needs to be redrawn to show the changes.
|
layersThe Scene layers (check alsoLayers ). This attribute accepts and returns
a list of integer values in the range [1, 20]. Example:
scene.layers = [3] # set layer 3 scene.layers = scene.layers.append(1) print scene.layers # will print: [1, 3]
|
libpath to the blend file this datablock is stored in (readonly). lib will be None unless you are using external blend files with (File, Append/Link) Note: the path may be relative, to get the full path useBlender.sys.expandpath
|
nameunique name within each blend file. The name is case sensitive and 21 characters maximum length. Note: a blend file may have naming collisions when external
library data is used, be sure to check the value of
|
objectsThe scene's objects. The sequence supports the methods .link(ob), .unlink(ob), and .new(obdata), and can be iterated over.
|
propertiesReturns anIDGroup reference to this datablocks's ID
Properties.
|
radiosityThe scenesradiosity settings. (read only)
|
renderThe scenesrender settings. (read only)
|
tagA temporary tag that to flag data as being used within a loop. always set all tags to True or False before using since blender uses this flag for its own internal operations.
|
timelineThetimeline for this scene, named markers are
stored here. (read only)
|
usersThe number of users this datablock has. (readonly) Zero user datablocks are de-allocated after reloading and saving.
|
worldThe world that this scene uses (if any)
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu May 10 20:31:59 2007 | http://epydoc.sf.net |