Implements the logic of transferring weights, morph, maps, etc using projection.
Inherits :
DAZ Script |
---|
DzTransferUtility () |
Attention:
Since:
The type of the asset to use during projection.
—–
The type of base geometry to use during projection.
—–
The type of source morphs to project.
Default Constructor. Creates a Transfer Utility that can be used to transfer weights, morph, maps, etc using projection.
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:
Since:
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:
Boolean : getConsiderLinesAsRigid()
Return Value:
true
if polylines are projected as rigid topology, otherwise false
.Since:
String : getContentType()
Return Value:
Number : getDistanceSquaredTolerance()
Return Value:
Since:
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:
Number : getNearness()
Return Value:
Boolean : getOverrideExistingMorphs()
Return Value:
true
if existing morphs on the target figure will be replaced, otherwise false
.Return Value:
true
if the target figure will be parented to the source figure once the projection has been performed, otherwise false
.Since:
String : getProjectionTemplatePath()
Return Value:
Since:
Boolean : getRemoveOriginalTarget()
Return Value:
true
if the original target node will be removed.Attention:
Since:
Boolean : getRemoveUnusedTargetBones()
Return Value:
true
if unused bones should be removed from the target after skin binding is transferred, otherwise false
.See Also:
Boolean : getRemoveUnusedTargetBonesIsGreedy()
Return Value:
true
if unused bones are any bones that have no bone binding and any bones with a bone binding whose weight map is filled with a zero value. false
(default) if unused bones are limited to any bones with a bone binding whose weight map is filled with a zero value.See Also:
Since:
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
.Return Value:
DzMorph : getSourceBaseMorph()
Return Value:
DzShape : getSourceGeom()
Return Value:
DzNode : getSourceNode()
Return Value:
Return Value:
Return Value:
DzMorph : getTargetBaseMorph()
Return Value:
DzShape : getTargetGeom()
Return Value:
DzNode : getTargetNode()
Return Value:
DzFigure : getTargetOutputFigure()
Return Value:
Boolean : getTargetReplacesSource()
Return Value:
true
if the target will replace the source in the scene, otherwise false
.Attention:
Return Value:
Boolean : getTransferBinding()
Return Value:
true
if skin binding will be projected, otherwise false
.Attention:
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:
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:
Boolean : getTransferTemplateMorphs()
Return Value:
true
if morphs should be projected from the template figure, otherwise false
.Since:
Return Value:
true
if UV maps will be projected, otherwise false
.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:
Boolean : getVertexFirstProjection()
Return Value:
true
if vertices are looked at first on the source for projection, false
if facets are looked at first.Since:
Boolean : isSourceBaseMorphClone()
Return Value:
true
if the morph that will be used for the source projection base is “Modifier/Clone”, otherwise false
.Since:
void : removeUnusedBones( DzFigure figure )
Removes unused bones from the specified figure.
Parameter(s):
See Also:
void : setAdaptiveTolerance( Number val )
Sets the adaptive tolerance factor if near vertices will be used to calculate the projection.
Parameter(s):
Since:
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):
true
, the target geometry will be adjusted. If false
, the target geometry will not be changed.Attention:
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):
true
, polylines are projected as rigid topology. If false
, polylines are projected as non-rigid topology.Since:
void : setContentType( String conType )
Sets the content type to be set on the presentation of the figure.
Parameter(s):
void : setDistanceSquaredTolerance( Number val )
Sets the distance squared tolerance to use for calculating the projection.
Parameter(s):
Since:
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):
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):
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):
true
, node hierarchies will be merged.void : setMorphTransferList( Array list )
Sets the list of morph names to transfer.
Parameter(s):
void : setNearness( Number val )
Sets the nearness factor if near vertices will be used to calculate the projection.
Parameter(s):
void : setOverrideExistingMorphs( Boolean onOff )
Sets whether or not to override morphs that already exist onthe target figure.
Parameter(s):
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):
true
, the target figure will be parented to the source figure.Since:
void : setProjectionTemplatePath( String path )
Sets the path to a template figure to use for projection.
Parameter(s):
Since:
void : setRemoveOriginalTarget( Boolean onOff )
Sets whether or not the original target node will be removed.
Parameter(s):
true
, the original target node will not be removed. If false
, the original target node will be removed.Attention:
Since:
void : setRemoveUnusedTargetBones( Boolean onOff )
Sets whether or not unused bones should be removed from the target after skin binding is transferred.
Parameter(s):
true
, unused bones will be removed from the target after skin binding is transferred. If false
, unused bones will not be removed from the target.Attention:
See Also:
void : setRemoveUnusedTargetBonesIsGreedy( Boolean onOff )
Sets whether or not removing unused bones should be greedy.
Parameter(s):
true
, unused bones are any bones that have no bone binding and any bones with a bone binding whose weight map is filled with a zero value. If false
, unused bones are bones with a bone binding whose weight map is filled with a zero value.See Also:
Since:
void : setRespectHiddenFacets( Boolean onOff )
Sets whether or not the transfer of weightmaps will respect hidden facets on the target figure.
Parameter(s):
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):
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):
Boolean : setSource( DzShape geom )
Sets the source asset to be the geometry contained by the given shape.
Parameter(s):
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):
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):
Boolean : setTarget( DzShape geom )
Sets the target asset to be the geometry contained by the given shape.
Parameter(s):
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:
void : setTargetReplacesSource( Boolean onOff )
ets whether or not the target will replace the source in the scene.
Parameter(s):
true
, the source will be replaced by the target. If false
, the source will not be replaced by the target.Attention:
void : setTransferBinding( Boolean onOff )
Sets whether or not skin binding will be projected to the target.
Parameter(s):
true
, the skin binding weights will be projected. If false
, the skin binding weights will not be projected.Attention:
void : setTransferFaceGroups( Boolean onOff )
Sets whether or not face grouping will be projected to the target.
Parameter(s):
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):
true
, the material groups will be projected. If false
, the material groups will not be projected.Attention:
void : setTransferMorphs( Boolean onOff )
Sets whether or not morphs will be projected to the target.
Parameter(s):
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):
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):
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):
void : setTransferTemplateMorphs( Boolean onOff )
Sets whether or not morphs should be projected from the template figure.
Parameter(s):
true
, morphs will be projected from the template figure.Since:
void : setTransferUVs( Boolean onOff )
Sets whether or not UV maps will be projected to the target.
Parameter(s):
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):
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):
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):
true
, UV space will be used during projection calculation. If false
, UV space will not be used during projection calculation.Since:
void : setVertexFirstProjection( Boolean onOff )
Sets whether vertices or facets on the source are looked at first for projection.
Parameter(s):
true
, vertices are looked at first. If false
, facets are looked at first.Since: