Hi all advance!
I try to set all Sub Children Nodes Matte for render,
because the file with FBX, just give houdini a lot a lot of nodes…
my company maya file can't export for mdd….will broken…
so I just only find the way to auto set all nodes Matte Object.
I can't get it work , have anybody help me?
Thanks!!
here is my code
——————————
selNodes = hou.selectedNodes()
for i in selNodes:
for j in i.allSubChildren():
if j.type() == ‘geo’:
j.evalParm('vm_matte',1)
print 1
print j.type() :wink:
Hi how to set all sub children nodes matte?
3397 6 2- wei750830
- Member
- 46 posts
- Joined: 1月 2012
- Offline
- pinkwerks
- Member
- 49 posts
- Joined: 1月 2007
- Offline
Something closer to this? You weren't setting the value before, you were just getting it with eval(). Also, you have to test on type().name().
selNodes = hou.selectedNodes()
for i in selNodes:
for j in i.allSubChildren():
if j.type().name() == ‘geo’ and j.parm('vm_matte') != None:
j.parm('vm_matte').set(1)
selNodes = hou.selectedNodes()
for i in selNodes:
for j in i.allSubChildren():
if j.type().name() == ‘geo’ and j.parm('vm_matte') != None:
j.parm('vm_matte').set(1)
- wei750830
- Member
- 46 posts
- Joined: 1月 2012
- Offline
- wei750830
- Member
- 46 posts
- Joined: 1月 2012
- Offline
- pinkwerks
- Member
- 49 posts
- Joined: 1月 2007
- Offline
- tamte
- Member
- 8592 posts
- Joined: 7月 2007
- Offline
I strongly recommend using Forced Matte parameter on mantra and ignore all takes and python hassle for such simple task
just type your node there like
object1
and it will be forced to render as matte
or if you want all it's children type
object1/*
you can type list of objects there, or bundle names, patterns, simply anything that will match 0-n objects
also other lists on mantra/Objects tab are very useful and essential for organizing your render passes
try not to use takes if you don't need to, keep your scene flexible and manageable
just type your node there like
object1
and it will be forced to render as matte
or if you want all it's children type
object1/*
you can type list of objects there, or bundle names, patterns, simply anything that will match 0-n objects
also other lists on mantra/Objects tab are very useful and essential for organizing your render passes
try not to use takes if you don't need to, keep your scene flexible and manageable
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- wei750830
- Member
- 46 posts
- Joined: 1月 2012
- Offline
-
- Quick Links