User Tools

Site Tools


DzScene

The main scene container.

More...

Inherits :

Enumerations

Properties

Static Methods

Methods

DAZ Script
DzErroraddDataItem ( DzSceneData item )
BooleanaddNode ( DzNode node )
DzErroraddWSModifier ( wsmodifier_dz modifier, Number index=-1 )
voidbeginTimeEdit ()
voidclear ()
DzCamerafindCamera ( String name )
DzCamerafindCameraByLabel ( String label )
DzSceneDatafindDataItem ( String name )
DzLightfindLight ( String name )
DzLightfindLightByLabel ( String label )
DzMaterialfindMaterialByElementID ( Number id )
DzModifierfindModifierByElementID ( Number id )
DzNodefindNode ( String name )
DzNodefindNodeByElementID ( Number id )
DzNodefindNodeByLabel ( String label )
NumberfindNodeIndex ( DzNode node )
DzObjectfindObjectByElementID ( Number id )
DzShapefindShapeByElementID ( Number id )
DzNodefindSingletonNode ( String guidStr )
DzSkeletonfindSkeleton ( String name )
DzSkeletonfindSkeletonByLabel ( String label )
NumberfindSkeletonIndex ( DzSkeleton skeleton )
voidfinishTimeEdit ()
DzTimeRangegetAnimRange ()
StringgetAssetLoadPath ()
DzAudioClipgetAudio ()
NumbergetAudioStartFrame ()
DzAuthorgetAuthor ()
DzBackdropgetBackdrop ()
DzBox3getBoundingBox ( Number flags=DzIncludeAllFlag )
DzCameragetCamera ( Number index )
ArraygetCameraList ()
DzSceneDatagetDataItem ( Number index )
ArraygetDataItemList ()
StringgetFilename ()
NumbergetFrame ()
DzNodegetHighlightNode ()
DzLightgetLight ( Number index )
ArraygetLightList ()
DzNodegetNode ( Number index )
ArraygetNodeList ()
NumbergetNumCameras ()
NumbergetNumDataItems ()
NumbergetNumLights ()
NumbergetNumNodes ()
NumbergetNumSelectedCameras ()
NumbergetNumSelectedLights ()
NumbergetNumSelectedNodes ()
NumbergetNumSelectedSkeletons ()
NumbergetNumSelectedTimeRanges ()
NumbergetNumSkeletons ()
NumbergetNumStorablesInScene ()
NumbergetNumWSModifiers ()
DzTimeRangegetPlayRange ()
BooleangetPreviewLights ()
DzNodegetPrimarySelection ()
DzCameragetSelectedCamera ( Number index )
ArraygetSelectedCameraList ()
DzLightgetSelectedLight ( Number index )
ArraygetSelectedLightList ()
DzNodegetSelectedNode ( Number index )
ArraygetSelectedNodeList ()
DzSkeletongetSelectedSkeleton ( Number index )
ArraygetSelectedSkeletonList ()
DzSkeletongetSkeleton ( Number index )
ArraygetSkeletonList ()
ArraygetSortedLightList ()
DzTimegetTime ()
DzTimegetTimeStep ()
StringgetUniqueTopLevelLabel ( String label, DzNode node=null )
StringgetUniqueTopLevelName ( String name, DzNode node=null )
wsmodifier_dzgetWSModifier ( Number index )
ArraygetWSModifierList ()
voidinvalidate ()
voidinvalidateLightSorting ()
BooleanisClearing ()
BooleanisDAZLoading ()
BooleanisLoading ()
BooleanisLoopingEnabled ()
BooleanisPlaying ()
DzErrorloadScene ( String filename, DzOpenMethod method )
voidloopPlayback ( Boolean onOff )
voidmarkChanged ()
BooleanneedsSave ()
voidpause ()
voidplay ( Boolean realtime=true )
voidprotectSceneSourceFile ()
voidremoveAllCameras ()
voidremoveAllLights ()
DzErrorremoveDataItem ( DzSceneData item )
BooleanremoveNode ( DzNode node )
voidremoveSelected ()
DzErrorremoveWSModifier ( wsmodifier_dz modifier )
DzErrorsaveScene ( String filename=“” )
voidsaveThumbnail ( String filename )
voidselectAllNodes ( Boolean onOff )
voidselectAllSkeletons ( Boolean onOff )
voidselectAllTime ( Boolean onOff )
voidsetAnimRange ( DzTimeRange range )
voidsetAssetLoadPath ( String absolutePath )
voidsetAudio ( DzAudioClip audio, Number startFrame=0 )
voidsetBackdrop ( DzBackdrop backdrop )
voidsetFrame ( Number frame )
voidsetHighlightNode ( DzNode node )
voidsetPlayRange ( DzTimeRange range )
voidsetPreviewLights ( Boolean onoff )
BooleansetPrimarySelection ( DzNode node )
voidsetTime ( DzTime time )
voidsetTimeStep ( DzTime time )
voidstepTime ( Number nFrames=1, Boolean forward=true )
voidupdate ()

