DAZ Script | |
---|---|
Boolean | executeNodePostCreateScript ( DzNode node, String settingsBase ) |
String | getLabelNumber ( String label ) |
String | getNameNumber ( String name ) |
String | stripLabelNumber ( String label ) |
String | stripNameNumber ( String name ) |
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.
Enumerated open methods.
—–
Enumerated flags for determining what to include when calculating the scene bounding box.
Holds the asset id for the current scene.
Since:
Holds whether or not the asset for this modifier needs to be saved. (Read Only)
Since:
Holds the asset URI for the current scene. (Read Only)
Since:
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):
Return Value:
true
if the node is valid, the node post-create script exists and can be loaded/executed without error, otherwise false
.Since:
String : getLabelNumber( String label )
Parameter(s):
Return Value:
Since:
See Also:
String : getNameNumber( String name )
Parameter(s):
Return Value:
Since:
See Also:
String : stripLabelNumber( String label )
Parameter(s):
Return Value:
label
with the number suffix(es) removed (if any), otherwise label
.See Also:
String : stripNameNumber( String name )
Parameter(s):
Return Value:
name
with the “ #” suffix removed (if any), otherwise name
.Since:
See Also:
DzError : addDataItem( DzSceneData item )
Adds a scene data item to the scene.
Parameter(s):
Return Value:
Boolean : addNode( DzNode node )
Adds a node to the scene if it is not already in the scene.
Parameter(s):
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):
Return Value:
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):
Return Value:
DzCamera : findCameraByLabel( String label )
Attempts to find a camera with the given label in the scene.
Parameter(s):
Return Value:
DzSceneData : findDataItem( String name )
Return Value:
name
(if any), otherwise null.DzLight : findLight( String name )
Attempts to find a light with the given name in the scene.
Parameter(s):
Return Value:
DzLight : findLightByLabel( String label )
Attempts to find a light with the given label in the scene.
Parameter(s):
Return Value:
DzMaterial : findMaterialByElementID( Number id )
Parameter(s):
Return Value:
See Also:
DzModifier : findModifierByElementID( Number id )
Parameter(s):
Return Value:
See Also:
DzNode : findNode( String name )
Attempts to find a node with the given name in the scene.
Parameter(s):
Return Value:
DzNode : findNodeByElementID( Number id )
Parameter(s):
Return Value:
See Also:
DzNode : findNodeByLabel( String label )
Attempts to find a node with the given label in the scene.
Parameter(s):
Return Value:
Number : findNodeIndex( DzNode node )
Parameter(s):
Return Value:
DzObject : findObjectByElementID( Number id )
Parameter(s):
Return Value:
See Also:
DzShape : findShapeByElementID( Number id )
Parameter(s):
Return Value:
See Also:
DzNode : findSingletonNode( String guidStr )
Attempts to find a singleton node with the given identifier in the scene.
Parameter(s):
Return Value:
Since:
DzSkeleton : findSkeleton( String name )
Attempts to find a skeleton with the given name in the scene.
Parameter(s):
Return Value:
DzSkeleton : findSkeletonByLabel( String label )
Attempts to find a skeleton with the given label in the scene.
Parameter(s):
Return Value:
Number : findSkeletonIndex( DzSkeleton skeleton )
Parameter(s):
Return Value:
void : finishTimeEdit()
Ends a time editing operation started with a call to beginTimeEdit().
Return Value:
See Also:
Return Value:
DzAudioClip : getAudio()
Return Value:
See Also:
Return Value:
Return Value:
Since:
Return Value:
See Also:
DzBox3 : getBoundingBox( Number flags=DzIncludeAllFlag )
Calculate the bounding box for the current scene.
Parameter(s):
Return Value:
DzCamera : getCamera( Number index )
Parameter(s):
Return Value:
Array : getCameraList()
Return Value:
DzSceneData : getDataItem( Number index )
Parameter(s):
Return Value:
Array : getDataItemList()
Return Value:
String : getFilename()
Return Value:
See Also:
Return Value:
See Also:
Return Value:
DzLight : getLight( Number index )
Parameter(s):
Return Value:
Array : getLightList()
Return Value:
DzNode : getNode( Number index )
Parameter(s):
Return Value:
Array : getNodeList()
Return Value:
Number : getNumCameras()
Return Value:
Return Value:
Number : getNumLights()
Return Value:
Number : getNumNodes()
Return Value:
Number : getNumSelectedCameras()
Return Value:
Number : getNumSelectedLights()
Return Value:
Number : getNumSelectedNodes()
Return Value:
Number : getNumSelectedSkeletons()
Return Value:
Number : getNumSelectedTimeRanges()
Return Value:
Return Value:
Number : getNumStorablesInScene()
Return Value:
Return Value:
Return Value:
See Also:
Return Value:
true
if light preview is enabled, otherwise false
.DzNode : getPrimarySelection()
Return Value:
DzCamera : getSelectedCamera( Number index )
Parameter(s):
Return Value:
index
in the list of selected cameras (if valid), otherwise null.Array : getSelectedCameraList()
Return Value:
DzLight : getSelectedLight( Number index )
Parameter(s):
Return Value:
index
in the list of selected lights (if valid), otherwise null.Array : getSelectedLightList()
Return Value:
DzNode : getSelectedNode( Number index )
Parameter(s):
Return Value:
index
in the list of selected nodes (if valid), otherwise null.Return Value:
DzSkeleton : getSelectedSkeleton( Number index )
Parameter(s):
Return Value:
index
in the list of selected skeletons (if valid), otherwise null.Array : getSelectedSkeletonList()
Return Value:
DzSkeleton : getSkeleton( Number index )
Parameter(s):
Return Value:
Array : getSkeletonList()
Return Value:
Return Value:
Return Value:
See Also:
DzTime : getTimeStep()
Return Value:
See Also:
String : getUniqueTopLevelLabel( String label, DzNode node=null )
Parameter(s):
Return Value:
label
if the value provided is already unique, otherwise label
with a suffix that causes it to be unique.Attention:
String : getUniqueTopLevelName( String name, DzNode node=null )
Parameter(s):
Return Value:
name
if the value provided is already unique, otherwise name
with a suffix that causes it to be unique.Attention:
Since:
wsmodifier_dz : getWSModifier( Number index )
Parameter(s):
Return Value:
Return Value:
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.Return Value:
true
if the scene is currently in a loading operation, otherwise false
.Return Value:
true
if the looping of playback is enabled, otherwise false
.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):
Return Value:
See Also:
void : loopPlayback( Boolean onOff )
Sets looping of playback on/off.
Parameter(s):
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.
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):
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:
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):
Return Value:
Boolean : removeNode( DzNode node )
Removes the given node from the scene.
Parameter(s):
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):
Return Value:
DzError : saveScene( String filename=“” )
Saves the entire scene to file.
Parameter(s):
Return Value:
See Also:
void : saveThumbnail( String filename )
Saves a thumbnail-size OpenGL render of the current viewport to the given file name.
Parameter(s):
void : selectAllNodes( Boolean onOff )
Sets the selection state for all nodes in the scene.
Parameter(s):
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):
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):
true
, all ranges are selected. If false
, all ranges are deselected.void : setAnimRange( DzTimeRange range )
Sets the animation range for the scene.
Parameter(s):
See Also:
void : setAssetLoadPath( String absolutePath )
Sets the asset load path of this scene.
Parameter(s):
void : setAudio( DzAudioClip audio, Number startFrame=0 )
Sets the current audio object and the frame on which it should start playing.
Parameter(s):
See Also:
void : setBackdrop( DzBackdrop backdrop )
Sets the backdrop object.
Parameter(s):
See Also:
void : setFrame( Number frame )
Set the scene time to the given frame based on current time step.
Parameter(s):
See Also:
void : setHighlightNode( DzNode node )
Sets the currently highlighted node. This is typically called from DzViewTool-derived classes.
Parameter(s):
void : setPlayRange( DzTimeRange range )
Sets the play range for the scene.
Parameter(s):
See Also:
void : setPreviewLights( Boolean onoff )
Sets whether or not light preview is enabled or disabled.
Parameter(s):
true
, the light preview is enabled.Boolean : setPrimarySelection( DzNode node )
Sets the node to use as the primary selection.
Parameter(s):
Return Value:
true
if the node was made the new primary selection, otherwise false
.Set the scene time to the given time.
Parameter(s):
See Also:
void : setTimeStep( DzTime time )
Sets the Frame rate for the scene.
Parameter(s):
See Also:
void : stepTime( Number nFrames=1, Boolean forward=true )
Step time forward/back by number of frames.
Parameter(s):
true
, current frame count is increased nFrames. If false
, current frame count is decreased.void : update()
Recursively updates all nodes in the scene.
void : aboutToRemoveNode( DzNode node )
Signature:“aboutToRemoveNode(DzNode*)”
Transmitted immediately before a node is removed from the scene.
Parameter(s):
void : aboutToRender( DzRenderer r )
Signature:“aboutToRender(DzRenderer*)”
Emitted just before the scene is rendered.
Parameter(s):
void : animRangeChanged( DzTimeRange range )
Signature:“animRangeChanged(const DzTimeRange&)”
Transmitted after the scene play range is changed.
Parameter(s):
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):
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):
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):
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):
void : lightAdded( DzLight node )
Signature:“lightAdded(DzLight*)”
Transmitted when lights are added to the scene.
Parameter(s):
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):
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):
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):
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):
void : primarySelectionChanged( DzNode node )
Signature:“primarySelectionChanged(DzNode*)”
Transmitted when the primary node selection changes.
Parameter(s):
void : renderFinished( DzRenderer r )
Signature:“renderFinished(DzRenderer*)”
Emitted just after the scene is rendered.
Parameter(s):
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):
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:
void : singletonNodeAdded( DzNode node )
Signature:“singletonNodeAdded(DzNode*)”
Emitted as single node is being added to the scene.
Since:
void : skeletonAdded( DzSkeleton node )
Signature:“skeletonAdded(DzSkeleton*)”
Transmitted when skeletons are added to the scene.
Parameter(s):
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):
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):
void : timeChanging( DzTime newTime )
Signature:“timeChanging(DzTime)”
Transmitted when time is about to change.
Parameter(s):
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):
void : wsModifierAdded( wsmodifier_dz modifier )
Signature:“wsModifierAdded(DzWSModifier*)”
Transmitted when world-space modifiers are added to the scene.
Parameter(s):
void : wsModifierRemoved( wsmodifier_dz modifier )
Signature:“wsModifierRemoved(DzWSModifier*)”
Transmitted when world-space modifiers are removed from the scene.
Parameter(s):
void : wsModifierStackChanged()
Signature:“wsModifierStackChanged()”
Transmitted when world-space modifiers are added to or removed from the scene.