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 )
DzMorphcreateMorph ( DzNode bone, String name, Array deltas, Boolean overwrite )
DzPropertyfindControlProperty ( String propertyName, DzNode node, Boolean recurse, Boolean nameLabelMatch=false )
DzPropertyfindProperty ( String propName, DzElement elem )
DzPropertyfindPropertyByInternalName ( String internalName, DzElement elem )
DzPropertyfindPropertyByLabel ( String label, DzElement elem )
DzPropertyfindPropertyInGroup ( String propertyName, DzPropertyGroup group, Boolean traverse, Boolean recurse, Boolean nameLabelMatch=false )
DzPropertyfindPropertyOnMaterial ( String propName, DzMaterial material )
DzPropertyfindPropertyOnMaterialByInternalName ( String internalName, DzMaterial material )
DzPropertyfindPropertyOnMaterialByLabel ( String label, DzMaterial material )
DzPropertyfindPropertyOnNode ( String propName, DzNode node )
DzPropertyfindPropertyOnNodeByInternalName ( String internalName, DzNode node )
DzPropertyfindPropertyOnNodeByLabel ( String label, DzNode node )
DzMaterialgetDisplayMaterial ( DzProperty prop )
DzNodegetDisplayNode ( DzProperty prop )
DzERCLinkgetErcController ( DzProperty controlledProp, DzProperty controllingProp )
StringgetInternalName ( DzProperty prop )
StringgetLabel ( DzProperty prop )
DzMaterialgetMaterial ( DzProperty prop )
StringgetMaterialName ( DzProperty prop )
StringgetMaterialType ( 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 )
ArraygetPropertiesOnMaterial ( DzProperty prop, Boolean includeProviders=true )
ArraygetPropertiesOnMaterial ( DzMaterial material, Boolean includeProviders=true )
ArraygetPropertiesOnNode ( DzProperty prop, Boolean includeModifiers=true )
ArraygetPropertiesOnNode ( DzNode node, 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 )
DzPropertyisMaterialProperty ( DzProperty prop )
DzPropertyisModifierProperty ( DzProperty prop )
DzPropertyisMorphProperty ( DzProperty prop )
DzPropertyisNodeProperty ( DzProperty prop )
DzPropertyisSimulationSettingsProviderProperty ( 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:


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

Parameter(s):

  • node - The DzNode with the DzObject to create the DzMorph on.
  • name - The name of the DzMorph 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 DzMorph 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 : findProperty( String propName, DzElement elem )

Parameter(s):

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

Return Value:

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

Since:

  • 4.11.0.232

DzProperty : findPropertyByInternalName( String internalName, DzElement elem )

Parameter(s):

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

Return Value:

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

Since:

  • 4.11.0.232

DzProperty : findPropertyByLabel( String label, DzElement elem )

Parameter(s):

  • label - The label of the property to find.
  • elem - The element to search.

Return Value:

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

Since:

  • 4.11.0.232

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 : findPropertyOnMaterial( String propName, DzMaterial material )

Parameter(s):

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

Return Value:

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

Since:

  • 4.11.0.233

DzProperty : findPropertyOnMaterialByInternalName( String internalName, DzMaterial material )

Parameter(s):

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

Return Value:

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

Since:

  • 4.11.0.233

DzProperty : findPropertyOnMaterialByLabel( String label, DzMaterial material )

Parameter(s):

  • label - The label of the property to find.
  • material - The material to search.

Return Value:

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

Since:

  • 4.11.0.233

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):

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

Return Value:

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

DzMaterial : getDisplayMaterial( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • The DzMaterial associated with the display of prop.

Since:

  • 4.11.0.233

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.

DzMaterial : getMaterial( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

Since:

  • 4.11.0.233

String : getMaterialName( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

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

Since:

  • 4.11.0.233

String : getMaterialType( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

  • A string representation of the property type of prop; “General”, “Simulation Settings” or “Unknown”.

Since:

  • 4.11.0.233

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 : getPropertiesOnMaterial( DzProperty prop, Boolean includeProviders=true )

Parameter(s):

  • prop - The property to get the material from.
  • includeProviders - Whether or not to include the properties of settings providers.

Return Value:

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

Since:

  • 4.11.0.223

Array : getPropertiesOnMaterial( DzMaterial material, Boolean includeProviders=true )

Parameter(s):

  • material - The material to get the properties from.
  • includeProviders - Whether or not to include the properties of settings providers.

Return Value:

  • All properties associated with the material.

Since:

  • 4.11.0.223

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 : 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 : 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 DzDFormModifier, 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 : isMaterialProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

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

Since:

  • 4.11.0.233

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 DzMorph, 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.

DzProperty : isSimulationSettingsProviderProperty( DzProperty prop )

Parameter(s):

  • prop - The property in question.

Return Value:

Since:

  • 4.11.0.233

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 DzPropertyGroup path (and appropriate geometryregion_dz) 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.