ApplyDeformBySpine

Introduced

v1.0

Categories

operator deformation

Description

Applies a deformation by spine, which causes objects and/or clusters to be deformed in response to the deformations of one or more curves.

Scripting Syntax

oReturn = ApplyDeformBySpine( ConnectionSet, [ConstructionMode] );

Return Value

Returns the Object Name of the newly created Spine WeightMap operator(s).

Parameters

Parameter Type Description
ConnectionSet ConnectionSet Specifies the objects connected to an operator.

The first group of the ConnectionSet contains vertex based objects. The second group of the ConnectionSet contains NURBS curve objects.

See Operator Presets for details on the connection set required for this operator.
ConstructionMode siConstructionMode The mode indicating the purpose of the deformations.

Default Value: Current construction mode.

Examples

1. VBScript Example

'This example shows how to deform a model using two circles.
'The circles are the curve spines used to deform the model.
'Get model and curves.
newscene
GetPresetModel "Man", "Man"
freezeobj
'Circles are positioned around the torso.
CreatePrim "Circle", "NurbsCurve"
Rotate , 90, 0, 0, siAbsolute, siParent, siObj, siX
Translate , 0, 12.0711948943489, 0, siRelative, siView, siObj, siXYZ
Duplicate "circle", , 2, 1, 1, 0, 0, 1, 0, 1
Translate , 0, 3.15622985769674, 0, siRelative, siView, siObj, siXYZ
Scale , 0.66, 0.66, 0.66, siRelative, siLocal, siObj, siXYZ
'Deform by spine is launched.
'The command's interaction permits picking a second circle.
SelectObj "circle", , True
Scale , 0.66, 0.66, 0.66, siRelative, siLocal, siObj, siXYZ
SelectObj "Man.Man", , True
ApplyDeformBySpine "Man.Man;circle1,circle"
'Scale circles to change shape of the object.
SelectObj "circle", , True
Scale , 0.1, 0.1, 0.1, siRelative, siLocal, siObj, siXYZ
SelectObj "circle1", , True
Scale , 2.0, 2.0, 2.0, siRelative, siLocal, siObj, siXYZ
'Deform by spine has an adjunct property like flexible envelopes do.
'It is found under DeformBySpineWeightCls cluster.
'Here we change the radius of influence.
SetValue "Man.Man.polymsh.cls.DeformBySpineWeightCls.Envelope_Weights.spinewgtmapop.radius", 3
'View results
SelectObj "Man.Man", , True
SetValue "Man.Man.geomapprox.gapproxmosl,Man.Man.geomapprox.gapproxmordrsl", Array(1, 1)
SetDisplayMode "Camera", "shaded"

2. VBScript Example

' Create a Mesh Grid and Nurbs circle objects:
set CircleObj = CreatePrim( "Circle", "NurbsCurve" )
set GridObj = CreatePrim( "Grid", "MeshSurface" )
Rotate , 90, 0, 0
' Apply a Spine deform on the Grid, using the circle as deformer:
DeformSpineOp = ApplyDeformBySpine( GridObj & ";" & CircleObj )
Application.LogMessage DeformSpineOp
' Now translate the circle and notice the deformation:
Translate CircleObj, 0, 0, 3
'========================================================
'OUTPUT:
'INFO : "grid.polymsh.cls.DeformBySpineWeightCls.Envelope_Weights.spinewgtmapop"

See Also

SIApplyDeformBySpine Deform and Assignment Operators