User Tools

Site Tools


DzTransferUtility

Implements the logic of transferring weights, morph, maps, etc using projection.

More...

Inherits :

Enumerations

Constructors

DAZ Script
DzTransferUtility ()

Methods

DAZ Script
BooleandoTransfer ()
NumbergetAdaptiveTolerance ()
BooleangetAddSmoothModifier ()
BooleangetAdjustTargetBase ()
BooleangetConsiderLinesAsRigid ()
StringgetContentType ()
floatgetDistanceSquaredTolerance ()
BooleangetFitToFigure ()
BooleangetLockViewOnTransfer ()
BooleangetMergeHierarchies ()
ArraygetMorphTransferList ()
NumbergetNearness ()
BooleangetOverrideExistingMorphs ()
BooleangetParentToFigure ()
StringgetProjectionTemplatePath ()
BooleangetRemoveUnusedTargetBones ()
BooleangetRespectHiddenFacets ()
BooleangetSmartLeftRightHandling ()
BaseTypegetSourceBase ()
DzMorphgetSourceBaseMorph ()
DzShapegetSourceGeom ()
DzNodegetSourceNode ()
AssetTypegetSourceType ()
BaseTypegetTargetBase ()
DzMorphgetTargetBaseMorph ()
DzShapegetTargetGeom ()
DzNodegetTargetNode ()
DzFiguregetTargetOutputFigure ()
BooleangetTargetReplacesSource ()
AssetTypegetTargetType ()
BooleangetTransferBinding ()
BooleangetTransferFaceGroups ()
BooleangetTransferMaterialGroups ()
BooleangetTransferMorphs ()
BooleangetTransferRegionGroups ()
BooleangetTransferSelectionMap ()
SourceMorphTransferTypegetTransferSourceMorphs ()
BooleangetTransferTemplateMorphs ()
BooleangetTransferUVs ()
BooleangetUseNearness ()
BooleangetUseSpecifiedContentType ()
BooleangetUVSpaceProjection ()
BooleangetVertexFirstProjection ()
BooleanisSourceBaseMorphClone ()
voidremoveUnusedBones ( DzFigure figure )
voidsetAdaptiveTolerance ( Number val )
voidsetAddSmoothModifier ( Boolean yesNo )
voidsetAdjustTargetBase ( Boolean onOff )
voidsetConsiderLinesAsRigid ( Boolean onOff )
voidsetContentType ( String conType )
voidsetDistanceSquaredTolerance ( Number val )
voidsetFitToFigure ( Boolean yesNo )
voidsetLockViewOnTransfer ( Boolean onOff )
voidsetMergeHierarchies ( Boolean onOff )
voidsetMorphTransferList ( Array list )
voidsetNearness ( Number val )
voidsetOverrideExistingMorphs ( Boolean onOff )
voidsetParentToFigure ( Boolean yesNo )
voidsetProjectionTemplatePath ( String path )
voidsetRemoveUnusedTargetBones ( Boolean onOff )
voidsetRespectHiddenFacets ( Boolean onOff )
voidsetSilentImporters ( Boolean onOff )
voidsetSmartLeftRightHandling ( Boolean onOff )
BooleansetSource ( DzNode node )
BooleansetSource ( DzShape geom )
BooleansetSourceBaseCurrent ()
BooleansetSourceBaseMorph ( DzMorph morph )
BooleansetTarget ( DzNode node )
BooleansetTarget ( DzShape geom )
BooleansetTargetBaseCurrent ()
BooleansetTargetBaseMorph ( DzMorph morph )
voidsetTargetReplacesSource ( Boolean onOff )
voidsetTransferBinding ( Boolean onOff )
voidsetTransferFaceGroups ( Boolean onOff )
voidsetTransferMaterialGroups ( Boolean onOff )
voidsetTransferMorphs ( Boolean onOff )
voidsetTransferRegionGroups ( Boolean onOff )
voidsetTransferSelectionMap ( Boolean onOff )
voidsetTransferSourceMorphs ( SourceMorphTransferType type )
voidsetTransferTemplateMorphs ( Boolean onOff )
voidsetTransferUVs ( Boolean onOff )
voidsetUseNearness ( Boolean onOff )
voidsetUseSpecifiedContentType ( Boolean yesNo )
voidsetUVSpaceProjection ( Boolean onOff )
voidsetVertexFirstProjection ( Boolean onOff )

