TransferShapeAnimationAcrossGenOp

Introduced

v5.0

Description

Transfers the shape animation from the specified object to the output geometry connected to the specified generator operator. This command takes care of transferring all the shape animation information contained in the mixer to the destination object.

Note: The shapekey cluster properties should have been transferred previously using TransferClusterPropertiesAcrossGenOp.

Scripting Syntax

TransferShapeAnimationAcrossGenOp( Operator, Object );

Parameters

Parameter Type Description
Operator String Specifies the generator operator for which the transfer of shape animation will be performed.
Object String Specifies an input object from which the shape animation will be gathered.

Examples

JScript Example

/*

	This example transfers shape animation across generator operators.

*/

NewScene( null, false );

SetValue("Context.constructionmode", 1, null);

CreatePrim("Sphere", "MeshSurface", null, null);

CreatePrim("Cone", "MeshSurface", null, null);

//Create some shape animation

ActivateVertexSelTool(null);

SelectGeometryComponents("cone.pnt[1]");

Translate(null, 2.4284957846203, 0, 0, siRelative, siGlobal, siObj, siXYZ, null, null, siXYZ, null, null, null, null, null, null, 1);

SaveShapeKey("cone.pnt[1]", null, null, 1, null, null, null, null, siShapeObjectReferenceMode);

SetValue("PlayControl.Key", 48, null);

SetValue("PlayControl.Current", 48, null);

ActivateVertexSelTool(null);

Translate(null, -6.11040874839948, 0, 0, siRelative, siGlobal, siObj, siXYZ, null, null, siXYZ, null, null, null, null, null, null, 1);

SaveShapeKey("cone.pnt[1]", null, null, 48, null, null, null, null, siShapeObjectReferenceMode);

ActivateObjectSelTool(null);

SelectObj("sphere,polymsh", null, true);

SelectFilter("object");

AddToSelection("cone", null, true);

ApplyGenOp("MeshMerge", null, "sphere,cone", siUnspecified, siPersistentOperation, siKeepGenOpInputs, null);

SelectObj("polymsh.polymsh.mergemesh", null, null);

//Transfer the cluster properties on the generated geometry

TransferClusterPropertiesAcrossGenOp("polymsh.polymsh.mergemesh", "polymsh", "cone.polymsh.cls.Shape.ResultClusterKey", "ResultClusterKey", true);

TransferClusterPropertiesAcrossGenOp("polymsh.polymsh.mergemesh", "polymsh", "cone.polymsh.cls.Shape.ShapeKey", "ShapeKey", true);

TransferClusterPropertiesAcrossGenOp("polymsh.polymsh.mergemesh", "polymsh", "cone.polymsh.cls.Shape.ShapeKey1", "ShapeKey1", true);

//Transfer the mixer part of the animation across the generated geometry 

TransferShapeAnimationAcrossGenOp("polymsh.polymsh.mergemesh", "cone");

SetValue("cone.polymsh.clustershapecombiner.Mute", true, null);

See Also

TransferShapeAnimation