leytonian Posted September 29, 2016 Share Posted September 29, 2016 Hi I create a small python script in the filename entry to load my files. The python code returns the correct file name and path in the filename box. It is all good. But the problem is that I cant get it to load files automatically as the frame advances. I ahve to manually press "reload sequence" on every frame. Please bear in mind that the file names are generated at each frame by reading file names in certain folders so there is no pregenerated file scheme. I tried hou.iu.triggerUpdate but that did not do anything. I also tried the to eval the Reload sequence parm which is reload. That did not work either. I am hoping that someone here might have a better suggestion to get the reload going. Because as of now I cant render. Render out or Rop out does not work because it is not loading the files ;( Quote Link to comment Share on other sites More sharing options...
Atom Posted September 29, 2016 Share Posted September 29, 2016 (edited) You can place a force cook in the Pre-Frame Script field of the Render ROP, MDD or File Cache. Make sure to change the expression language to from hScript to Python. Adjust the path to your node. hou.node('/obj/my_python_node').cook(force=True) This won't help your frame change but it will cause your script to run every frame during the render. Edited September 29, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
leytonian Posted September 30, 2016 Author Share Posted September 30, 2016 @Atom That was very helpful thank you so much. That helped me out with ironing out couple other issues as well. Quote Link to comment Share on other sites More sharing options...
narbuckl Posted October 24, 2016 Share Posted October 24, 2016 You can also use node.parm("reload").pressButton() function Heres a shelf tool I made for myself one day to reload anything in my scene pointing to outside files: import hou, toolutils, os, sys def getNodes(type): return toolutils.findAllChildNodesOfType(hou.node("/"),type,dorecurse=True) def reloadFiles(): for node in getNodes("file"): ## Replace file with whatever operator type you want print ("Reloading: " + node.name() + " @ " + node.path() ) try: node.parm("reload").pressButton() ## replace reload with whatever the name of the button is print "Success!" except: print ("Failed To Reload: " + node.name() + " @ " + node.path()) continue reloadFiles() It may be a little overkill but I found it to work pretty well -Nathan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.