Detailed Description

Attention:

  • This object is provided by the Transfer Utility plugin. It is only available when the Transfer Utility plugin is activated and enabled.

Since:

  • 4.6.2.85

Enumerations


: AssetType

The type of the asset to use during projection.

  • NoAsset - The type of the asset is not defined.
  • GeometryAsset - The type of the asset is a DzShape.
  • NodeAsset - The type of the asset is a DzNode.

—–

: BaseType

The type of base geometry to use during projection.

  • BaseGeom - The unmodified base geometry.
  • BaseMorph - The base geometry as modified by a morph target.
  • BaseCurrent - The current world-space cached geometry.

—–

: SourceMorphTransferType

The type of source morphs to project.

  • NoMorphs - No morphs.
  • NameList - A specific list of named morphs.
  • Favorites - The morphs in which their respective value control properties are marked as a favorite.
  • FavoritesAndSubComponets - Same as Favorites, plus the properties that are controlled by them via DzERCLink.
  • ShapingAndPoseType - The morphs that have their respective control property in the “Modifier/Shape” or “Modifier/Pose” property groups.
  • AllMorphs - All morphs.

Constructors


DzTransferUtility()

Default Constructor. Creates a Transfer Utility that can be used to transfer weights, morph, maps, etc using projection.

Methods


Boolean : doTransfer()

Performs the projection transfer based on the current settings.

Return Value:

  • true if the transfer was successful, otherwise false.

Number : getAdaptiveTolerance()

Return Value:

  • The adaptive tolerance factor for calculating the projection.

Since:

  • 4.8.1.78

Boolean : getAddSmoothModifier()

Return Value:

  • true if a smoothing modifier will be added to the target figure, otherwise false.

Boolean : getAdjustTargetBase()

Return Value:

  • true if the target geometry will be adjusted to the source base geometry, otherwise false.

Attention:

  • Provides access to the “Reverse Source Shape From Target” option in the Transfer Utility dialog.

Boolean : getConsiderLinesAsRigid()

Return Value:

  • true if polylines are projected as rigid topology, otherwise false.

Since:

  • 4.11.0.66

String : getContentType()

Return Value:

  • The content type to be set on the presentation of the figure.

float : getDistanceSquaredTolerance()

Return Value:

  • The distance squared tolerance for calculating the projection.

Since:

  • 4.10.0.50

Boolean : getFitToFigure()

Return Value:

  • true if the target figure will be fit to the source figure once the projection has been performed, otherwise false.

Boolean : getLockViewOnTransfer()

Return Value:

  • true if the view will be locked during the transfer, otherwise false.

Boolean : getMergeHierarchies()

Return Value:

  • true if node hierarchies will be merged on the target figure, otherwise false.

Array : getMorphTransferList()

Return Value:

  • A list of morph names that will be transfered (if any).

Number : getNearness()

Return Value:

  • The nearness factor for calculating the projection.

Boolean : getOverrideExistingMorphs()

Return Value:

  • true if existing morphs on the target figure will be replaced, otherwise false.

Boolean : getParentToFigure()

Return Value:

  • true if the target figure will be parented to the source figure once the projection has been performed, otherwise false.

Since:

  • 4.10.0.50

String : getProjectionTemplatePath()

Return Value:

  • The path to a template figure to use for projection.

Since:

  • 4.9.3.48

Boolean : getRemoveUnusedTargetBones()

Return Value:

  • true if unused bones should be removed from the target after skin binding is transfered, otherwise false.

Boolean : getRespectHiddenFacets()

Return Value:

  • true if the transfer of weightmaps will respect hidden facets on the target figure, otherwise false.

Boolean : getSmartLeftRightHandling()

Return Value:

  • true if smart left/right handling will be used during projection calculation, otherwise false.

BaseType : getSourceBase()

Return Value:

  • The type of projection base that will be used for the source asset.

DzMorph : getSourceBaseMorph()

