User Tools

Site Tools


DzMorphLoader

Implements the loading and application of a morph.

More...

Inherits :

Enumerations

Static Methods

DAZ Script
StringgetPathForContext ( DzWeightMapContext context, DzNode node )

Constructors

DAZ Script
DzMorphLoader ()

Methods

DAZ Script
BooleanapplyReverseDeformationsPose ()
StringcreateMorph ( DzFileIOSettings settings, DzNode node, Boolean onlyErrorsOrWarnings=true, Boolean plainText=true )
StringcreateMorphFromMesh ( DzVertexMesh mesh, DzNode node, Boolean onlyErrorsOrWarnings=true, Boolean plainText=true )
NumbergetAttenuateEdgeStrength ()
StringgetAttenuateMapPath ()
NumbergetAttenuateStrength ()
BooleangetCleanUpOrphans ()
DzNodegetControlNode ()
DzNumericPropertygetControlProperty ()
StringgetControlPropertyCustomLabel ()
NumbergetControlPropertyERCCustomValue ()
DzERCLink::ERCTypegetControlPropertyERCType ()
BooleangetControlPropertyERCUseCustomValue ()
BooleangetControlPropertyUseCustomLabel ()
BooleangetCreateControlProperty ()
NumbergetDeltaTolerance ()
StringgetDisplayName ()
StringgetFilename ()
BooleangetHideSecondaryProperties ()
MirroringTypegetMorphMirroring ()
StringgetMorphName ()
OverwriteModegetOverwriteExisting ()
BooleangetPreserveExistingDeltas ()
StringgetPropertyGroupPath ()
BooleangetReverseDeformations ()
StringgetReverseDeformationsPose ()
BooleanmorphAlreadyExists ( DzNode node )
BooleanreadObjectCommonSettingsFromConfigFile ( String filename )
BooleanreadObjectSettingsFromConfigFile ( String filename, String filePath )
BooleansaveObjectSettingsToConfigFile ( String filename, String projectPath, Boolean saveProjectRelative )
voidsetAttenuateEdgeStrength ( Number val )
voidsetAttenuateMapPath ( String mapPath )
voidsetAttenuateStrength ( Number val )
voidsetCleanUpOrphans ( Boolean onOff )
voidsetControlNode ( DzNode node )
voidsetControlProperty ( DzNumericProperty prop )
voidsetControlPropertyCustomLabel ( String label )
voidsetControlPropertyERCCustomValue ( Number val )
voidsetControlPropertyERCType ( DzERCLink::ERCType type )
voidsetControlPropertyERCUseCustomValue ( Boolean onOff )
voidsetControlPropertyUseCustomLabel ( Boolean onOff )
voidsetCreateControlProperty ( Boolean onOff )
voidsetDeltaTolerance ( Number val )
voidsetDisplayName ( String name )
voidsetFilename ( String filename )
voidsetHideSecondaryProperties ( Boolean onOff )
boolsetLoadMode ( LoadMode mode, DzNode node )
voidsetMorphMirroring ( MirroringType type )
voidsetMorphName ( String name )
voidsetOverwriteExisting ( OverwriteMode mode )
voidsetPreserveExistingDeltas ( Boolean onOff )
voidsetPropertyGroupPath ( String path )
voidsetReverseDeformations ( Boolean onOff )
voidsetReverseDeformationsPose ( String filePath )

Signals

Detailed Description

Since:

  • 4.9.3.46

Attention:

  • This object is provided by the Morph Loader Pro plugin. It is only available when the Morph Loader Pro plugin is activated and enabled.

See Also:

Enumerations


: AttenuateMapType

TODO: Add description.

  • WeightMap - TODO: Add description.
  • FacetList - TODO: Add description.
  • EdgeList - TODO: Add description.
  • VertexList - TODO: Add description.
  • UnknownMap - TODO: Add description.

—–

: LoadMode

