Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Scene.Scene.Scene Class Reference

Container object for the scene graph. More...

Public Member Functions

 __init__ (self)
 
 setIgnoreSceneChanges (self, ignore_scene_changes)
 
 acquireLock (self)
 Acquire the global scene lock.
 
 releaseLock (self)
 Release the global scene lock.
 
 getSceneLock (self)
 Gets the global scene lock.
 
 getRoot (self)
 Get the root node of the scene.
 
 setRoot (self, node)
 Change the root node of the scene.
 
 getActiveCamera (self)
 Get the camera that should be used for rendering.
 
 getAllCameras (self)
 
 setActiveCamera (self, name)
 Set the camera that should be used for rendering.
 
 findObject (self, object_id)
 Find an object by id.
 
 findCamera (self, name)
 

Static Public Attributes

 rootChanged = Signal()
 
 sceneChanged = Signal()
 Signal.
 

Protected Member Functions

 _connectSignalsRoot (self)
 
 _disconnectSignalsRoot (self)
 

Protected Attributes

 _root
 
 _active_camera
 
 _ignore_scene_changes
 
 _lock
 

Detailed Description

Container object for the scene graph.

The main purpose of this class is to provide the root SceneNode.

Member Function Documentation

◆ acquireLock()

UM.Scene.Scene.Scene.acquireLock (   self)

Acquire the global scene lock.

This will prevent any read or write actions on the scene from other threads, assuming those threads also properly acquire the lock. Most notably, this prevents the rendering thread from rendering the scene while it is changing. Deprecated, use getSceneLock() instead.

◆ findObject()

UM.Scene.Scene.Scene.findObject (   self,
  object_id 
)

Find an object by id.

Parameters
object_idThe id of the object to search for, as returned by the python id() method.
Returns
The object if found, or None if not.

◆ getSceneLock()

UM.Scene.Scene.Scene.getSceneLock (   self)

Gets the global scene lock.

Use this lock to prevent any read or write actions on the scene from other threads, assuming those threads also properly acquire the lock. Most notably, this prevents the rendering thread from rendering the scene while it is changing.

◆ releaseLock()

UM.Scene.Scene.Scene.releaseLock (   self)

Release the global scene lock.

Deprecated, use getSceneLock() instead.

◆ setActiveCamera()

UM.Scene.Scene.Scene.setActiveCamera (   self,
  name 
)

Set the camera that should be used for rendering.

Parameters
nameThe name of the camera to use.

Member Data Documentation

◆ sceneChanged

UM.Scene.Scene.Scene.sceneChanged = Signal()
static

Signal.

Emitted whenever something in the scene changes.

Parameters
objectThe object that triggered the change.

The documentation for this class was generated from the following file: