Last active
March 6, 2018 00:16
-
-
Save yamadaaaaaaa/ac128a66e42606e6c0f5ea7e7da23fdb to your computer and use it in GitHub Desktop.
search node for houdini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hou | |
import re | |
_node = hou.node('/obj/geo1/') | |
# 選択ノード指定でやりたいときはこっち | |
''' | |
_nodes = hou.selectedNodes() | |
if len(_nodes) != 0: | |
_node = oNodes[0] | |
''' | |
# 指定ノード以下の子を処理 | |
_children = _node.children() | |
for child_item in _children: | |
# materialと名の付くノード以外は無視 | |
if not re.search("material",child_item.name()):continue | |
# 更にlambertと名の付くパラメーター以外は無視 | |
if not re.search("lambert",child_item.parm("shop_materialpath1").eval()):continue | |
print "<" + child_item.name() + '>' + child_item.parm("shop_materialpath1").eval() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment