User Tools

Site Tools


DzSceneHelper

Convenience object to make working with DzNode and DzProperty objects easier.

More...

Inherits :

Constructors

DAZ Script
DzSceneHelper ()

Methods

DAZ Script
ArraycollectNodes ( Boolean selectedOnly, Boolean boneTopSelected, Boolean boneSkeleton )
DzERCLinkcreateLink ( DzNode bone, String propertyName, DzNode controlBone, String controllerName, Number type, Number scalar, Number addend )
morph_dzcreateMorph ( DzNode bone, String name, Array deltas, Boolean overwrite )
DzPropertyfindControlProperty ( String propertyName, DzNode node, Boolean recurse, Boolean nameLabelMatch=false )
DzPropertyfindPropertyInGroup ( String propertyName, DzPropertyGroup group, Boolean traverse, Boolean recurse, Boolean nameLabelMatch=false )
DzPropertyfindPropertyOnNode ( String propName, DzNode node )
DzPropertyfindPropertyOnNodeByInternalName ( String internalName, DzNode node )
DzPropertyfindPropertyOnNodeByLabel ( String label, DzNode node )
DzNodegetDisplayNode ( DzProperty prop )
DzERCLinkgetErcController ( DzProperty controlledProp, DzProperty controllingProp )
StringgetInternalName ( DzProperty prop )
StringgetLabel ( DzProperty prop )
NumbergetMax ( DzProperty prop )
NumbergetMin ( DzProperty prop )
DzNodegetNode ( DzProperty prop )
StringgetNodeName ( DzProperty prop )
StringgetNodeType ( DzProperty prop )
ArraygetPrivatePropertiesOnNode ( DzProperty prop )
ArraygetPrivatePropertiesOnNode ( DzNode node )
ArraygetPropertiesOnElement ( DzElement elem )
ArraygetPropertiesOnNode ( DzNode node, Boolean includeModifiers=true )
ArraygetPropertiesOnNode ( DzProperty prop, Boolean includeModifiers=true )
ArraygetRegionPropertiesOnNode ( DzNode node )
ArraygetRegionPropertiesRecurse ( geometryregion_dz region )
StringgetUniqueMorphName ( DzNode node, String name )
BooleanhelperCanRemove ( DzProperty prop )
BooleanhelperRemoveProperty ( DzProperty prop )
BooleanisAtDefaultValue ( DzProperty prop )
BooleanisControlledByTransform ( DzProperty prop, Boolean recurse=true )
DzPropertyisDFormModProperty ( DzProperty prop )
DzPropertyisLegacyJointProperty ( DzProperty prop )
BooleanisLegacyProperty ( DzProperty prop )
DzPropertyisModifierProperty ( DzProperty prop )
DzPropertyisMorphProperty ( DzProperty prop )
DzPropertyisNodeProperty ( DzProperty prop )
BooleanisTransform ( DzProperty prop )
DzPropertyisTransformProperty ( DzProperty prop )
BooleansetInternalName ( DzProperty prop, String name )
voidsetMax ( DzProperty prop, Number max )
voidsetMin ( DzProperty prop, Number min )
voidsetMinMax ( DzProperty prop, Number min, Number max )
voidsetPropertyPath ( DzProperty prop, String inPath )
voidsetUniqueName ( DzNode node, String name )

Detailed Description

TODO: Add detailed description.

Constructors


DzSceneHelper()

Default Constructor

Methods


Array : collectNodes( Boolean selectedOnly, Boolean boneTopSelected, Boolean boneSkeleton )

Parameter(s):

  • selectedOnly - Whether or not to limit the nodes to only those that are selected.
  • boneTopSelected - Whether or not to climb the lineage of any DzBone encountered, and instead collect the top-most selected.
  • boneSkeleton - Whether or not to collect the DzSkeleton when a DzBone is encountered; overrides boneTopSelected.

Return Value:

  • An list of the collected unique nodes.

DzERCLink : createLink( DzNode bone, String propertyName, DzNode controlBone, String controllerName, Number type, Number scalar, Number addend )

Parameter(s):

  • node - The DzNode with the DzNumericProperty to be controlled.
  • propertyName - The name of the DzNumericProperty to be controlled.
  • controlNode - The DzNode with the DzNumericProperty used to control.
  • controllerName - The name of the DzNumericProperty used to control.
  • type - The type of calculation this link performs.
  • scalar - The value of the multiplier for the link.
  • addend - The value of the additive offset for the link.

Return Value:

  • The ERC link created, or NULL.

See Also:


morph_dz : createMorph( DzNode bone, String name, Array deltas, Boolean overwrite )

Parameter(s):

  • node - The DzNode with the DzObject to create the morph_dz on.
  • name - The name of the morph_dz to create.
  • deltas - A two dimensional Array, an array of 4 element arrays, where the first element of each array is the index of the vertex to set delta values for, the second element is the X-axis value for the delta, the third element is the Y-axis value for the delta, and the fourth element is the Z-axis value for the delta.
  • overwrite - Whether or not to replace a morph_dz named name.

Return Value:

  • The morph created, or NULL if the morph could not be created.

See Also:


DzProperty : findControlProperty( String propertyName, DzNode node, Boolean recurse, Boolean nameLabelMatch=false )

Parameter(s):

  • propertyName - The name of the property to find the control property for.
  • node - The node to find propertyName on.
  • recurse - If node is a DzSkeleton and propertyName cannot be found using findPropertyInGroup(), determines whether to attempt locating propertyName on one of the DzBone owned by the skeleton.
  • nameLabelMatch - Whether the name and label of the property must match propertyName.

Return Value:

  • The first control property of the property with the given internal name, or NULL.

See Also:


DzProperty : findPropertyInGroup( String propertyName, DzPropertyGroup group, Boolean traverse, Boolean recurse, Boolean nameLabelMatch=false )

Parameter(s):

  • propertyName - The name of the property to find.
  • group - The DzPropertyGroup to find propertyName in.
  • traverse - If propertyName cannot be found in group, determines whether to attempt locating propertyName in the DzPropertyGroup siblings of group.
  • recurse - If propertyName cannot be found in group, determines whether to attempt locating propertyName in the DzPropertyGroup children of group.
  • nameLabelMatch - Whether the name and label of the property must match propertyName.

Return Value:

  • The first property with the given internal name, or NULL.

DzProperty : findPropertyOnNode( String propName, DzNode node )

Parameter(s):

  • propName - The name of the property to find.
  • node - The node to search.

Return Value:

  • The first property with the given internal name, or NULL.

DzProperty : findPropertyOnNodeByInternalName( String internalName, DzNode node )

Parameter(s):

  • internalName - The internal name of the property to find.
  • node - The node to search.

Return Value:

  • The first property with the given internal name, or NULL.

DzProperty : findPropertyOnNodeByLabel( String label, DzNode node )

Parameter(s):

  • propName - The label of the property to find.
  • node - The node to search.

Return Value:

  • The first property with the given label, or NULL.

DzNode : getDisplayNode( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The DzNode associated with the display of prop.

Since:

  • 4.6.3.45

DzERCLink : getErcController( DzProperty controlledProp, DzProperty controllingProp )

Parameter(s):

  • controlledProp - The property whose controller will be returned.
  • controllingProp - The property to determine which controller is returned.

Return Value:

  • The ERC controller for controlledProp that has the same property as controllingProp. If either parameter is null, or controlledProp does not have a controller that has the same property as controllingProp, NULL.

String : getInternalName( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The internal name of prop (or its alias target), or “Unknown”.

String : getLabel( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The label of prop, or an empty string.

Number : getMax( DzProperty prop )

Gets the maximum value for prop.

Parameter(s):

  • prop - The property to get the max value for.

Return Value:


Number : getMin( DzProperty prop )

Gets the minimum value for prop.

Parameter(s):

  • prop - The property to get the min value for.

Return Value:


DzNode : getNode( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The DzNode associated with prop.

String : getNodeName( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The name of the DzNode associated with prop, or “Unknown” if it has no associated DzNode.

String : getNodeType( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • A string representation of the property type of prop; “Transform”, “General”, “Morph”, “DFormer”, “Poser Joint” or “Unknown”.

Array : getPrivatePropertiesOnNode( DzProperty prop )

Parameter(s):

  • prop - The property to get the DzNode from.

Return Value:

  • All private properties associated with the DzNode that prop is associated with.

Since:

  • 4.6.3.45

Array : getPrivatePropertiesOnNode( DzNode node )

Parameter(s):

  • node - The node to get the properties from.

Return Value:

  • All private properties associated with node.

Since:

  • 4.6.3.45

Array : getPropertiesOnElement( DzElement elem )

Parameter(s):

  • elem - The DzElement to get the list of properties from.

Return Value:

  • The properties that are on elem.

Since:

  • 4.6.3.45

Array : getPropertiesOnNode( DzNode node, Boolean includeModifiers=true )

Parameter(s):

  • node - The node to get the properties from.
  • includeModifiers - Whether or not to include the properties of DzModifiers.

Return Value:

  • All properties associated with the node.

Since:

  • 4.6.3.45

Array : getPropertiesOnNode( DzProperty prop, Boolean includeModifiers=true )

Parameter(s):

  • prop - The property to get the DzNode from.
  • includeModifiers - Whether or not to include the properties of DzModifiers.

Return Value:

  • All properties associated with the DzNode that prop is associated with.

Since:

  • 4.6.3.45

Array : getRegionPropertiesOnNode( DzNode node )

Parameter(s):

  • node - The node to get the properties from.

Return Value:

  • All region properties associated with node.

Since:

  • 4.6.3.45

Array : getRegionPropertiesRecurse( geometryregion_dz region )

Parameter(s):

Return Value:

  • All region properties associated with region.

Since:

  • 4.6.3.45

String : getUniqueMorphName( DzNode node, String name )

Parameter(s):

Return Value:

  • The unique name for the morph.

Boolean : helperCanRemove( DzProperty prop )

Parameter(s):

  • prop - The property to check whether the helper can remove.

Return Value:

  • true if the the helper can remove prop, otherwise false.

Since:

  • 4.6.3.45

Boolean : helperRemoveProperty( DzProperty prop )

Parameter(s):

  • prop - The property to remove.

Return Value:

  • true if the helper successfully removed the property, otherwise false.

Since:

  • 4.6.3.45

Boolean : isAtDefaultValue( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • true if prop inherits DzNumericProperty and its raw and default values are the same, otherwise false.

Boolean : isControlledByTransform( DzProperty prop, Boolean recurse=true )

Parameter(s):

  • prop - The property in question.
  • recurse - If true (default), the controller hierarchy is recursed.

Return Value:

  • true if prop is controlled by a transform property, otherwise false.

Since:

  • 4.9.4.86

DzProperty : isDFormModProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The given property (or its alias target) if it's owner is a dformmodifier_dz, otherwise NULL.

DzProperty : isLegacyJointProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The given property (or its alias target) if it's owner is a legacyjoint_dz, otherwise NULL.

Boolean : isLegacyProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • true if the given property (or its alias target) is a legacy property (internal name begins with PBMCC or PBMDC), otherwise false.

DzProperty : isModifierProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The given property (or its alias target) if it's owner is a DzModifier, otherwise NULL.

DzProperty : isMorphProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The given property (or its alias target) if it's owner is a morph_dz, otherwise NULL.

DzProperty : isNodeProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The given property (or its alias target) if it's owner is a DzNode, otherwise NULL.

Boolean : isTransform( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • true if the given property is a transform property, otherwise false.

Since:

  • 4.9.4.86

DzProperty : isTransformProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The given property (or its alias target) if it is a transform property, otherwise NULL.

Boolean : setInternalName( DzProperty prop, String name )

Attempts to rename prop to name. If the property is a morph property or a DForm modifier property then the modifier is renamed to name. If any other property associated with the node that this property is associated with has the same internal name as name, this method returns false.

Parameter(s):

  • prop - The property to change.
  • name - The new internal name for the property.

Return Value:

  • true if the rename was successful, otherwise false.

void : setMax( DzProperty prop, Number max )

Sets the maximum value for prop. This method only applies if prop is non-null and inherits either DzFloatProperty or DzIntProperty. Otherwise this method has no effect.

Parameter(s):

  • prop - The property whose maximum value is to be set.
  • max - The value to set. If prop inherits DzIntProperty, max is truncated (not rounded).

void : setMin( DzProperty prop, Number min )

Sets the minimum value for prop. This method only applies if prop is non-null and inherits either DzFloatProperty or DzIntProperty. Otherwise this method has no effect.

Parameter(s):

  • prop - The property whose minimum value is to be set.
  • min - The value to set. If prop inherits DzIntProperty, min is truncated (not rounded).

void : setMinMax( DzProperty prop, Number min, Number max )

Essentially behaves the same as calling both DzSceneHelper::setMin() and DzSceneHelper::setMax().

Parameter(s):

  • prop - The property to set min and max values for.
  • min - The new min value for the given property.
  • max - The new max value for the given property.

void : setPropertyPath( DzProperty prop, String inPath )

Sets the DzPropertyGoup path (and appropriate DzGeoemtryRegion) for the given property.

Parameter(s):

  • prop - The property to change the path of.
  • inPath - The new path for the given property.

void : setUniqueName( DzNode node, String name )

Sets the name of node to a unique version of name.

Parameter(s):

  • node - The node to set the unique name of.
  • name - The name to make unique.