vtrvtr Posted November 4, 2016 Share Posted November 4, 2016 (edited) Hello I'm trying to make a little script that would check which frame was the last one rendered and then would continue the rendering process if necessary. It's a Windows machine The easiest way I could think of doing it was simply using the subprocess module to call the hrender script with the proper arguments, but I having some trouble The relevant code is def main(): last_known_frame = get_last_frame(RENDER_DIR) if last_known_frame is not None: hrender_command = "hrender -e -f {} {} -d {} {}.hip".format(last_known_frame, END_FRAME, OUTPUT_DRIVER, PROJECT_NAME) os.chdir("V:\Programs\Side Effects Software\Houdini 15.5.607\\bin") subprocess.call([hrender_command], shell=True) However, I get a "hrender -e -f... is not a recognized as an internet command..." I tried using subprocess.call(["hrender", hrender_command], shell=True), with the proper path to the HIP file, but then it calls it like they were two different arguments, which isn't the case So three questions Is what I'm doing possible? What am I doing wrong? Is there a better way? Regarding the second question, I superficially searched how to use HOM on a generic script but apparently you need to assign PATH variables and such on Windows, it looks like a mess I would prefer to avoid if possible Thank you Edited November 18, 2016 by vtrvtr Solved Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted November 18, 2016 Author Share Posted November 18, 2016 In case someone wonders this in the future You can use hython.exe in the /bin/ folder as the interpreter. In my case I was using Sublime so I created a build to the interpreter and that's all you need to do. hou will be available. Then you can execute the script with hython with a .bat file or whatever 1 Quote Link to comment Share on other sites More sharing options...
AYYAPPAN Posted February 14, 2017 Share Posted February 14, 2017 is this is a plugin or software hython 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.