SaveDeformKey

詳細

ポーズベース デフォメーションのキーを保存します。 このコマンドは、クラスタ内ポイントの現在の位置を、ポイントのリンク先である現在のパラメータ値に関連付けます。

ポーズベースのデフォーメーション(マルチリンク パラメータに基づく)を使用すると、クラスタのシェイプを複数のパラメータに同時にリンクできます。 結果として得られるシェイプは、パラメータによって定義される空間内でスムーズに補間されます。 ポーズベースのデフォメーションは、筋肉のシェイプをボーンの方向などのパラメータにリンクする場合に特に便利です。

スクリプト構文

oReturn = SaveDeformKey( [InputObj], ClusterShapeKey );

戻り値

キーを戻します。

パラメータ

パラメータ タイプ 説明
InputObj 文字列 ポイント、クラスタ、またはオブジェクト

デフォルト値: 現在選択されている値

ClusterShapeKey 文字列 デフォームの設定に使用するクラスタ シェイプ キー

VBScript の例

' This example illustrates how to control the shape of an object (a sphere) based 

' on two parameters: its position in x and in z.

NewScene

' Here we create the geometry that will be deformed

CreatePrim "Sphere", "MeshSurface"

' We create the specific cluster that will be deformed

SelectGeometryComponents "sphere.pnt[4-6,11-13,18-20,25-27,32-34,39-41,46-48,53-55]"

CreateCluster

' We link the deformation of the new cluster to the position of the sphere in x and z

LinkDeform "sphere.polymsh.cls.Point", "sphere.kine.global.posz,sphere.kine.global.posx"

' Finally we model and save deform keys defining the relationship between the different

' sphere positions and the shape

Translate "Sphere", -10, 0, 0, siAbsolute, siParent, siObj, siX

ActivateVertexSelTool

Scale "sphere.polymsh.cls.Point", 0.267441860465116, 1, 1, siRelative, siLocal, siObj, siXYZ

SaveDeformKey "sphere.polymsh.cls.Point"

Translate "Sphere", 10, 0, 0, siAbsolute, siParent, siObj, siX

Scale "sphere.polymsh.cls.Point", 0.313953488372093, 1, 1, siRelative, siLocal, siObj, siXYZ

SaveDeformKey "sphere.polymsh.cls.Point"

Translate "Sphere", 0, 0, 10, siAbsolute, siParent, siObj, siZ

Scale "sphere.polymsh.cls.Point", 1, 1, 0.302325581395349, siRelative, siLocal, siObj, siXYZ

SaveDeformKey "sphere.polymsh.cls.Point"

Translate "Sphere", 0, 0, -10, siAbsolute, siParent, siObj, siZ

Scale "sphere.polymsh.cls.Point", 1, 1, 0.27906976744186, siRelative, siLocal, siObj, siXYZ

SaveDeformKey "sphere.polymsh.cls.Point"

' To see the result translate the sphere in the XZ plane. The multi-link interpolator 

' calculates a smooth blending between the deform keys over the space defined by the 

' two parameters.

関連項目

LinkDeform ApplyDeformKey