Signals

voidaboutToRemoveNode ( DzNode node )
voidaboutToRender ( DzRenderer r )
voidanimRangeChanged ( DzTimeRange range )
voidassetModified ()
voidassetWasSaved ()
voidbackdropChanged ()
voidcameraAdded ( DzCamera node )
voidcameraListChanged ()
voidcameraRemoved ( DzCamera node )
voidcameraSelectionListChanged ()
voidcurrentTimeChanged ( DzTime oldTime, DzTime newTime )
voiddrawnDataChanged ()
voidhighlightNodeChanged ( DzNode node )
voidlightAdded ( DzLight node )
voidlightListChanged ()
voidlightRemoved ( DzLight node )
voidlightSelectionListChanged ()
voidloopPlaybackChanged ( Boolean onOff )
voidmaterialListChanged ()
voidmaterialSelectionChanged ()
voidnodeAdded ( DzNode node )
voidnodeListChanged ()
voidnodeRemoved ( DzNode node )
voidnodeSelectionListChanged ()
voidplaybackFinished ()
voidplaybackStarted ()
voidplayRangeChanged ( DzTimeRange range )
voidprimarySelectionChanged ( DzNode node )
voidrenderFinished ( DzRenderer r )
voidsceneCleared ()
voidsceneClearStarting ()
voidsceneFilenameChanged ( String newName )
voidsceneLoaded ()
voidsceneLoadStarting ()
voidsceneSaved ( String filename )
voidsceneSaveStarting ( String filename )
voidsceneTopologyChanged ()
voidsingletonNodeAdded ( DzNode node )
voidskeletonAdded ( DzSkeleton node )
voidskeletonListChanged ()
voidskeletonRemoved ( DzSkeleton node )
voidskeletonSelectionListChanged ()
voidtimeChanged ( DzTime time )
voidtimeChanging ( DzTime newTime )
voidtimeSelectionChanged ()
voidtimeStepChanged ( DzTime time )
voidwsModifierAdded ( wsmodifier_dz modifier )
voidwsModifierRemoved ( wsmodifier_dz modifier )
voidwsModifierStackChanged ()

Detailed Description

There is only one of these objects in the application. It is the communication hub between the core code and the interface, so it tracks all nodes, skeletons, lights, cameras, etc. that become part of the scene. This object is directly available using the Global::Scene variable.

Enumerations


: DzOpenMethod

Enumerated open methods.

  • DefaultMethod - DefaultMethod - If no nodes (or only the default camera) exist, this behaves as OpenNew. Otherwise, this behaves as MergeFile.
  • OpenNew - OpenNew - Resets the scene to its initial, clean state. All scene data is deleted and the undo stack is cleared.
  • MergeFile - MergeFile - Merges the file with any pre-existing elements in the scene.

—–

: IncludeFlags

Enumerated flags for determining what to include when calculating the scene bounding box.

  • DzObjectsOnly - Only visible items with geometry that cast shadows will be included.
  • DzIncludeLightsFlag - Include lights in the bounding box.
  • DzIncludeCamerasFlag - Include cameras in the bounding box.
  • DzIncludeNonShadowersFlag - Include items that do not cast shadows in the bounding box.
  • DzIncludeNonVisibleFlag - Include items that are not visible in the bounding box.
  • DzIncludeAllFlag - Include all nodes in the bounding box.

Properties


String : assetId

Holds the asset id for the current scene.

Since:

  • 4.8.1.18

Boolean : assetNeedSave

Holds whether or not the asset for this modifier needs to be saved. (Read Only)

Since:

  • 4.11.0.249

DzUri : assetUri

Holds the asset URI for the current scene. (Read Only)

Since:

  • 4.8.1.18

Static Methods


Boolean : executeNodePostCreateScript( DzNode node, String settingsBase )

Executes the node post-create script; a script that considers the active renderer and makes adjustments to the specified node - e.g., replaces instances of the “default” material for the application with the default material for the active renderer.

Parameter(s):

  • node - The node to execute the post-create script on; the node must have associated geometry.
  • settingsBase - The slash (“/”) delimited base path of a DzAppSettings to look for a string value named after the classname of the active renderer - which is expected to hold the path to a file (can be relative to a mapped content directory, or absolute) to load if it exists.
  • materialIDs - An optional list of element IDs for the materials to limit the scope of the script to; if this list is empty (default), all materials on the current shape of the node are considered.

