bone_joint

ボーンの操作に使用する。


xshade
shape
bone_joint

メソッド一覧

get_limit 指定の軸での稼動角度の最小値と最大値を取得する
set_limit 指定の軸での稼動角度の最小値と最大値を設定する

プロパティ一覧

auto_direction 自動で軸合わせ
axis_dir 自動で軸合わせのときの軸方向
matrix ボーンの変換行列
offset ボーンの位置のオフセット値
range ローカルのXYZ軸ごとの回転角度の範囲制限
rotation 回転(quaternion)
size ボーンの大きさ




メソッド詳細

get_limit

指定の軸での稼動角度の最小値と最大値を取得する。
戻り値 :
  vec2
引数 :
  int : 軸番号 (X:0, Y:1, Z:2)

#選択形状がボーンの場合に、X軸での稼動角度の最大・最小値を出力
print xshade.scene().active_shape().bone_joint.get_limit(0)

set_limit

指定の軸での稼動角度の最小値と最大値を設定する。
引数 :
  int : 軸番号 (X:0, Y:1, Z:2)
  vec2 : 稼動範囲

稼動範囲は-1.0で-180度に相当、1.0で180度に相当。

#選択形状がボーンの場合に、X軸での稼動角度の最大・最小値を指定
xshade.scene().active_shape().bone_joint.set_limit(0, [-0.8, 1.0])

プロパティ詳細

auto_direction

ボーンの軸の方向を自動的に再設定する。

  • 取得
  • 設定

型 :
  bool


#選択形状がボーンの場合に、軸の自動合わせの設定を出力
print xshade.scene().active_shape().bone_joint.auto_direction

axis_dir

ボーンの軸の方向を自動的に再設定するときの、軸の方向の設定。

  • 取得
  • 設定

型 :
  vec3


#選択形状がボーンの場合に、軸の自動合わせのときの軸の方向を出力
print xshade.scene().active_shape().bone_joint.axis_dir

matrix

ボーンの変換行列。

  • 取得
  • 設定

型 :
  mat4

#選択形状がボーンの場合に、変換行列を出力
print xshade.scene().active_shape().bone_joint.matrix

offset

ボーンの位置のオフセット値。

  • 取得
  • 設定

型 :
  vec3

#選択形状がボーンの場合に、ジョイントとしてのオフセット値を出力
print xshade.scene().active_shape().bone_joint.offset

range

ローカルのXYZ軸ごとの回転角度の範囲制限を行うか。

  • 取得
  • 設定

型 :
  bool

#選択形状がボーンの場合に、範囲のOn/Offを出力
print xshade.scene().active_shape().bone_joint.range

rotation

回転(quaternion)。

  • 取得
  • 設定

型 :
  quaternion

#選択形状がボーンの場合に、ジョイントとしての回転を出力
print xshade.scene().active_shape().bone_joint.rotation

size

ボーンの大きさ。

  • 取得
  • 設定

型 :
  float

#選択形状がボーンの場合に、ボーンの大きさを出力
print xshade.scene().active_shape().bone_joint.size