ApplyDeformBySpine

導入

v1.0

詳細

スプラインによるデフォメーションを適用します。これにより、オブジェクトおよび(または)クラスタは 1 つまたは複数のカーブのデフォメーションに応じてデフォームされます。

スクリプト構文

oReturn = ApplyDeformBySpine( ConnectionSet, [ConstructionMode] );

戻り値

新しく作成されたスパインの WeightMap オペレータのオブジェクト名を戻します。

パラメータ

パラメータ タイプ 説明
ConnectionSet ConnectionSet オペレータに接続されるオブジェクトを指定します。

ConnectionSet の第 1 のグループには、頂点ベースのオブジェクトが含まれます。 ConnectionSet の第 2 のグループには、NURBS カーブ オブジェクトが含まれます。

ConstructionMode siConstructionMode デフォメーションの目的を指定するモードです。

デフォルト値::現在のコンストラクション モード

1. VBScript の例

'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 の例

' 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"

関連項目

SIApplyDeformBySpine