a044ec18a9b4451c96b8b5906

a044ec18a9b4451c96b8b5906

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Hrender script on Windows Nov. 10, 2016, 8:38 p.m.

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_DIR, 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…” 

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