TODO: Add description.

  • EntireFigure - TODO: Add description.
  • SelectedNodes - TODO: Add description.
  • PrimaryNode - TODO: Add description.
  • SingleSkinFigure - TODO: Add description.
  • SingleSkinFigureFromGraft - TODO: Add description.

—–

: MirroringType

TODO: Add description.

  • DoNotMirror - TODO: Add description.
  • XSwap - TODO: Add description.
  • XPosToNeg - TODO: Add description.
  • XNegToPos - TODO: Add description.
  • YSwap - TODO: Add description.
  • YPosToNeg - TODO: Add description.
  • YNegToPos - TODO: Add description.
  • ZSwap - TODO: Add description.
  • ZPosToNeg - TODO: Add description.
  • ZNegToPos - TODO: Add description.

—–

: OverwriteMode

TODO: Add description.

  • MakeUnique - TODO: Add description.
  • DeltasAndERCLinks - TODO: Add description.
  • DeltasOnly - TODO: Add description.

Static Methods


String : getPathForContext( DzWeightMapContext context, DzNode node )

Gets the path for a given weight map context and a given node.

Parameter(s):

  • context - The weight map context.
  • node - The node.

Return Value:

  • The path for the weight map context on node.

Constructors


DzMorphLoader()

Default Constructor. Creates a morph loader with default settings.

Methods


Boolean : applyReverseDeformationsPose()

Attempts to load the “reverse deformations pose” file, if specified.

Return Value:

  • true if the file was loaded successfully, otherwise false.

Attention:

See Also:

Since:

  • 4.20.0.36

String : createMorph( DzFileIOSettings settings, DzNode node, Boolean onlyErrorsOrWarnings=true, Boolean plainText=true )

Creates a morph on a node for a geometry loaded from a file. This function supports morph creation from vertex-only geometries.

Parameter(s):

  • settings - The settings to use for loading the geometry; i.e., the scale for the mesh, whether or not to swap the Y and Z coordinates of the mesh, etc.
  • node - The node containing the geometry to create the morph for.
  • onlyErrorsOrWarnings - If true (default), only errors and warnings will be returned.
  • plainText - If true (default), the returned string will be plain text, otherwise the returned string will contain HTML.

Return Value:

  • The log containing messages (if any) about the creation of the morph, otherwise an empty string.

See Also:


String : createMorphFromMesh( DzVertexMesh mesh, DzNode node, Boolean onlyErrorsOrWarnings=true, Boolean plainText=true )

Creates a morph on a node for a geometry. This function supports morph creation from vertex-only geometries.

Parameter(s):

  • mesh - The geometry with the morph information.
  • node - The node containing the geometry to create the morph for.
  • onlyErrorsOrWarnings - If true (default), only errors and warnings will be returned.
  • plainText - If true (default), the returned string will be plain text, otherwise the returned string will contain HTML.

Return Value:

  • The log containing messages (if any) about the creation of the morph, otherwise an empty string.

Since:

  • 4.15.0.6

Number : getAttenuateEdgeStrength()

Return Value:

  • The strength that will be used for attenuating the effect of the morph being loaded on the vertices that reside along the boundary of the current geometric selection.

String : getAttenuateMapPath()

Return Value:

  • The path to the map that will be used for attenuating the effect of the morph.

Number : getAttenuateStrength()

Return Value:

  • The strength that the map used to attenuate the effect of the morph will be applied at.

Boolean : getCleanUpOrphans()

Gets whether or not orphans should be cleaned up when overwriting existing morphs. An 'orphan' is a morph by the same name that does not have any deltas from a new morph.

Return Value:

  • true if orphans are to be cleaned up when overwriting existing morphs, otherwise false.

DzNode : getControlNode()

Return Value:

  • The node that the control property will be located on.

Attention:


DzNumericProperty : getControlProperty()

Return Value:

  • The property that will serve as the additional control property for the morph(s) created.

Attention:


String : getControlPropertyCustomLabel()

Return Value:

  • The custom label that will be used for secondary (non-control) properties.

Attention:


Number : getControlPropertyERCCustomValue()

