Hi how to set all sub children nodes matte?

   3395   6   2
User Avatar
Member
46 posts
Joined: 1月 2012
Offline
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:
User Avatar
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)
User Avatar
Member
46 posts
Joined: 1月 2012
Offline
Thank you!!
you help me a lot !!^^
thanks !!
User Avatar
Member
46 posts
Joined: 1月 2012
Offline
I have one question
when I use this script in take,
it will not key in the take,
it just set on main take setting,
have anybody know how to set for own take?
thx!
User Avatar
Member
49 posts
Joined: 1月 2007
Offline
Right click and select ‘Include in take’ ?
User Avatar
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
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
46 posts
Joined: 1月 2012
Offline
Thanks!!
this is very useful!!
  • Quick Links