Rafal123 Posted February 22, 2006 Share Posted February 22, 2006 Hey guys! I wanna post here question from my friend who use Houdini but which english skills r not the best. Here's the translated his stuff: --------------- "Hello everyone. It's my first post here. I hope U'll help me to make an OTL. I wanna create simple compositing setup. I render through 'Cop2/Render' ,and rendered this way frames I would like to automatically record on disk using 'Cop2/Rop File Output' (time change=Render image=save to disk) If certain frame, with certain name (i.e test.34.tga) exist on disk, then 'node Cop2/Switch' turn us to 'node Cop2/File' ,which I load. Example: if (file exist "//test.$F4.tga") load frame on disk else render frame and save on disk Tell me how I can run Button render in ROP File Output from(using) Texport Editor? --------------- Ok guys, I posted here cos there's a little bit scripting stuff. Quote Link to comment Share on other sites More sharing options...
grasshopper Posted February 22, 2006 Share Posted February 22, 2006 On a unix system you can use the test command to check that a file exists. You can call this command and capture the error status using the systemES command in Houdini's expression language: set errorStatus = `systemES("test -r $HIP/out/test.$F.tga")` test -r returns 0 if the file exists and 1 if it doesn't. If you have a ROP embedded in an asset you can trigger its render button by using an opparm command: opparm -c outputDriver execute I'm not sure I understand why you want to use the textport editor if you are building an asset. Just put your script in the asset. It can be called by pressing a button which has a callback script. Use the above check to render any missing frames without overwriting ones that exist. You can then use a standard File COP to reference all of the files back from disk. If you want, the script can also fill out the name of the files to load on the File COP. This is easiest of you promote the File COP's filename parameter up to the asset and make it a hidden parameter which can be written to by your script. And you could use another hidden parameter to store whether the files have been written successfully. If they have then you can switch in the File COP and if they haven't you can subsitite a dummy frame or whatever so that your comp doesn't break. Hope that helps ... Quote Link to comment Share on other sites More sharing options...
thomas.waldinger Posted February 22, 2006 Share Posted February 22, 2006 in the textport "opsave" should do the trick.but grasshopper`s suggestion would suite better. Quote Link to comment Share on other sites More sharing options...
Rafal123 Posted February 23, 2006 Author Share Posted February 23, 2006 hey guys! many thanks for answers but those didn't solve my problem, so here I got next issues, check it out: 1. I use Windows and command: set errorStatus = `systemES("test -r $HIP/out/test.$F.tga")` doesn't work. Are there any other way to check if certain file exist on hdd? I've tried also cygwin, UnxUtils... but command (test -r cboot.ini) doesn't return any argument. If Unix commands are the only way to go what U suggest to install and which way? 2. How can I put in OTL script to be executed in time changing? Similar to --> cop2/Render/Autoredner. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted February 23, 2006 Share Posted February 23, 2006 One rather nasty hack goes something like this set currentpath = `execute("upwd")` ucd $HIP/out set file = "test.$F.tga" set test = `execute("uls $file")` if ($test != "") then echo found $file endif ucd $currentpath I think uls and ucd are available through Houdini on windows without cygwin. This is written from memory so may have syntax errors. Quote Link to comment Share on other sites More sharing options...
Rafal123 Posted March 2, 2006 Author Share Posted March 2, 2006 many thanks for info 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.