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 ()
StringgetContentType ()
floatgetDistanceSquaredTolerance ()
BooleangetFitToFigure ()
BooleangetLockViewOnTransfer ()
BooleangetMergeHierarchies ()
ArraygetMorphTransferList ()
NumbergetNearness ()
BooleangetOverrideExistingMorphs ()
BooleangetParentToFigure ()
StringgetProjectionTemplatePath ()
BooleangetRemoveUnusedTargetBones ()
BooleangetRespectHiddenFacets ()
BooleangetSmartLeftRightHandling ()
BaseTypegetSourceBase ()
morph_dzgetSourceBaseMorph ()
shape_dzgetSourceGeom ()
DzNodegetSourceNode ()
AssetTypegetSourceType ()
BaseTypegetTargetBase ()
morph_dzgetTargetBaseMorph ()
shape_dzgetTargetGeom ()
DzNodegetTargetNode ()
figure_dzgetTargetOutputFigure ()
BooleangetTargetReplacesSource ()
AssetTypegetTargetType ()
BooleangetTransferBinding ()
BooleangetTransferFaceGroups ()
BooleangetTransferMaterialGroups ()
BooleangetTransferMorphs ()
BooleangetTransferRegionGroups ()
BooleangetTransferSelectionMap ()
SourceMorphTransferTypegetTransferSourceMorphs ()
BooleangetTransferTemplateMorphs ()
BooleangetTransferUVs ()
BooleangetUseNearness ()
BooleangetUseSpecifiedContentType ()
BooleangetUVSpaceProjection ()
BooleangetVertexFirstProjection ()
BooleanisSourceBaseMorphClone ()
voidremoveUnusedBones ( figure_dz figure )
voidsetAdaptiveTolerance ( Number val )
voidsetAddSmoothModifier ( Boolean yesNo )
voidsetAdjustTargetBase ( 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 ( shape_dz geom )
BooleansetSourceBaseCurrent ()
BooleansetSourceBaseMorph ( morph_dz morph )
BooleansetTarget ( DzNode node )
BooleansetTarget ( shape_dz geom )
BooleansetTargetBaseCurrent ()
BooleansetTargetBaseMorph ( morph_dz 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

TODO: Add description.

  • NoAsset - TODO: Add description.
  • GeometryAsset - TODO: Add description.
  • NodeAsset - TODO: Add description.

—–

: BaseType

TODO: Add description.

  • BaseGeom - TODO: Add description.
  • BaseMorph - TODO: Add description.
  • BaseCurrent - TODO: Add description.

—–

: SourceMorphTransferType

TODO: Add description.

  • NoMorphs - TODO: Add description.
  • NameList - TODO: Add description.
  • Favorites - TODO: Add description.
  • FavoritesAndSubComponets - TODO: Add description.
  • ShapingAndPoseType - TODO: Add description.
  • AllMorphs - TODO: Add description.

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, false if the transfer could not be completed.

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.

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.

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:

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

Boolean : getRespectHiddenFacets()

Return Value:

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

Boolean : getSmartLeftRightHandling()

Return Value:

  • Whether or not smart left/right handling will be used during projection calculation.

BaseType : getSourceBase()

Return Value:

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

morph_dz : getSourceBaseMorph()

Return Value:

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

shape_dz : 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.

morph_dz : getTargetBaseMorph()

Return Value:

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

shape_dz : 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.

figure_dz : getTargetOutputFigure()

Return Value:

  • The target output figure.

Boolean : getTargetReplacesSource()

Return Value:

  • Whether or not the target will replace the source in the scene.

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.

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.

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:

  • Whether or not UV space will be used during projection calculation.

Since:

  • 4.9.3.1

Boolean : getVertexFirstProjection()

Return Value:

  • Whether vertices or facets are looked at first on the source for projection.

Since:

  • 4.9.3.38

Boolean : isSourceBaseMorphClone()

Return Value:

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

Since:

  • 4.9.4.84

void : removeUnusedBones( figure_dz figure )

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


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.

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, otherwiseThe target geometry will not be changed.

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.

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.

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.

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


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.


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( shape_dz 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( morph_dz 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( shape_dz 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( morph_dz 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 )

Sets whether or not the target will replace the source in the scene

Parameter(s):

  • onOff - true for on, false off

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, otherwise no binding will be projected.

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, otherwise no face grouping will 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, otherwise no material groups will be projected.

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, otherwise 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, otherwise no face grouping will 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, otherwise no selection map will 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, otherwise no UV mapping will 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, otherwiseonly 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 set.

void : setUVSpaceProjection( Boolean onOff )

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

Since:

  • 4.9.3.1

void : setVertexFirstProjection( Boolean onOff )

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

Since:

  • 4.9.3.38