No More Retake

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

メニュー

Nuke:Python Sample

NukeのPythonメモ

GUI操作からPythonコマンドを調べる

「Edit」->「Preferences」->Panels->”Script Editor”->echo python commands to output windowをON。次にclear input windows on successful script executionをOFF。

次に、タブがあるところ適当に右クリックして、[Windows]->[Script Editor]

これで、GUI上の操作がScript Editorの上半分に表示される。

Pythonを書く

Script Editorの下半分に書く。書いたらCtrl+Enterで実行。

ノードの作成

nuke.createNode("NODETYPENAME")

[例]nuke.createNode("Merge")

 

名前を付けてノードを作成

nuke.nodes.NODETYPENAME(name="NODENAME")

[例]nuke.nodes.Merge(name="m1")

 

名前からノードを選択し、パラメータを変更

nuke.toNode('NODENAME')["PARAMETER"].setValue(0)

[例]
nuke.nodes.Merge(name="m1")
nuke.toNode("m1")["mix"].setValue(0.5)

 

パスを指定してReadノードを作る

nuke.nodes.Read(file="FILEPATH")
[例]nuke.nodes.Read(file="C:/filepath/filename.exr")

 

ノードのコネクション

node1 = nuke.nodes.Read(file="C:/filepath/filename.exr")
node2 = nuke.nodes.Grade(inputs=[node1])

 

ノードのコネクション2

 
node1 = nuke.nodes.Read(file="C:/filepath/filename.exr") 
node2 = nuke.nodes.Read(file="C:/filepath/filename2.exr") 
node3 = nuke.nodes.Merge(inputs=[node1, node2])

参考
https://learn.foundry.com/nuke/developers/63/pythondevguide/basics.html


以下は雑談です。

実は、公開していない書きかけの記事が山ほどあったりします。
2022年4月現在で、下書きが350記事ありましたw

大抵の書きかけはメモ書き程度だったりするのですが、「あと投稿すれば終わりじゃん」みたいな状態で放置されているものもいくつかあるのです。
当時はまだまだ書くつもりだったのでしょうけど、筆を置いた時点で忘れてしまったのでしょうね。
これはそんな記事でした。
記事をひとつ書き上げるのって結構めんどくさいのですw

関連記事

  1. 2017.04.24

    Houdini:Now Loading
  2. 2018.08.18

    Houdini:Spare Input

コメントをお待ちしております

このサイトについて

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%2F2022%2F04%2F25%2Fnukepython-sample%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%2F2022%2F04%2F25%2Fnukepython-sample%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