Return Value:

  • The morph that will be used for the source projection base, or NULL if a different base type will be used.

DzShape : getSourceGeom()

Return Value:

  • The shape containing the source asset if the source asset type is GeometryAsset, otherwise null.

DzNode : getSourceNode()

Return Value:

  • The node containing the source asset if the source asset type is NodeAsset, otherwise null.

AssetType : getSourceType()

Return Value:

  • The type of asset currently set for the projection source.

BaseType : getTargetBase()

Return Value:

  • The type of projection base that will be used for the target asset.

DzMorph : getTargetBaseMorph()

Return Value:

  • The morph that will be used for the target projection base, or NULL if a different base type will be used.

DzShape : getTargetGeom()

Return Value:

  • The shape containing the target asset if the target asset type is GeometryAsset, otherwise null.

DzNode : getTargetNode()

Return Value:

  • The node containing the target asset if the target asset type is NodeAsset, otherwise null.

DzFigure : getTargetOutputFigure()

Return Value:

  • The target output figure.

Boolean : getTargetReplacesSource()

Return Value:

  • true if the target will replace the source in the scene, otherwise false.

Attention:

  • Provides access to the “Replace Source With Target” option in the Transfer Utility dialog.

AssetType : getTargetType()

Return Value:

  • The type of asset currently set for the projection target.

Boolean : getTransferBinding()

Return Value:

  • true if skin binding will be projected, otherwise false.

Attention:

  • Provides access to the “Weight Maps” option in the Transfer Utility dialog.

Boolean : getTransferFaceGroups()

Return Value:

  • true if face grouping will be projected, otherwise false.

Boolean : getTransferMaterialGroups()

Return Value:

  • true if material grouping will be projected, otherwise false.

Attention:

  • Provides access to the “Surface Groups” option in the Transfer Utility dialog.

Boolean : getTransferMorphs()

Return Value:

  • true if morphs will be projected, otherwise false.

Boolean : getTransferRegionGroups()

Return Value:

  • true if region grouping will be projected, otherwise false.

Boolean : getTransferSelectionMap()

Return Value:

  • true if the selection map will be projected, otherwise false.

SourceMorphTransferType : getTransferSourceMorphs()

Return Value:

  • Which morphs are projected from the source figure.

Boolean : getTransferTemplateMorphs()

Return Value:

  • true if morphs should be projected from the template figure, otherwise false.

Since:

  • 4.9.3.48

Boolean : getTransferUVs()

Return Value:

  • true if UV maps will be projected, otherwise false.

Boolean : getUseNearness()

Return Value:

  • true if near vertices will be used for calculation of the projection, otherwise false.

Boolean : getUseSpecifiedContentType()

Return Value:

  • true if the specified content type should be used to set the target content type, otherwise false.

Boolean : getUVSpaceProjection()

Return Value:

  • true if UV space will be used during projection calculation, otherwise false.

Since:

  • 4.9.3.1

Boolean : getVertexFirstProjection()

Return Value:

  • true if vertices are looked at first on the source for projection, false if facets are looked at first.

Since:

  • 4.9.3.38

Boolean : isSourceBaseMorphClone()

Return Value:

  • true if the morph that will be used for the source projection base is “Modifier/Clone”, otherwise false.

Since:

  • 4.9.4.84

void : removeUnusedBones( DzFigure figure )

Removes unused bones from the given figure; unused bones are those whose bone binding weight maps are all filled with zero.

Parameter(s):

  • figure - The figure to remove the unused bones from.

void : setAdaptiveTolerance( Number val )

Sets the adaptive tolerance factor if near vertices will be used to calculate the projection.

Parameter(s):

  • val - The adaptive tolerance factor to set.

Since:

  • 4.8.1.78

void : setAddSmoothModifier( Boolean yesNo )

Sets whether or not to add a smoothing modifier to the target figure.


void : setAdjustTargetBase( Boolean onOff )

Sets whether or not the target will be adjusted to the unmodified base geometry of the source.

Parameter(s):

  • onOff - If true, the target geometry will be adjusted. If false, the target geometry will not be changed.

Attention:

  • Provides access to the “Reverse Source Shape From Target” option in the Transfer Utility dialog.

