0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Maya TransformAttributesの値だけをリセットしたい

Last updated at Posted at 2019-09-27

MayaでRigを組んでいるときに
「Translate, Rotate, Scaleを一気に初期化したい!」というタイミングが何度もありました。
そこで、複数オブジェクトのトランスフォーム値を初期化するMELを書きました。
マーキングメニューに登録して使ってみてください。
https://youtu.be/1IdIZQhr6Jk

string $obj[] = `ls -sl`;
for ($objSel in $obj)
{
select $objSel;
setAttr .t 0 0 0;
setAttr .r 0 0 0;
setAttr .s 1 1 1;
}

単純なプログラムですが、
以下の方法でリセットが効かなかったり、手順が多いので良い方法とは言えませんでした。

方法1
Modify > Reset Transformations
⇒Rigのカーブだけでなく、対象のジョイントまでリセットされてしまう。
(または、Rig自体がスキンアタッチされている場合はエラーになり、リセットがきかない)

方法2
Channel Boxで0クリアする。
⇒Channel Boxを開いて、TranslateとRotateを選び、0を入力する。
これだけで3ステップを踏んでしまっている。これを1ステップにしたい。

方法3
アニメーションキーで初期状態を入れる。
⇒キーをあらかじめ打っておくと、邪魔になることがある。
また、キーを後から流し込むのも、Rigに変更があれば流し込みが出来ない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?