Return Value:

  • The custom value for creating ERC links to the control property.

Attention:


DzERCLink::ERCType : getControlPropertyERCType()

Return Value:

  • The ERC type to use when connecting secondary properties to the control property.

Boolean : getControlPropertyERCUseCustomValue()

Return Value:

  • true if a custom value will be used for the ERC links to the control property, otherwise false.

Attention:


Boolean : getControlPropertyUseCustomLabel()

Return Value:

  • true if a custom label will be used for the secondary (non-control) properties, otherwise false.

Attention:


Boolean : getCreateControlProperty()

Return Value:

  • true if the loader will create and use ERC links to an additional control property.

Number : getDeltaTolerance()

Gets the minimum amount of deviation from the original position of a given vertex that will be recorded in the morph.

Return Value:

  • The minimum amount of deviation from the original position of a given vertex to be recorded in the morph.

String : getDisplayName()

Return Value:

  • The name to display for this collection of settings.

Since:

  • 4.15.0.7

String : getFilename()

Return Value:

  • The full path to the file that this morph will load its geometry from.

Boolean : getHideSecondaryProperties()

Return Value:

  • true if secondary (non-control) properties are hidden, otherwise false.

Attention:


MirroringType : getMorphMirroring()

Gets the type of mirroring to apply.

Return Value:

  • The type of mirroring that will be applied to the morph.

String : getMorphName()

Return Value:

  • The name of the morph(s) that will be created by this morph loader.

OverwriteMode : getOverwriteExisting()

Return Value:

  • true if an existing morph by the same name will be replaced, otherwise false.

Boolean : getPreserveExistingDeltas()

Return Value:

  • true if existing deltas in a morph by the same name be preserved, otherwise false.

String : getPropertyGroupPath()

Return Value:

  • The path of the property group that morph value properties will be added to.

Boolean : getReverseDeformations()

Return Value:

  • true if joint deformations and other modifiers will be reversed from the current world-space geometry to calculate the deltas, otherwise false.

String : getReverseDeformationsPose()

Return Value:

  • The path of the pose file to be applied to the figure before a morph is loaded.

Boolean : morphAlreadyExists( DzNode node )

Parameter(s):

  • node - The node to check for the morph.

Return Value:

  • true if the morph of the same name already exists, otherwise false.

Boolean : readObjectCommonSettingsFromConfigFile( String filename )

Reads common object settings from a configuration file (*.dsx).

Parameter(s):

  • filename - The full path of the file to read.

Return Value:

  • true if the file was successfully read, otherwise false.

Since:

  • 4.9.3.47

Boolean : readObjectSettingsFromConfigFile( String filename, String filePath )

Reads the settings of the first object in a configuration file (*.dsx).

Parameter(s):

  • filename - The name of the file to read.
  • filePath - The path of the directory that the file to read is in.

Return Value:

  • true if the read was successful, otherwise false. (since 4.15.0.4)

Since:

  • 4.9.3.47

Boolean : saveObjectSettingsToConfigFile( String filename, String projectPath, Boolean saveProjectRelative )

Saves object settings to a configuration file (*.dsx).

Parameter(s):

  • filename - The full path of the file to write to.
  • projectPath - The full path of the directory containing the files of a project.
  • relativeToProject - If true, filename is saved relative to projectPath. If false, filename is considered to be absolute and projectPath is ignored.

Return Value:

  • true if the save was successful, otherwise false. (since 4.15.0.4)

Since:

  • 4.9.3.47

void : setAttenuateEdgeStrength( Number val )

Sets the strength to use for attenuating the effect of the morph on the vertices that reside along the boundary of the current geometric selection.

Parameter(s):

  • val - The strength value to set. A value of 0 yields no (0%) attenuation. A value of 1 yields full (100%) attenuation. Values between 0 and 1 yield attenuation that is commensurate with the specified value.

Attention:

  • This value is ignored when a weight map is used for attenuation.

See Also:


void : setAttenuateMapPath( String mapPath )

Sets the path to the map used to attenuate the effect of the morph.

