No More Retake

3DCG屋さん向けTips&Referenceサイト

メニュー

Maya:絶対ワイヤーフレームOpen!

今回は、『シーンを開くときに必ずワイヤーフレーム表示で開く方法』です。
シーンにオブジェクトがいっぱいあって開くのに時間がかかる、なんて時に役立ちます。

いろいろ方法はあるかと思いますが、ここではScriptNodeを使った方法を紹介していきます。

その前にScript Nodeとは何ぞや?(マニュアル参
管理人は「シーンにMELやPythonを埋め込む機能」、と理解しています。
埋め込んだMELは、シーンファイルを開いたときや閉じるときなどに自動で実行してくれます。

なので、ワイヤーフレーム表示にするMELを書いて、シーンを開いたときにScript Nodeにオートで実行してもらう、という感じです。

では、やってみましょう。

 

①Expression Editorを開く

Window -> Animation Editors -> Expression EditorでExpression Editorを開きます。
ScriptNodeはExpression Editorから作成します。

ScriptNode001

 

②”By Script Node Name”を選択

Select Filterで”By Script Node Name”を選択。

③Script Node Nameに名前を入力

Script Node Nameに名前を入力して、”New Script Node”ボタンをポチっ。
※ここではScript Node名は”WireFrame_WFO”ってしてみました。(WFO・・・When File Openとかね)

④Execute OnをGUI Open/Closeに設定

⑤Scriptの項目はBefore

これでファイルのオープン時に作成したScriptNodeが実行されます。
肝心のスクリプトはScript欄に書きます。

スクリプトの内容ですが、こんな感じ。

string $allmPanels[] = `getPanel -type modelPanel`;

for($p in $allmPanels) {
    modelEditor -edit -displayAppearance "wireframe" $p;
}

これをScriptNodeに記述しておけばOK。
ビューポート全部をワイヤーフレーム表示にしますよ、ってMELです。
(しっかしPython慣れしてると、MELが恐ろしく書きづらい)
これで、ファイルを開く際に、オートでワイヤーフレーム表示にしてくれます。

ちなみに、作成したScriptNodはOutlinerでも、DAG objects OnlyをOFFにすることで確認できます。

以上、間違い等ありましたらご指摘を!
ではまた次回。

Related Posts Plugin for WordPress, Blogger...

関連記事

このサイトについて

3DCG Tipsサイト。Houdiniの記事が多めです。

RSS

follow us in feedly

Archives

  • 2024 (1)
  • 2023 (2)
  • 2022 (9)
  • 2021 (14)
  • 2020 (46)
  • 2019 (17)
  • 2018 (33)
  • 2017 (29)
  • 2016 (36)
  • 2015 (64)
  • 2014 (54)
  • 2013 (60)
  • 2012 (55)

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

Houdiniを使えるようになる本


Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2Fnomoreretake.net%2F2014%2F10%2F11%2Fmayawireframeopen%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.b.st-hatena.com/entry.count?url=http%3A%2F%2Fnomoreretake.net%2F2014%2F10%2F11%2Fmayawireframeopen%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132