Jump to content

Search the Community

Showing results for tags 'pyro shelf'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering + Solaris!
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Name


Location


Interests

Found 1 result

  1. Houdini's pyro shelf tools create 3 nodes on /obj/ level. I really hate that and got tired of copy+paste+renaming nodes... I wrote a simple shelf tool python script to fix that. It works for PyoFX and Sparse PyoFX shelf tools. hope someone finds it useful and if anyone can improve that script or make it more generic, please post it here... import re # move dopnet to SOPs def dopnet2sop(): # find first dopnet (assuming there's only one) # replace relative external paths to absolute paths dopnet=hou.nodeType("Object/dopnet").instances()[0] sourceNode='' for dopnode in dopnet.children(): for parm in dopnode.parms(): nodepath=parm.evalAsNode() if nodepath!=None and len(nodepath.path().split(dopnet.path()))==1: # convert to absolute path path = parm.evalAsNode().path() parm.set(path) # find the pyro source's path if dopnode.type().name()=='volumesource': sourceNode=hou.node(path) sopDopnet = sourceNode.parent().createNode("dopnet") pos = sourceNode.position() sopDopnet.setPosition((pos[0],pos[1]-1)) hou.copyNodesTo(dopnet.children(),sopDopnet) dopnet.destroy() return sopDopnet # set dopnet as reference in dopnode's path def fixdopio(dopnet): di=None for dopio in hou.nodeType("Sop/dopio").instances(): dp=dopio.evalParm("doppath") dn=dopio.evalParm("dopnode") r = '`chsop("doppath")`' a = re.sub(dp,r,dn) dopio.parm("dopnode").set(a) dopio.parm("doppath").set(dopnet.path()) di=dopio return di # move import nodes to SOPs def moveDopioNodes(sopDopnet,dopio): dopIoParent=dopio.parent() # find highest node on y axis x=0 y=0 for i in dopIoParent.children(): pos=i.position() x=min(x,pos[0]) y=max(y,pos[1]) ioNodes=hou.copyNodesTo(dopIoParent.children(),sopDopnet.parent()) diffx=x-sopDopnet.position()[0] diffy=y-sopDopnet.position()[1] for ioNode in ioNodes: pos = ioNode.position() ioNode.setPosition((pos[0]-diffx,pos[1]-diffy-1)) dopIoParent.destroy() # remove unused Output dop nodes def removeUnusedOutputnodes(): for out in hou.nodeType("Dop/output").instances(): if len(out.inputs())==0: out.destroy() # move dopnet and dopio to SOPs hou.setUpdateMode(hou.updateMode.Manual) sopDopnet=dopnet2sop() dopio=fixdopio(sopDopnet) moveDopioNodes(sopDopnet,dopio) removeUnusedOutputnodes() hou.setUpdateMode(hou.updateMode.OnMouseUp)
×
×
  • Create New...