Jump to content
Sign in to follow this  

Hrender from different path [solved]

Recommended Posts


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 by vtrvtr

Share this post

Link to post
Share on other sites

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


  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this