Parameter(s):

  • mapPath - The path to the map.

Attention:

  • The value of mapPath must follow one of these patterns:
  • <NodeName>facetlist::facegroup::<FaceGroupName>
  • <NodeName>facetlist::surface::<SurfaceName>
  • <NodeName>facetlist::selecitonset::<SelectionSetName>
  • <NodeName>edgelist::selecitonset::<SelectionSetName>
  • <NodeName>vertexlist::selecitonset::<SelectionSetName>
  • <NodeName>weightmap::<WeightMapName>
  • <MapNodeName>weightmap::<WeightMapName>
  • <MapNodeName>weightmap::<NodeName>/<WeightMapName>

See Also:


void : setAttenuateStrength( Number val )

Sets the strength to apply the map used to attenuate the effect of the morph.

Parameter(s):

  • val - The strength value to set. A value of 1.0 will cause the values in the map to be applied at their full respective values. A value of 0.0 will cause the values in the map to not be applied. A value of -1.0 will cause the values in the map to be inverted and applied at the opposite of their full respective values.

void : setCleanUpOrphans( Boolean onOff )

Sets whether or not orphans should be cleaned up when overwriting existing morphs. An 'orphan' is a morph by the same name that does not have any deltas from a new morph.

Parameter(s):

  • onOff - If true, orphans will be cleaned up.

void : setControlNode( DzNode node )

Sets the node that the control property will be located on.

Parameter(s):

  • node - The node that will own the control property.

Attention:


void : setControlProperty( DzNumericProperty prop )

Sets the property that will serve as the additional control property for the morph(s) created by this loader.

Parameter(s):

  • prop - The control property for the new morph(s).

Attention:


void : setControlPropertyCustomLabel( String label )

Sets the custom label that will be used for secondary (non-control) properties.

Parameter(s):

  • label - The custom label to use for the secondary (non-control) properties.

Attention:


void : setControlPropertyERCCustomValue( Number val )

Sets the custom value for creating ERC links to the control property.

Parameter(s):

  • val - The custom multiplier for the ERC links that are created to the control property.

Attention:


void : setControlPropertyERCType( DzERCLink::ERCType type )

Sets the ERC link type to use when connecting secondary properties to the control property.

Parameter(s):

  • type - The ERC link type to use when connecting secondary properties to the control property.

void : setControlPropertyERCUseCustomValue( Boolean onOff )

Sets whether or not a custom value will be used for the ERC links to the control property.

Parameter(s):

  • onOff - If true, a custom value will be used for the links to the control property. Otherwise the default 1:1 ratio is assumed.

Attention:


void : setControlPropertyUseCustomLabel( Boolean onOff )

Sets whether or not a custom label will be used for the secondary (non-control) properties.

Parameter(s):

  • onOff - If true, a custom label will be used for the secondary (non-control) properties. Otherwise the default label is used.

Attention:


void : setCreateControlProperty( Boolean onOff )

Sets whether or not the loader will use and create ERC links to an additional control property.

Parameter(s):

  • onOff - If true, the loader will create links to an additional control property, otherwise, settings for the additional control property will be ignored.

void : setDeltaTolerance( Number val )

Sets the minimum amount of deviation from the original position of a given vertex that will be recorded in the morph.

Parameter(s):

  • val - The minimum amount of deviation from the original position of a given vertex to be recorded in the morph.

void : setDisplayName( String name )

Sets the name to display for this collection of settings.

Parameter(s):

  • name - The name to be displayed.

Since:

  • 4.15.0.7

void : setFilename( String filename )

Sets the file to read the geometry from.

Parameter(s):

  • filename - The full path of the file to load this morph's geometry from.

void : setHideSecondaryProperties( Boolean onOff )

Sets whether or not secondary (non-control) properties are hidden.

Parameter(s):

  • onOff - If true, secondary (non-control) properties will be set as hidden.

Attention:


bool : setLoadMode( LoadMode mode, DzNode node )

Sets the mode to load the morph for node.