Return Value:

  • true if the node is valid, the node post-create script exists and can be loaded/executed without error, otherwise false.

Since:

  • 4.11.0.255

String : getLabelNumber( String label )

Parameter(s):

  • label - The string to get the number suffix from.

Return Value:

  • The number suffix (if any), otherwise an empty string.

Since:

  • 4.12.0.62

See Also:


String : getNameNumber( String name )

Parameter(s):

  • name - The string to get the number suffix from.

Return Value:

  • The number suffix (if any) in the name, otherwise an empty string.

Since:

  • 4.12.0.62

See Also:


String : stripLabelNumber( String label )

Parameter(s):

  • label - The string to remove the number suffix(es) from.

Return Value:

  • label with the number suffix(es) removed (if any), otherwise label.

See Also:


String : stripNameNumber( String name )

Parameter(s):

  • name - The string to remove the “ #” suffix from.

Return Value:

  • name with the “ #” suffix removed (if any), otherwise name.

Since:

  • 4.12.0.62

See Also:

Methods


DzError : addDataItem( DzSceneData item )

Adds a scene data item to the scene.

Parameter(s):

  • item - The data item to add to the scene. The scene takes ownership of this object and deletes it when it is no longer used.

Return Value:

  • DZ_NO_ERROR on success, or an error code if it failed.

Boolean : addNode( DzNode node )

Adds a node to the scene if it is not already in the scene.

Parameter(s):

  • newNode - The node to add to the scene. The scene takes ownership of this object and deletes it when it is no longer used.

Return Value:

  • true if the node was added to the scene, otherwise false.

DzError : addWSModifier( wsmodifier_dz modifier, Number index=-1 )

Adds a world-space modifier to the scene's modifier stack.

Parameter(s):

  • modifier - The world-space modifier to add to the scene. The scene takes ownership of this object and deletes it when it is no longer used.
  • index - The location in the list that where the modifier will be inserted. If index is less than 0, the modifier is appended to the end of the stack.

Return Value:

  • DZ_NO_ERROR on success, otherwise an error code.

void : beginTimeEdit()

Starts a time-editing operation. All changes to scene time, play range, and animation range that occur between this call and a call to finishTimeEdit() will be wrapped into a single undo item.

Every call to beginTimeEdit() should be matched with a call to finishTimeEdit().


void : clear()

Resets the scene to its initial, clean state. All data is deleted and the undo stack is cleared.


DzCamera : findCamera( String name )

Attempts to find a camera with the given name in the scene.

Parameter(s):

  • name - The name of the camera to find.

Return Value:

  • The first camera in the scene with the given name (if any), otherwise null.

DzCamera : findCameraByLabel( String label )

Attempts to find a camera with the given label in the scene.

Parameter(s):

  • label - The label of the camera to find.

Return Value:

  • The first camera in the scene with the given label (if any), otherwise null.

DzSceneData : findDataItem( String name )

Return Value:

  • The scene data item with the given name (if any), otherwise null.

DzLight : findLight( String name )

Attempts to find a light with the given name in the scene.

Parameter(s):

  • name - The name of the light to find.

Return Value:

  • The first light in the scene with the given name (if any), otherwise null.

DzLight : findLightByLabel( String label )

Attempts to find a light with the given label in the scene.

Parameter(s):

  • label - The label of the light to find.

Return Value:

  • The first light in the scene with the given label (if any), otherwise null.

DzMaterial : findMaterialByElementID( Number id )

Parameter(s):

  • id - The number used to uniquely identify the material in the scene.

Return Value:

  • The material with the matching element id (if any), otherwise null.

See Also:


DzModifier : findModifierByElementID( Number id )

Parameter(s):

  • id - The number used to uniquely identify the modifier in the scene.

Return Value:

  • The modifier with the matching element id (if any), otherwise null.

See Also:


DzNode : findNode( String name )

Attempts to find a node with the given name in the scene.

Parameter(s):

  • name - The name of the node to find.

Return Value:

  • The first node in the scene with the given name (if any), otherwise null.

DzNode : findNodeByElementID( Number id )

Parameter(s):

  • id - The number used to uniquely identify the node in the scene.

Return Value:

  • The node with the matching element id (if any), otherwise null.

See Also:


DzNode : findNodeByLabel( String label )

Attempts to find a node with the given label in the scene.

Parameter(s):

  • label - The label of the node to find.