void : setConsiderLinesAsRigid( Boolean onOff )

Sets whether or not polylines are projected as rigid topology; whether or not all vertices of a given polyline transform based on the relative position of its first vertex, or individually based on their own respective positions.

Parameter(s):

  • onOff - If true, polylines are projected as rigid topology. If false, polylines are projected as non-rigid topology.

Since:

  • 4.11.0.66

void : setContentType( String conType )

Sets the content type to be set on the presentation of the figure.

Parameter(s):

  • conType - The content type to set.

void : setDistanceSquaredTolerance( Number val )

Sets the distance squared tolerance to use for calculating the projection.

Parameter(s):

  • val - The distance squared tolerance value to set.

Since:

  • 4.10.0.50

void : setFitToFigure( Boolean yesNo )

Sets whether or not the target figure will be fit to the source figure once the projection has been performed.

Parameter(s):

  • yesNo - If true, the target figure will be fit to the source figure.

void : setLockViewOnTransfer( Boolean onOff )

Sets whether or not the view will be locked during the transfer.

Parameter(s):

  • onOff - If true, the view will be locked during the transfer.

void : setMergeHierarchies( Boolean onOff )

Sets whether or not node hierarchies will be merged on the target figure.

Parameter(s):

  • onOff - If true, node hierarchies will be merged.

void : setMorphTransferList( Array list )

Sets the list of morph names to transfer.

Parameter(s):

  • list - The list of morph names to set.

void : setNearness( Number val )

Sets the nearness factor if near vertices will be used to calculate the projection.

Parameter(s):

  • val - The nearness factor to set.

void : setOverrideExistingMorphs( Boolean onOff )

Sets whether or not to override morphs that already exist onthe target figure.

Parameter(s):

  • onOff - If true (default), existing morphs on the target figure will be replaced.

void : setParentToFigure( Boolean yesNo )

Sets whether or not the target figure will be parented to the source figure once the projection has been performed.

Parameter(s):

  • yesNo - If true, the target figure will be parented to the source figure.

Since:

  • 4.10.0.50

void : setProjectionTemplatePath( String path )

Sets the path to a template figure to use for projection.

Parameter(s):

  • path - The path of the projection template to set.

Since:

  • 4.9.3.48

void : setRemoveUnusedTargetBones( Boolean onOff )

Sets whether or not unused bones should be removed from the target after skin binding is transfered.

Parameter(s):

  • onOff - If true, unused bones will be removed from the target after skin binding is transfered. If false, unused bones will not be removed from the target.

void : setRespectHiddenFacets( Boolean onOff )

Sets whether or not the transfer of weightmaps will respect hidden facets on the target figure.

Parameter(s):

  • onOff - If true, the transfer of weightmaps will respect hidden facets on the target figure.

void : setSilentImporters( Boolean onOff )

Sets whether importers that may need to be invoked should run silently, or with user input. Currently this only affects transfers using DzTransferPoserFigureAssets. This needs to be called before setSource() or setTarget() are called.


void : setSmartLeftRightHandling( Boolean onOff )

Sets whether or not smart left/right handling will be used during projection calculation.

Parameter(s):

  • onOff - If true, smart left/right handling will be used. If false, smart left/right handling will not be used.

Boolean : setSource( DzNode node )

Sets the source asset to be the geometry contained by the given node.

Parameter(s):

  • node - The node to use as a projection source.

Boolean : setSource( DzShape geom )

Sets the source asset to be the geometry contained by the given shape.

Parameter(s):

  • shape - The shape containing the geometry to use as a projection source.

Boolean : setSourceBaseCurrent()

Sets the Transfer Utility to use the current world-space cached geometry of the source asset for the projection base instead of a morph or the unmodified base geometry. Only valid if the source asset is a node.

Return Value:

  • false if the source asset is not a node, otherwise true.

Boolean : setSourceBaseMorph( DzMorph morph )

Sets the morph that will be applied to the source geometry before the projection is calculated. Only valid if the source asset is a node.

Parameter(s):

  • morph - The morph that will act as the projection base.

Return Value:

  • true if the morph will be used, false if the morph is invalid or the source asset is not a node.

Boolean : setTarget( DzNode node )

Sets the target asset to be the geometry contained by the given node.

Parameter(s):

  • node - The node to use as a projection target.

Boolean : setTarget( DzShape geom )

Sets the target asset to be the geometry contained by the given shape.

Parameter(s):

  • shape - The shape containing the geometry to use as a projection target.

Boolean : setTargetBaseCurrent()

Sets the Transfer Utility to use the current world-space cached geometry of the target asset for the projection base instead of a morph or the unmodified base geometry. Only valid if the target asset is a node.

Return Value:

  • false if the target asset is not a node, otherwise true.

Boolean : setTargetBaseMorph( DzMorph morph )

Return Value:

  • The morph that will be used for the target projection base, or NULL if a different base type will be used.

void : setTargetReplacesSource( Boolean onOff )

ets whether or not the target will replace the source in the scene.

Parameter(s):

  • onOff - If true, the source will be replaced by the target. If false, the source will not be replaced by the target.

Attention:

  • Provides access to the “Replace Source With Target” option in the Transfer Utility dialog.

void : setTransferBinding( Boolean onOff )

Sets whether or not skin binding will be projected to the target.

Parameter(s):

  • onOff - If true, the skin binding weights will be projected. If false, the skin binding weights will not be projected.

Attention:

  • Provides access to the “Weight Maps” option in the Transfer Utility dialog.

void : setTransferFaceGroups( Boolean onOff )

Sets whether or not face grouping will be projected to the target.

Parameter(s):

  • onOff - If true, the face groups will be projected. If false, the face groups will not be projected.

void : setTransferMaterialGroups( Boolean onOff )

Sets whether or not material grouping will be projected to the target.

Parameter(s):

  • onOff - If true, the material groups will be projected. If false, the material groups will not be projected.

Attention:

  • Provides access to the “Surface Groups” option in the Transfer Utility dialog.

void : setTransferMorphs( Boolean onOff )

Sets whether or not morphs will be projected to the target.

Parameter(s):

  • onOff - If true, the morphs will be projected. If false, no morphs will be projected.

void : setTransferRegionGroups( Boolean onOff )

Sets whether or not region grouping will be projected to the target.

Parameter(s):

  • onOff - If true, the face groups will be projected. If false, the face groups will not be projected.

void : setTransferSelectionMap( Boolean onOff )

Sets whether or not the selection map will be created on the target.

Parameter(s):

  • onOff - If true, the selection map will be projected. If false, the selection map will not be projected.

void : setTransferSourceMorphs( SourceMorphTransferType type )

Sets which type of morphs to project from the source figure.

Parameter(s):

  • type - The type of morphs on the source figure to project.

void : setTransferTemplateMorphs( Boolean onOff )

Sets whether or not morphs should be projected from the template figure.

Parameter(s):

  • onOff - If true, morphs will be projected from the template figure.

Since:

  • 4.9.3.48

void : setTransferUVs( Boolean onOff )

Sets whether or not UV maps will be projected to the target.

Parameter(s):

  • onOff - If true, the UV maps will be projected. If false, the UV maps will not be projected.

void : setUseNearness( Boolean onOff )

Sets whether or not face near vertices will be used to calculate the projection.

Parameter(s):

  • onOff - If true, near vertices will be used, otherwise only the closest mesh location will be used.

void : setUseSpecifiedContentType( Boolean yesNo )

Sets whether or not the specified content type should be used to set the target content type.

Parameter(s):

  • yesNo - If true, the specified content type will be used to set the target content type. If false, the specified content type will not be used to set the target content type.

void : setUVSpaceProjection( Boolean onOff )

Sets whether or not UV space will be used during projection calculation.

Parameter(s):

  • onOff - If true, UV space will be used during projection calculation. If false, UV space will not be used during projection calculation.

Since:

  • 4.9.3.1

void : setVertexFirstProjection( Boolean onOff )

Sets whether vertices or facets on the source are looked at first for projection.

Parameter(s):

  • onOff - If true, vertices are looked at first. If false, facets are looked at first.

Since:

  • 4.9.3.38