Parameter(s):

  • mode - The mode to set for the morph being loaded.
  • node - The node with the geometry that the morph is being loaded for.

Return Value:

  • true if mode can be set for node, otherwise false.

Attention:

  • If node is a “single skin” figure, only the SingleSkinFigure and SingleSkinFigureFromGraft modes are considered valid. If node is a figure, but not a “single skin” figure (e.g., a legacy figure), only the EntireFigure, SelectedNodes and PrimaryNode modes are considered valid. If node is a prop, only the PrimaryNode mode is considered valid.

void : setMorphMirroring( MirroringType type )

Sets the type of mirroring to apply to the morph.

Parameter(s):

  • type - The type of mirroring to apply to the morph.

void : setMorphName( String name )

Sets the name of the morph(s) that will be created by this morph loader.

Parameter(s):

  • name - The name for the DzMorph object(s) that will be created by this loader.

void : setOverwriteExisting( OverwriteMode mode )

Sets whether or not to override/replace existing morphs with the same name.

Parameter(s):

  • mode - If true, existing morphs on the node(s) with the same name will be replaced by the loaded morph.

void : setPreserveExistingDeltas( Boolean onOff )

Sets whether or not to preserve existing deltas in a morph by the same name.

Parameter(s):

  • mode - If true, existing deltas in a morph by the same name will be preserved.

void : setPropertyGroupPath( String path )

Sets the property group that morph value properties will be added to.

Parameter(s):

  • path - The path of the property group that value properties from the morph(s) created by this loader will be assigned to.

void : setReverseDeformations( Boolean onOff )

Sets whether or not joint deformations and other modifiers will be reversed before calculating deltas.

Parameter(s):

  • onOff - If true, joint deformations and other modifiers will be reversed from the current world-space geometry to calculate the deltas. If false, the deltas will be calculated from the base geometry.

void : setReverseDeformationsPose( String filePath )

Sets the path of a native file to load/apply immediately before a morph is loaded.

Parameter(s):

  • filePath - The path of the file to be loaded.

See Also:

Signals


void : applyAfterJointChanged( Boolean onOff )

TODO: Add description.


void : attenuateChanged()

TODO: Add description.


void : attenuateEdgeStrengthChanged( Number strength )

TODO: Add description.


void : attenuateStrengthChanged( Number strength )

TODO: Add description.


void : controlNodeChanged( DzNode node )

TODO: Add description.


void : controlPropertyChanged( DzNumericProperty prop )

TODO: Add description.


void : createControlPropertyChanged( Boolean onOff )

TODO: Add description.


void : deltaToleranceChanged( Number val )

TODO: Add description.


void : ercCustomValueChanged( Number val )

TODO: Add description.


void : filenameChanged( String name )

Signature:“filenameChanged(const QString&)”

Emitted when the filename has changed.

Parameter(s):

  • name - The new name of the file.

void : hideSecondaryChanged( Boolean onOff )

TODO: Add description.


void : mirroringChanged( DzMorphLoader::MirroringType mirroring )

TODO: Add description.


void : morphNameChanged( String name )

Signature:“morphNameChanged(const QString&)”

Emitted when the morph name has changed.

Parameter(s):

  • name - The new name of the morph.

void : overwriteExistingChanged( DzMorphLoader::OverwriteMode value )

TODO: Add description.


void : preserveExistingDeltasChanged( Boolean onOff )

TODO: Add description.


void : propertyGroupPathChanged( String path )

Signature:“propertyGroupPathChanged(const QString&)”

Emitted when the path of the property group has changed.

Parameter(s):

  • name - The new path of the property group.

void : reverseDeformationsChanged( Boolean onOff )

TODO: Add description.


void : secondaryLabelChanged( String label )

TODO: Add description.


void : smoothCageChanged( Boolean onOff )

TODO: Add description.


void : useErcCustomValueChanged( Boolean onOff )

TODO: Add description.


void : useSecondaryLabelChanged( Boolean onOff )

TODO: Add description.