Jump to content

Resimulate script


Drughi

Recommended Posts

Hi!

I want to share a little shelf tool script wich is pressing the Reset Simulation Button for you while beeing in a Dopnet or Solver. I found it to be very useful. 

Hope it is helpful to someone. If you have suggestions on doing it in a cleaner, better way - let me know. I'm still learning Python. :) 

Cheers!

#Resim by Johannes Heintz
import os
path =  hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor,0).pwd().path()
test = 0

while test < 10:
    test += 1
    node = hou.node(path)
    if node.parm("resimulate"):
        test = 10
        button = path + "/resimulate"
        hou.parm(button).pressButton()
        print "WORKED"
    else:
        path = os.path.dirname(path)

 

Edited by Drughi
  • Thanks 1
Link to comment
Share on other sites

11 hours ago, Jesper Rahlff said:

you can also press P in the scene view and it will bring up a parameter window displaying the top level parameters of the dopnet. Then just press reset simulation

Nice! But it seems this also doesn't work with sop solvers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...