Just a product shot
Dec 22, 2017
I get from my clients STP files with the same components and to quickly add the materials in hundreds of objects, I wrote a small script. It copies the materials for the same components.
It just needs to strings from subnets as inputs.
def copyMat(node):
myobj = node.path()
src = hou.node(myobj).evalParm('sourceGeo2')
dest = hou.node(myobj).evalParm('compareGeo2')
for bchild in hou.node(dest).children():
for child in hou.node(src).children():
if bchild.name() == child.name():
oldName = child.evalParm("shop_materialpath")
bchild.parm('shop_materialpath').set(oldName)
bchild.setColor(hou.Color((5,0.0,0)))
COMMENTS
Please log in to leave a comment.