1
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.

ローカル回転軸の表示・非表示

Posted at

Maya標準機能でローカル回転軸を表示するとき、この操作をするかと思います。
「Display > Transform Display > Local Rotation Axes」

ただこの処理だと表示非表示のトグルになってしまい、
すべて表示、すべて非表示の挙動ができないのです、、、

なので、メモとして
「ローカル回転軸をすべて表示」するMELを貼っておきます。

例)すべてのジョイントのローカル回転軸を表示

string $objs[] = `ls -type "joint"`;
for($obj in $objs){
    setAttr ($obj+".displayLocalAxis") 1; // 0で非表示、1で表示
}

また、先ほどのfor文は、以下2点を変えれば、何でも使えます。
・ノードタイプを指定(type)
・アトリビュートに値を設定(setAttr)

例)すべてのskinClusterの最大インフルエンス数を保持にチェックして、インフルエンス数を「4」に設定する

string $objs[] = `ls -type "skinCluster"`;
for($obj in $objs){
    setAttr ($obj+".maintainMaxInfluences") 1;
    setAttr ($obj+".maxInfluences") 4;
}

注)上記のMELは
「指定ノードが存在して、アトリビュートも変更可能な状態」
を前提なので、例外処理は想定してません。

1
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
1
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?