Return Value:

  • The first node in the scene with the given label (if any), otherwise null.

Number : findNodeIndex( DzNode node )

Parameter(s):

  • node - The node to search for in the nodes list.

Return Value:

  • The index of the node in the list, or -1 if not found.

DzObject : findObjectByElementID( Number id )

Parameter(s):

  • id - The number used to uniquely identify the object in the scene.

Return Value:

  • The object with the matching element id (if any), otherwise null.

See Also:


DzShape : findShapeByElementID( Number id )

Parameter(s):

  • id - The number used to uniquely identify the shape in the scene.

Return Value:

  • The shape with the matching element id (if any), otherwise null.

See Also:


DzNode : findSingletonNode( String guidStr )

Attempts to find a singleton node with the given identifier in the scene.

Parameter(s):

  • guidStr - The GUID of the singleton node to find.

Return Value:

  • The singleton node in the scene with the given identifier (if any), otherwise null.

Since:

  • 4.12.2.20

DzSkeleton : findSkeleton( String name )

Attempts to find a skeleton with the given name in the scene.

Parameter(s):

  • name - The name of the skeleton to find.

Return Value:

  • The first skeleton in the scene with the given name (if any), otherwise null.

DzSkeleton : findSkeletonByLabel( String label )

Attempts to find a skeleton with the given label in the scene.

Parameter(s):

  • label - The label of the skeleton to find.

Return Value:

  • The first skeleton in the scene with the given label, otherwise null.

Number : findSkeletonIndex( DzSkeleton skeleton )

Parameter(s):

  • skeleton - The skeleton to search for in the nodes list.

Return Value:

  • The index of the skeleton in the list, or -1 if not found.

void : finishTimeEdit()

Ends a time editing operation started with a call to beginTimeEdit().


DzTimeRange : getAnimRange()

Return Value:

  • The current animation range.

See Also:


String : getAssetLoadPath()

Return Value:

  • The current asset load path of this scene.

DzAudioClip : getAudio()

Return Value:

  • An editable copy of the current audio clip for the scene. This will be NULL if there is no audio for the scene.

See Also:


Number : getAudioStartFrame()

Return Value:

  • The frame number on which the audio should start playing.

DzAuthor : getAuthor()

Return Value:

  • The author of the current scene (if any), otherwise null.

Since:

  • 4.8.1.19

DzBackdrop : getBackdrop()

Return Value:

  • The current backdrop object for the scene.

See Also:


DzBox3 : getBoundingBox( Number flags=DzIncludeAllFlag )

Calculate the bounding box for the current scene.

Parameter(s):

  • flags - A set of flags that specify which types of nodes should be included.

Return Value:

  • A world-space bounding box that encompasses all items in the scene (that match the criteria of the given flags).

DzCamera : getCamera( Number index )

Parameter(s):

  • index - The index of the camera to return.

Return Value:

  • The camera at the given index (if valid), otherwise null.

Array : getCameraList()

Return Value:

  • A list containing all cameras in the scene.

DzSceneData : getDataItem( Number index )

Parameter(s):

  • index - The index of the data item to return.

Return Value:

  • The data item for the scene at the given index (if valid), otherwise null.

Array : getDataItemList()

Return Value:

  • A list of the data items attached to the scene.

String : getFilename()

Return Value:

  • The filename that this scene was last saved to or read from (if any), otherwise an empty string.

See Also:


Number : getFrame()

Return Value:

  • The current time as a frame number based on the current time step.

See Also:


DzNode : getHighlightNode()

Return Value:

  • The currently highlighted node in the scene.

DzLight : getLight( Number index )

Parameter(s):

  • index - The index of the light to return.

Return Value:

  • The light at the given index (if valid), otherwise null.

Array : getLightList()

Return Value:

  • A list containing all lights in the scene.

DzNode : getNode( Number index )

Parameter(s):

  • index - The index of the node to return.

Return Value:

  • The node at the given index (if valid), otherwise null.

Array : getNodeList()

Return Value:

  • A list of all nodes in the scene.

Number : getNumCameras()

Return Value:

  • The number of cameras in the scene.

Number : getNumDataItems()

Return Value:

  • The number of data items attached to the scene

Number : getNumLights()

Return Value:

  • The number of lights in the scene.

Number : getNumNodes()

Return Value:

  • The number of nodes in the scene.

Number : getNumSelectedCameras()

Return Value:

  • The number of currently selected cameras.

Number : getNumSelectedLights()

Return Value:

  • The number of currently selected lights.

Number : getNumSelectedNodes()

Return Value:

  • The number of currently selected nodes.

Number : getNumSelectedSkeletons()

