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

Class Scene


The Scene object

This object gives access to Scene data in Blender.
Method Summary
Scene copy(duplicate_objects)
Make a copy of this Scene.
int currentFrame(frame)
Get (and optionally set) the current frame value.
int endFrame(frame)
Get (and optionally set) the end frame value.
tuple frameSettings(start, end, current)
Get (and optionally set) the start, end and current frame values.
string getBackbufdir()
Get the location of the backbuffer image.
list 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.
string getRenderdir()
Get the current directory where rendered images are saved.
list of two ints getWinSize()
Get the current x,y resolution of the render window.
  link(object)
Link an Object to this Scene.
  makeCurrent()
Make this Scene the currently active one in Blender.
  setCurrentCamera(camera)
Set the currently active Camera in this Scene.
  setName(name)
Set the name of this Scene.
  setWinSize(dimensions)
Set the width and height of the render window.
int startFrame(frame)
Get (and optionally set) the start frame value.
  unlink(object)
Unlink an Object from this Scene.
  update(full)
Update this Scene in Blender.

Class Variable Summary
  name: The Scene name.

Method Details

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)

currentFrame(frame=None)

Get (and optionally set) the current frame value.
Parameters:
frame - The current frame. If None, this method simply returns the current frame value.
           (type=int)
Returns:
The current frame value.
           (type=int)

endFrame(frame=None)

Get (and optionally set) the end frame value.
Parameters:
frame - The end frame. If None, this method simply returns the current end frame.
           (type=int)
Returns:
The end frame value.
           (type=int)

frameSettings(start=None, end=None, current=None)

Get (and optionally set) the start, end and current frame values.
Parameters:
start - The start frame value.
           (type=int)
end - The end frame value.
           (type=int)
current - The current frame value.
           (type=int)
Returns:
The frame values in a tuple: [start, end, current].
           (type=tuple)

getBackbufdir()

Get the location of the backbuffer image.
Returns:
The path to the chosen backbuffer image.
           (type=string)

getChildren()

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

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

getRenderdir()

Get the current directory where rendered images are saved.
Returns:
The path to the current render dir
           (type=string)

getWinSize()

Get the current x,y resolution of the render window. These are the dimensions of the image created by the Blender Renderer.
Returns:
[width, height].
           (type=list of two ints)

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.

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)

setWinSize(dimensions)

Set the width and height of the render window. These are the dimensions of the image created by the Blender Renderer.
Parameters:
dimensions - The new [width, height] values.
           (type=list of two ints)

startFrame(frame=None)

Get (and optionally set) the start frame value.
Parameters:
frame - The start frame. If None, this method simply returns the current start frame.
           (type=int)
Returns:
The start frame value.
           (type=int)

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.0 on Sat Nov 29 19:05:57 2003 http://epydoc.sf.net