Send nodes to new alembic export
import hou
nodes = hou.selectedNodes()
destnode = hou.node("/obj/EXPORT")
if not destnode:
destnode = hou.node("/obj").createNode("geo")
destnode.setName("EXPORTS")
for x in nodes:
name = x.name()+"_"+str(x.parent())
path= x.path()
objmergenode = destnode.createNode("object_merge")
objmergenode.parm("objpath1").set(path)
objmergenode.setName(name)
objmergenode.setColor(hou.Color(0,1,0))
alembicrop = destnode.createNode("rop_alembic")
alembicrop.setName(str(x.parent()))
alembicrop.parm("trange").set(1)
alembicrop.parm("f1").deleteAllKeyframes()
alembicrop.parm("f1").set(int("1001"))
alembicrop.parm("build_from_path").set(1)
alembicrop.setInput(0, objmergenode)
destnode.layoutChildren()
No Comments