Return Value:

  • The number of currently selected skeletons.

Number : getNumSelectedTimeRanges()

Return Value:

  • The number of selected time ranges.

Number : getNumSkeletons()

Return Value:

  • The number of skeletons in the scene.

Number : getNumStorablesInScene()

Return Value:


Number : getNumWSModifiers()

Return Value:

  • The number of world-space modifiers in the scene.

DzTimeRange : getPlayRange()

Return Value:

  • The current play range.

See Also:


Boolean : getPreviewLights()

Return Value:

  • true if light preview is enabled, otherwise false.

DzNode : getPrimarySelection()

Return Value:

  • The primary selected node in the scene, or NULL if there is no currently selected node. The primary selected node is the last node that was selected, or can be set via function calls.

DzCamera : getSelectedCamera( Number index )

Parameter(s):

  • index - The index of the selected camera to return.

Return Value:

  • The camera at index in the list of selected cameras (if valid), otherwise null.

Array : getSelectedCameraList()

Return Value:

  • A list containing all selected cameras in the scene.

DzLight : getSelectedLight( Number index )

Parameter(s):

  • index - The index of the selected light to return.

Return Value:

  • The light at index in the list of selected lights (if valid), otherwise null.

Array : getSelectedLightList()

Return Value:

  • A list containing all selected lights in the scene.

DzNode : getSelectedNode( Number index )

Parameter(s):

  • index - The index of the selected node to return.

Return Value:

  • The node at index in the list of selected nodes (if valid), otherwise null.

Array : getSelectedNodeList()

Return Value:

  • A list containing all selected nodes in the scene.

DzSkeleton : getSelectedSkeleton( Number index )

Parameter(s):

  • index - The index of the selected skeleton to return.

Return Value:

  • The skeleton at index in the list of selected skeletons (if valid), otherwise null.

Array : getSelectedSkeletonList()

Return Value:

  • A list containing all selected skeletons in the scene.

DzSkeleton : getSkeleton( Number index )

Parameter(s):

  • index - The index of the skeleton to return.

Return Value:

  • The skeleton at the given index (if valid), otherwise null.

Array : getSkeletonList()

Return Value:

  • A list containing all skeletons in the scene.

Array : getSortedLightList()

Return Value:

  • A list containing all lights in the scene sorted by render priority.

DzTime : getTime()

Return Value:

  • The current scene time as a DzTime.

See Also:


DzTime : getTimeStep()

Return Value:

  • The time step the animation is incremented by at each frame.

See Also:


String : getUniqueTopLevelLabel( String label, DzNode node=null )

Parameter(s):

  • label - The node label to make unique; stripLabelNumber() is called on this value.
  • node - The top-level node that the label is intended for; may be null; this node will be ignored when validating uniqueness.

Return Value:

  • label if the value provided is already unique, otherwise label with a suffix that causes it to be unique.

Attention:

  • Bones and hidden nodes that are parented to nodes within a skeleton's hierarchy are not taken into account when ensuring uniqueness.

String : getUniqueTopLevelName( String name, DzNode node=null )

Parameter(s):

  • name - The node name to make unique; stripNameNumber() is called on this value.
  • node - The top-level node that the name is intended for; may be null; this node will be ignored when validating uniqueness.

Return Value:

  • name if the value provided is already unique, otherwise name with a suffix that causes it to be unique.

Attention:

  • Bones and hidden nodes that are parented to nodes within a skeleton's hierarchy are not taken into account when ensuring uniqueness.

Since:

  • 4.12.0.61

wsmodifier_dz : getWSModifier( Number index )

Parameter(s):

  • index - The index of the world-space modifier to return.

Return Value:

  • The world-space modifier at the given index (if valid), otherwise null.

Array : getWSModifierList()

Return Value:

  • A list containing all world-space modifiers in the scene.

void : invalidate()

Invalidates the scene, flagging it as needing to be redrawn.


void : invalidateLightSorting()

TODO: Add description.


Boolean : isClearing()

Return Value:

  • true if the scene is currently in a clearing operation, otherwise false.

Boolean : isDAZLoading()

Return Value:

  • true if the scene is currently loading from a *.daz scene file.

Boolean : isLoading()

Return Value:

  • true if the scene is currently in a loading operation, otherwise false.

Boolean : isLoopingEnabled()

Return Value:

  • true if the looping of playback is enabled, otherwise false.

Boolean : isPlaying()

Return Value:

  • true if the animation is currently playing, otherwise false.

DzError : loadScene( String filename, DzOpenMethod method )

Attempts to load a scene from the given filename.

Parameter(s):

  • filename - The name of the native format file to load. Prior to 4.12.2.39, only the deprecated .daz format was supported.
  • method - The method for combining the contents of the file with the current scene contents.

Return Value:

  • DZ_NO_ERROR if the load operation is successful, otherwise an appropriate error code.

See Also:


void : loopPlayback( Boolean onOff )

Sets looping of playback on/off.

Parameter(s):

  • onOff - If true, playback of animation will continue until the user stops it, looping back to the first frame each time the end of the animation is reached. If false, playback of the animation will stop when the end of the animation is reached.

void : markChanged()

Indicate that the scene has changed since the last save.


Boolean : needsSave()

Return Value:

  • true if the scene needs to be saved, otherwise false.

void : pause()

Pauses playback of the current animation.


void : play( Boolean realtime=true )

Start playback of the current play range.

Parameter(s):

  • realtime - If true, frames will be dropped or paused as needed to keep the animation playing in realtime. Otherwise, the animation is played frame by frame as it can be drawn.

void : protectSceneSourceFile()

Indicate that saving the scene should request a new scene file name when invoked.

Since:

  • 4.20.0.11

void : removeAllCameras()

Removes all cameras from the scene.


void : removeAllLights()

Removes all lights from the scene.


DzError : removeDataItem( DzSceneData item )

Removes the scene data item from the scene.

Parameter(s):

  • item - The data item to remove from the scene.

Return Value:

  • DZ_NO_ERROR if the item was successfully removed, otherwise an error code.

Boolean : removeNode( DzNode node )

Removes the given node from the scene.

Parameter(s):

  • node - The node to remove from the scene.

Return Value:

  • true if the node was in the scene and was successfully removed, otherwise false.

void : removeSelected()

Removes all nodes that have items in their hierarchy that are currently selected.


DzError : removeWSModifier( wsmodifier_dz modifier )

Removes the modifier from the scene's modifier stack if it exists.

Parameter(s):

  • modifier - The world-space modifier to remove from the scene.

Return Value:

  • DZ_NO_ERROR on success, otherwise an error code.

DzError : saveScene( String filename=“” )

Saves the entire scene to file.

Parameter(s):

  • filename - The file to save the scene to. If empty, the scene will be saved to the filename that it was last saved to (if any). If no prior file name exists, the user will be prompted for a filename to save to. If a filename is passed, it becomes the save filename that will be used for future saves. If the file cannot be opened or saved, DZ_OPERATION_FAILED_ERROR is returned. Prior to 4.20.0.9, only the deprecated .daz format was supported.

Return Value:

  • DZ_NO_ERROR if the save operation is successful, otherwise an appropriate error code.

See Also:


void : saveThumbnail( String filename )

Saves a thumbnail-size OpenGL render of the current viewport to the given file name.

Parameter(s):

  • filename - The filename to save the thumbnail to. This should have an extension that is supported by the image manager.

void : selectAllNodes( Boolean onOff )

Sets the selection state for all nodes in the scene.

Parameter(s):

  • onOff - If true all nodes in the scene will be selected. If false, all nodes will be deselected.

void : selectAllSkeletons( Boolean onOff )

Sets the selection state for all skeletons in the scene.

Parameter(s):

  • onOff - If true all skeletons in the scene will be selected. If false, all skeletons will be deselected.

void : selectAllTime( Boolean onOff )

Selects/Deselects all time range.

Parameter(s):

  • onOff - If true, all ranges are selected. If false, all ranges are deselected.

void : setAnimRange( DzTimeRange range )

Sets the animation range for the scene.

Parameter(s):

  • range - The time range to set for the entire animation.

See Also:


void : setAssetLoadPath( String absolutePath )

Sets the asset load path of this scene.

Parameter(s):

  • absolutePath - The absolute path to set.

void : setAudio( DzAudioClip audio, Number startFrame=0 )

Sets the current audio object and the frame on which it should start playing.

Parameter(s):

  • audio - The new audio clip for the scene. Pass in NULL to clear the current audio clip.
  • startFrame - The frame at which the audio should begin playing.

See Also:


void : setBackdrop( DzBackdrop backdrop )

Sets the backdrop object.

Parameter(s):

  • backdrop - The new backdrop for the scene. The scene takes ownership of this object and deletes it when it is no longer needed.

See Also:


void : setFrame( Number frame )

Set the scene time to the given frame based on current time step.

Parameter(s):

  • frame - The frame to set as the current scene time.

See Also:


void : setHighlightNode( DzNode node )

Sets the currently highlighted node. This is typically called from DzViewTool-derived classes.

Parameter(s):

  • node - The node that will become the currently highlighted node.

