ChainRoot.AddBone

説明

このチェインの終点に ChainBone エレメントを追加します。

スクリプト 構文

oReturn = ChainRoot.AddBone( NewEffectorPosition, [BoneType], [Name] );

戻り値

ChainBone

パラメータ

パラメータ タイプ 詳細
NewEffectorPosition SIVector3または x,y,z の値を含む配列 新しいエフェクタの位置
BoneType siChainBoneType 追加するボーンのタイプ

デフォルト値:siChainBonePin

Name String 新しいチェインの名前

VBScript の例

'VBScript example
'effector for first bone
set oEff1 = XSIMath.CreateVector3()
oEff1.x = 3
oEff1.y = 3
oEff1.z = 3
'effector for second bone
set oEff2 = XSIMath.CreateVector3()
oEff2.x = 6
oEff2.y = 0
oEff2.z = 0
'construct skeleton
set oRoot = ActiveProject.ActiveScene.Root
set oChain = oRoot.Add3dChain()
set oBone1 = oChain.AddBone(oEff1, siChainBonePin, "TheFirstBone")
set oBone2 = oChain.AddBone(oEff2, siChainBoneBallJoint)