houdini python self tools

2024-01-07 22:29:44

01.geo 对应创建mantra

import hou 
null_path=[]
for i in hou.selectedNodes():
    mantra=hou.node('out').createNode('ifd','{0}'.format(i.name()))
    mantra.parm('trange').set(1)
    frame=hou.parmTuple('{0}/f'.format(mantra.path()))
    frame.deleteAllKeyframes()
    for s in i.children():
        if s.type().name()=='null':
            null_path=s.path()
            star=hou.parm('{0}/start'.format(null_path)).eval()
            end=hou.parm('{0}/end'.format(null_path)).eval()
    star=int(star)
    end=int(end)
    mantra.parm('f1').set(star)
    mantra.parm('f2').set(end)
    mantra.moveToGoodPosition()
    

文章来源:https://blog.csdn.net/JACKLONGFX/article/details/135445902
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。