void : setPlayRange( DzTimeRange range )

Sets the play range for the scene.

Parameter(s):

  • range - The time range to set for animation playback.

See Also:


void : setPreviewLights( Boolean onoff )

Sets whether or not light preview is enabled or disabled.

Parameter(s):

  • onOff - If true, the light preview is enabled.

Boolean : setPrimarySelection( DzNode node )

Sets the node to use as the primary selection.

Parameter(s):

  • node - The selected node that should be flagged as the primary selection. The node must already be selected.

Return Value:

  • true if the node was made the new primary selection, otherwise false.

void : setTime( DzTime time )

Set the scene time to the given time.

Parameter(s):

  • time - The time to set as the current scene time.

See Also:


void : setTimeStep( DzTime time )

Sets the Frame rate for the scene.

Parameter(s):

  • tm - The number of time ticks per frame.

See Also:


void : stepTime( Number nFrames=1, Boolean forward=true )

Step time forward/back by number of frames.

Parameter(s):

  • nFrames - The number of frames to step from the current position.
  • forward - If true, current frame count is increased nFrames. If false, current frame count is decreased.

void : update()

Recursively updates all nodes in the scene.

Signals


void : aboutToRemoveNode( DzNode node )

Signature:“aboutToRemoveNode(DzNode*)”

Transmitted immediately before a node is removed from the scene.

Parameter(s):

  • node - The node to be removed from the scene.

void : aboutToRender( DzRenderer r )

Signature:“aboutToRender(DzRenderer*)”

Emitted just before the scene is rendered.

Parameter(s):

  • renderer - The renderer that will be rendering the scene.

void : animRangeChanged( DzTimeRange range )

Signature:“animRangeChanged(const DzTimeRange&)”

Transmitted after the scene play range is changed.

Parameter(s):

  • range - The new animation range of the scene.

void : assetModified()

Signature:“assetModified()”

Transmitted just after the scene has been modified.


void : assetWasSaved()

Signature:“assetWasSaved()”

Transmitted just after the scene has been saved.


void : backdropChanged()

Signature:“backdropChanged()”

Transmitted just after the backdrop has changed.


void : cameraAdded( DzCamera node )

Signature:“cameraAdded(DzCamera*)”

Transmitted when cameras are added to the scene.

Parameter(s):

  • node - The camera added to the scene.

void : cameraListChanged()

Signature:“cameraListChanged()”

Transmitted when cameras are added to or removed from the scene.


void : cameraRemoved( DzCamera node )

Signature:“cameraRemoved(DzCamera*)”

Transmitted when cameras are removed from the scene.

Parameter(s):

  • node - The camera removed from the scene.

void : cameraSelectionListChanged()

Signature:“cameraSelectionListChanged()”

Transmitted after the camera selection list changes.


void : currentTimeChanged( DzTime oldTime, DzTime newTime )

Signature:“currentTimeChanged( DzTime, DzTime )”

Transmitted after the scene time is changed.

Parameter(s):

  • oldTime - The last time the scene was at.
  • newTime - The new time of the scene.

void : drawnDataChanged()

Signature:“drawnDataChanged()”

Transmitted if the scene has changed and needs to be redrawn.


void : highlightNodeChanged( DzNode node )

Signature:“highlightNodeChanged(DzNode*)”

Transmitted when the highlight node changes.

Parameter(s):

  • node - The new highlight node of the scene.

void : lightAdded( DzLight node )

Signature:“lightAdded(DzLight*)”

Transmitted when lights are added to the scene.

Parameter(s):

  • node - The light added to the scene.

void : lightListChanged()

Signature:“lightListChanged()”

Transmitted when lights are added to or removed from the scene.


void : lightRemoved( DzLight node )

Signature:“lightRemoved(DzLight*)”

Transmitted when lights are removed from the scene.

Parameter(s):

  • node - The light removed from the scene.

void : lightSelectionListChanged()

Signature:“lightSelectionListChanged()”

Transmitted after the light selection list changes.


void : loopPlaybackChanged( Boolean onOff )

Signature:“loopPlaybackChanged(bool)”

Transmitted when the enabled state of playback looping changes.


void : materialListChanged()

Signature:“materialListChanged()”

Emitted when the material list of a node in the scene has changed.


void : materialSelectionChanged()

Signature:“materialSelectionChanged()”

Emitted when the material selection in the scene has changed.


void : nodeAdded( DzNode node )

Signature:“nodeAdded(DzNode*)”

Transmitted when nodes are added to the scene.

Parameter(s):

  • node - The node added to the scene.

void : nodeListChanged()

