SIApplyDeformBySpine

Introduced

v1.0

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 = SIApplyDeformBySpine( [ConnectionSet], [Interactive], [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. Once the command is executed, this argument returns the resulting ConnectionSet (for instance, if Interactive was TRUE, then the picked objects are included in the returned ConnectionSet).

Default Value: Currently selected objects are used as the main group.

Warning: An error occurs if the connection set is invalid. Please verify the connection set required for this operator to avoid breaking your scripts.

Interactive Boolean True to prompt the user to pick objects when the ConnectionSet doesn't include a secondary group.

Default Value: False

ConstructionMode siConstructionMode Specifies in which construction mode to apply the operator.

Default Value: Use the current construction mode

Examples

1. VBScript Example

'This example shows how to deform a grid using a circle.

'The circle is the curve spine used to deform the grid.

newscene

dim obj, crv

set obj = CreatePrim( "Grid", "MeshSurface" )

set crv = CreatePrim( "Circle", "NurbsCurve" )

Rotate crv, 90, 0, 0, siAbsolute, siParent, siObj, siX

Scale crv, 0.75, 0.75, 0.75, siAbsolute, siParent, siObj, siX

SIApplyDeformBySpine obj & ";" & crv

'moving the circle will deform the grid

Translate crv, 0, 5, 0, siAbsolute, siParent, siObj, siY

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 = SIApplyDeformBySpine( 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

ApplyDeformBySpine