Creating directories and using sed for render-time text-edits.
Some cool rendering tricks.
Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 10:17 PM
CREATE HIERARCHY OF FOLDERS THAT REPRESENT NETWORK
this is good for Output Picture, so you can make subnets based on
object names, and inside containing the passes.
The final result would name the file the name of the pass, in a folder of the name of the pass, in a folder of the name of the object.
$RENDER/`opname("../.")`/`opname(".")`/`opname(".")`$F4.pic
Then use this to create folders on disk in the same hierchy as render outputs.
set SOP = `oppwf()`
setenv RPATH = `chs("$SOP/rpath")`
set NAME = `chs("name")`
ucd $RPATH
set NEWF = ${NAME}_`arg(system(date),1)+arg(system(date),2)`_`strreplace(arg(system(date),3),":","")`
umkdir $NEWF
setenv RPATH = ${RPATH}$NEWF
foreach z (`run("opfind -t mantra -p $SOP")`)
set z = `strreplace(strreplace($z,"$SOP/ROP",""),"/"," ")`
ucd $RPATH
for i = 0 to `eval(argc("$z")-1)`
umkdir `arg("$z",$i)`
ucd `arg("$z",$i)`
end
end
Here is a cool way to automate creating directories without overwriting...
* settings in the mantra node:
Output Picture:
$HIP/$RPATH/pic$F4.pic
Pre-Render Script:
setenv RPATH = `arg(system(date),1)+arg(system(date),2)`_`strreplace(arg(system(date),3),":","")`;
umkdir $RPATH;
SED RENDER
cat test.ifd |sed -e 's@/home/houdini/3d/houdini/00__content@placer@g' | mantra
Downloads:
Download: render.sh 477 B
Please login or Click Here to register for downloads
Scripting Render Tricks by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
