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

Class Scene


The Scene object

This object gives access to Scene data in Blender.
Method Summary
  addScriptLink(text, event)
Add a new script link to this Scene.
bool clearScriptLinks()
Delete all this Scene's script links.
Scene copy(duplicate_objects)
Make a copy of this Scene.
list of Blender Objects getChildren()
Get all objects linked to this Scene.
Blender Camera getCurrentCamera()
Get the currently active Camera for this Scene.
string getName()
Get the name of this Scene.
Blender Radiosity getRadiosityContext()
Get the radiosity context for this scene, see Radio.
RenderData getRenderingContext()
Get the rendering context for this scene, see Render.
list 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.
bool play(mode, win)
Play a realtime animation.
  setCurrentCamera(camera)
Set the currently active Camera in this Scene.
  setName(name)
Set the name of this Scene.
  unlink(object)
Unlink an Object from this Scene.
  update(full)
Update this Scene in Blender.

Class Variable Summary
  name: The Scene name.

Method Details

addScriptLink(text, event)

Add a new script link to this Scene.
Parameters:
text - the name of an existing Blender Text.
           (type=string)
event - "FrameChanged", "OnLoad" or "Redraw".
           (type=string)

clearScriptLinks()

Delete all this Scene's script links.
Returns:
0 if some internal problem occurred or 1 if successful.
           (type=bool)

copy(duplicate_objects=1)

Make a copy of this Scene.
Parameters:
duplicate_objects - Defines how the Scene children are duplicated:
  • 0: Link Objects;
  • 1: Link Object Data;
  • 2: Full copy.

           (type=int)
Returns:
The copied Blender Scene.
           (type=Scene)

getChildren()

Get all objects linked to this Scene.
Returns:
A list with all Blender Objects linked to this Scene.
           (type=list of Blender Objects)

getCurrentCamera()

Get the currently active Camera for this Scene.
Returns:
The currently active Camera.
           (type=Blender Camera)

getName()

Get the name of this Scene.
Returns:
string

getRadiosityContext()

Get the radiosity context for this scene, see Radio.
Returns:
the radiosity object for this scene.
           (type=Blender Radiosity)

Note: only the current scene can return a radiosity context.

getRenderingContext()

Get the rendering context for this scene, see Render.
Returns:
the render data object for this scene.
           (type=RenderData)

getScriptLinks(event)

Get a list with this Scene's script links of type 'event'.
Parameters:
event - "FrameChanged", "OnLoad" or "Redraw".
           (type=string)
Returns:
a list with Blender Text names (the script links of the given 'event' type) or None if there are no script links at all.
           (type=list)

link(object)

Link an Object to this Scene.
Parameters:
object - A Blender Object.
           (type=Blender Object)

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 check Render.RenderData.play).
Parameters:
mode - controls playing:
  • 0: keep playing in the biggest 'win' window;
  • 1: keep playing in all 'win', VIEW3D and SEQ windows;
  • 2: play once in the biggest VIEW3D;
  • 3: play once in all 'win', VIEW3D and SEQ windows.

           (type=int)
win - window type, see Window.Types. Only some of them are meaningful here: VIEW3D, SEQ, IPO, ACTION, NLA, SOUND. But the others are also accepted, since this function can be used simply as an interruptible timer. If 'win' is not visible or invalid, VIEW3D is tried, then any bigger visible window.
           (type=int)
Returns:
0 on normal exit or 1 when play back is canceled by user input.
           (type=bool)

setCurrentCamera(camera)

Set the currently active Camera in this Scene.
Parameters:
camera - The new active Camera.
           (type=Blender Camera)

setName(name)

Set the name of this Scene.
Parameters:
name - The new name.
           (type=string)

unlink(object)

Unlink an Object from this Scene.
Parameters:
object - A Blender Object.
           (type=Blender Object)

update(full=0)

Update this Scene in Blender.
Parameters:
full - A bool to control the level of updating:
  • 0: sort the base list of objects.
  • 1: sort and also regroup, do ipos, ikas, keys, script links, etc.

           (type=int)

Warning: When in doubt, try with full = 0 first, since it is faster. The "full" update is a recent addition to this method.


Class Variable Details

name

The Scene name.

Generated by Epydoc 2.1 on Thu Aug 12 21:47:30 2004 http://epydoc.sf.net