Command line render help

   4414   2   1
User Avatar
Member
33 posts
Joined: Sept. 2009
Offline
I seem to be fighting with this and am getting frustrated. I could use some help

I'm trying to setup the output path for a geometry rop via either Hscript expressions or python. Everything works fine interactively but when I tried to use hbatch I get render failed?

I have a spare channel where I set the sim directory as that can change.

Here's my pre-render script to set the output path:

import os

node = hou.node('.')
simPath = node.parm('sim_dir').eval()
simFile = simPath + hou.hipFile.name().split(“/”) + (“/”) + node.name() + (“\$WEDGE.\$F.bgeo.gz”)
o = node.parm('sopoutput')
o.set(simFile)

path = os.path.dirname(hou.parm('sopoutput').eval())
if not os.path.exists(path):
os.makedirs(path)


All I really care about is:
picking the sim folder and putting the sim in a new folder based on the scene name AND render at the command line.

This all works in an interactive houdini session but fails miserably in hbatch?

In hbatch I am executing:

cd /out
render myRop


Note, if i just hard code a path by hand in the sopoutput, hbatch is happy. It seems be not happy with my pre-render script?
I'm on windows 7

help please, I am cool with either using hscript or python expressions, ANYTHING that will allow me to render at the command line l
tia
User Avatar
Member
33 posts
Joined: Sept. 2009
Offline
Ok so i looked at hython

I drag and drop my scene name onto the hython.exe and execute the following:


node=hou.node(“/out/myrop”)
node.render()


While it did do the render it looks like it put it in the wrong path! I wonder if this is a windows problem?
.
the path should have been and does works interactively….
c:\cache\rop_test_v01\myrop.$F.bgeo.gz

Instead it got dumped to:
c:\cache\full\path\to\hipfile\rop_test_v01\myrop.$F.bgeo.gz

It appears my expressions are not being evaluted via hbatch. I tried converting it all to hscript with this code:


`chs(“/out/geometry_streams/sim_dir”)``strreplace($HIPNAME, “.hip”, “”)`/geometry_wedge_seed_`opdigits(“.”)`.000000.$F.bgeo.gz


and it looks like all that mess does not expand properly at the command line, only works in textport or if i hit render in the interactice session?
It appears $HIPNAME is full path to hip file, also if I put $HIPNAME:r, it still evals to full path to hip file only on command line
Not sure what black magick is happening inside houdini interactive session vs command line

sigh this is really crazy
User Avatar
Member
33 posts
Joined: Sept. 2009
Offline
nevermind i had tunnel vision and didn't know spelling all fixed thanks
  • Quick Links