Signature:“nodeListChanged()”

Transmitted when nodes are added to or removed from the scene.


void : nodeRemoved( DzNode node )

Signature:“nodeRemoved(DzNode*)”

Transmitted when nodes are removed from the scene.

Parameter(s):

  • node - The node removed from the scene.

void : nodeSelectionListChanged()

Signature:“nodeSelectionListChanged()”

Transmitted after the node selection list changes.


void : playbackFinished()

Signature:“playbackFinished()”

Transmitted when playback of the scene stops.


void : playbackStarted()

Signature:“playbackStarted()”

Transmitted when playback of the scene begins.


void : playRangeChanged( DzTimeRange range )

Signature:“playRangeChanged(const DzTimeRange&)”

Transmitted after the scene play range is changed.

Parameter(s):

  • range - The new play range of the scene.

void : primarySelectionChanged( DzNode node )

Signature:“primarySelectionChanged(DzNode*)”

Transmitted when the primary node selection changes.

Parameter(s):

  • node - The new primary selection of the scene.

void : renderFinished( DzRenderer r )

Signature:“renderFinished(DzRenderer*)”

Emitted just after the scene is rendered.

Parameter(s):

  • renderer - The renderer that rendered the scene.

void : sceneCleared()

Signature:“sceneCleared()”

Transmitted after the scene gets cleared.


void : sceneClearStarting()

Signature:“sceneClearStarting()”

Emitted just before the scene is cleared.


void : sceneFilenameChanged( String newName )

Signature:“sceneFilenameChanged(const QString&)”

Transmitted when the name of the current scene file has changed.

Parameter(s):

  • newName - The new name of the scene file.

void : sceneLoaded()

Signature:“sceneLoaded()”

Transmitted after loading a scene file. This may not always be emitted after every sceneLoadStarting() signal if there were errors during file loading.


void : sceneLoadStarting()

Signature:“sceneLoadStarting()”

Transmitted just before loading a scene.


void : sceneSaved( String filename )

Signature:“sceneSaved( String )”

Transmitted after saving a scene file. This may not always be emitted after every sceneSaveStarting() signal if there were errors during file saving.


void : sceneSaveStarting( String filename )

Signature:“sceneSaveStarting( String )”

Transmitted just before saving a scene.


void : sceneTopologyChanged()

Signature:“sceneTopologyChanged()”

Transmitted just after the scene topology has changed.

Since:

  • 4.6.0.91

void : singletonNodeAdded( DzNode node )

Signature:“singletonNodeAdded(DzNode*)”

Emitted as single node is being added to the scene.

Since:

  • 4.12.2.41

void : skeletonAdded( DzSkeleton node )

Signature:“skeletonAdded(DzSkeleton*)”

Transmitted when skeletons are added to the scene.

Parameter(s):

  • node - The skeleton added to the scene.

void : skeletonListChanged()

Signature:“skeletonListChanged()”

Transmitted when skeletons are added to or removed from the scene.


void : skeletonRemoved( DzSkeleton node )

Signature:“skeletonRemoved(DzSkeleton*)”

Transmitted when skeletons are removed from the scene.

Parameter(s):

  • node - The skeleton removed from the scene.

void : skeletonSelectionListChanged()

Signature:“skeletonSelectionListChanged()”

Transmitted after the skeleton selection list changes.


void : timeChanged( DzTime time )

Signature:“timeChanged(DzTime)”

Transmitted after the scene time is changed.

Parameter(s):

  • time - The new time of the scene.

void : timeChanging( DzTime newTime )

Signature:“timeChanging(DzTime)”

Transmitted when time is about to change.

Parameter(s):

  • newTime - The new time of the scene.

void : timeSelectionChanged()

Signature:“timeSelectionChanged()”

Transmitted after the scene time selection is changed.


void : timeStepChanged( DzTime time )

Signature:“timeStepChanged(DzTime)”

Transmitted after the scene time step is changed.

Parameter(s):

  • time - The new time step of the scene.

void : wsModifierAdded( wsmodifier_dz modifier )

Signature:“wsModifierAdded(DzWSModifier*)”

Transmitted when world-space modifiers are added to the scene.

Parameter(s):

  • modifier - The modifier added to the scene.

void : wsModifierRemoved( wsmodifier_dz modifier )

Signature:“wsModifierRemoved(DzWSModifier*)”

Transmitted when world-space modifiers are removed from the scene.

Parameter(s):

  • modifier - The modifier removed from the scene.

void : wsModifierStackChanged()

Signature:“wsModifierStackChanged()”

Transmitted when world-space modifiers are added to or removed from the scene.