User Tools

Site Tools


DzObject

The main object class.

More...

Inherits :

Constructors

DAZ Script
DzObject ()

Methods

Signals

Detailed Description

Responsible for evaluating the geometry pipeline, including caching and drawing of the world-space transformed shape. Can have multiple shapes assigned, though only one can be active at a time.

Constructors


DzObject()

Default Constructor.

Methods


DzError : addModifier( DzModifier modifier, Number index=-1 )

Adds a modifier to the modifier stack.

Parameter(s):

  • modifier - The modifier to add to this object's modifier stack.
  • index - The position in the list to insert the modifer. If this is less than 0 (default), the modifier is appended to the end of the list.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

DzError : addShape( DzShape shape, Number index=-1 )

Add a shape to this object.

Parameter(s):

  • shape - The shape that will be added to this object's list of possible shapes.
  • index - The position in the list to insert the shape. If this is less than 0 (default), the shape is appended to the end of the list.

DzModifier : findModifier( String name )

Parameter(s):

  • name - The name of the modifier to get.

Return Value:

  • The modifier in the stack with the given name (if any), otherwise NULL.

Number : findModifierIndex( DzModifier mod )

Parameter(s):

  • mod - The modifier to find the index for.

Return Value:

  • The index of the modifier in the modifier stack (if any), otherwise -1.

Number : findModifierIndexFromEnd( DzModifier mod )

Parameter(s):

  • mod - The modifier to find the index for.

Return Value:

  • The index of the modifier in the modifier stack (if any), otherwise -1.

void : forceCacheUpdate( DzNode node, Boolean isRender=false )

TODO: Add description.


DzBox3 : getBoundingBox()

Return Value:

  • A world space bounding box for this object.

DzVertexMesh : getCachedGeom()

Return Value:

  • The final world-space transformed mesh for the current shape.

Attention:

  • Re-evaluates the pipeline if necessary.

DzShape : getCurrentShape()

Get the current shape.

Return Value:

  • The current shape this object is caching/drawing.

DzEnumProperty : getGeometryControl()

Return Value:

  • The property that controls the current shape of this object.

DzBox3 : getLocalBoundingBox()

Return Value:

  • A local space bounding box for this object; cached by the last call to evaluate().

DzOrientedBox3 : getLocalOrientedBox()

Return Value:

  • A local space oriented bounding box for this object; cached by the last call to evaluate().

DzModifier : getModifier( Number which )

Parameter(s):

  • which - The index of the modifier in the stack to get.

Return Value:

  • The modifier at the given position in the modifier stack (if any), otherwise NULL.

Number : getNumModifiers()

Return Value:

  • The number of modifiers in the local modifier stack for this object.

Number : getNumShapes()

Return Value:

  • The number of possible shapes that this object can display.

DzShape : getShape( Number which )

Parameter(s):

  • which - Index of the shape to get.

Return Value:

  • The shape at the given index (if any), otherwise NULL.

void : invalidateCache()

Flags this object to reevaluate its geometry pipeline the next time the cached shape is requested.


Boolean : isBuildingGeom()

Return Value:

  • true when this object is currently building, otherwise false.

Since:

  • 4.12.0.10

Boolean : isBuildingGeomValid()

Return Value:

  • true if the geom that this object is currently building is still valid, otherwise false.

Attention:

  • The result of this call is only valid when isBuildingGeom() is true.

Since:

  • 4.12.0.10

DzError : moveModifier( DzModifier modifier, Number index=-1 )

Moves the modifier from its source object to this object's modifier stack. DZ_ILLEGAL_ARGUMENT_ERROR is returned if there is not a modifier, or if the modifier's element parent is not an object. This move is not undo-able.

Parameter(s):

  • modifier - The modifier to add to this object's modifier stack.
  • index - The position in the list to insert the modifer. If this is less than 0 (default), the modifier is appended to the end of the list.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

DzError : moveShape( DzShape shape, Number index=-1 )

Moves the given shape from its source object to this object. Operation fails if the shape's element parent is not a different dzobject with this shape in its shape list.

Parameter(s):

  • shape - The shape that will be added to this object's list of possible shapes.
  • index - The position in the list to insert the shape. If this is less than 0 (default), the shape is appended to the end of the list.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

DzError : removeAllModifiers()

Removes all the modifiers from the modifier stack.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

DzError : removeAllShapes()

Remove all shapes from this object.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

DzError : removeModifier( DzModifier modifier )

Removes a modifier from the modifier stack.

Parameter(s):

  • modifier - The modifier to remove from this object's modifier stack.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

DzError : removeShape( Number index )

Remove a shape from this object.

Parameter(s):

  • index - The index of the shape to remove from this object's list of possible shapes.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

Signals


void : aboutToAddModifier( DzModifier mod )

Signature:“aboutToAddModifier(DzModifier*)”

Emitted when a modifier is about to be added to this object.

Parameter(s):

  • mod - The modifier that is about to be added to the object.

void : aboutToDelete()

Signature:“aboutToDelete()”

Emitted when this object is about to be deleted.


void : aboutToFinalize( DzVertexMesh mesh )

Signature:“aboutToFinalize(const DzVertexMesh*)”

Emitted when the vertex mesh for this object is about to be finalized.

Parameter(s):

  • mesh - The vertex mesh about to be finalized.

void : cachedGeomFinalized()

Signature:“cachedGeomFinalized()”

Emitted when the cached geometry for this object has been finalized.


void : cachedGeomInvalidated()

Signature:“cachedGeomInvalidated()”

Emitted when the cached geometry for this object has been invalidated.


void : cachedGeomUpdated()

Signature:“cachedGeomUpdated()”

Emitted when the cached geometry for this object has been updated.


void : cachedTopologyChanged()

Signature:“cachedTopologyChanged()”

Emitted when the cached topology for this object has changed.


void : currentShapeSwitched()

Signature:“currentShapeSwitched()”

Emitted when the current shape is swapped out.


void : drawnDataChanged()

Signature:“drawnDataChanged()”

Emitted when this object needs to be redrawn.


void : materialListChanged()

Signature:“materialListChanged()”

Emitted when the material list for the current shape changes.


void : materialSelectionChanged()

Signature:“materialSelectionChanged()”

Emitted when the material selection state for the current shape changes.


void : materialSelectionSetsChanged()

Signature:“materialSelectionSetsChanged()”

Emitted when the material selection state for the current shape changes.


void : modifierAdded( DzModifier mod )

Signature:“modifierAdded(DzModifier*)”

Emitted when a modifier is added to this object.

Parameter(s):

  • mod - The modifier added to the object.

void : modifierRemoved( DzModifier mod )

Signature:“modifierRemoved(DzModifier*)”

Emitted when a modifier is removed from this object.

Parameter(s):

  • mod - The modifier removed from the object.

void : modifierStackChanged()

Signature:“modifierStackChanged()”

Emitted when a modifier is added to or removed from this object.


void : shapeAdded( DzShape shape )

Signature:“shapeAdded(DzShape*)”

Emitted when a shape is added to this object.

Parameter(s):

  • shape - The shape added to the object.

void : shapeRemoved( DzShape shape )

Signature:“shapeRemoved(DzShape*)”

Emitted when a shape is removed from this object.

Parameter(s):

  • shape - The shape removed from the object.

void : shapeTopologyChanged()

Signature:“shapeTopologyChanged()”

Emitted when the topology of the current shape for this object has changed.


void : uvsChanged()

Signature:“uvsChanged()”

Emitted when the current uv set for the object has changed.