[Sidefx-houdini-list] Post/Pre Frame/Render python script in ROPs

Olivier Maury omaury at ilm.com
Tue Aug 30 17:09:24 EDT 2011


Thanks a lot Steven! I just understood that the text field was taking 
python code directly, not a filename, or at least not as is.
O.

steven ong wrote:
> Hi Olivier,
>
> I just tried this and it's working for me. I've attached an opscript 
> of the ROP I created.
>
> Hope it helps.
>
> Cheers!
> steven
>
>
> # Automatically generated script: Tuesday August 30, 13:12 2011
> \set noalias = 1
> set saved_path = `execute("oppwf")`
> opcf /out
>
> # Node shell1 (Driver/shell)
> opadd -n shell shell1
> oplocate -x 2.8262 -y 3.59582 shell1
> opspareds "" shell1
> opparm shell1 execute ( 0 ) renderdialog ( 0 ) trange ( off ) f ( 1 
> 240 1 ) take ( _current_ ) switcher ( 1 1 ) command ( ls ) shellexec ( 
> on ) initsim ( off ) tprerender ( on ) prerender ( 
> 'hou.ui.displayMessage("foo")' ) lprerender ( python ) tpreframe ( off 
> ) preframe ( "" ) lpreframe ( python ) tpostframe ( off ) postframe ( 
> "" ) lpostframe ( python ) tpostrender ( off ) postrender ( "" ) 
> lpostrender ( python )
> chlock shell1 -*
> chautoscope shell1 -*
> opcolor -c 0.8 0.8 0.8 shell1
> opset -d off -r off -h off -f off -y off -t off -l off -s off -u off 
> -c off -e on -b off shell1
> opexprlanguage -s python shell1
>
> opcf /out
> opcf $saved_path
>
> Olivier Maury wrote:
>> Hi,
>>
>> I'm trying to run a python script as one of the pre/post render/frame 
>> scripts in a shell ROP.  Even with an empty python file, the shell 
>> ROP becomes red and I get a python syntax error that points to the 
>> empty file.  I'm probably missing something obvious, anyone care to 
>> share how to do this successfully?
>>
>> Thanks,
>> O.
>>

-- 
Olivier Maury
Industrial Light + Magic




More information about the Sidefx-houdini-list mailing list