Hi! Here's a simple question: Let's say I do a render with mutiples planes and render layers, is it possible to have folders automatically created at rendertime instead of creating them all manually. Maya as that kind of option and it's a real time saver.
Exemple: if you write this as the render image name: <Scene>\<RenderLayer>\<RenderLayer>.
It will create a path with your scene name, another subfolder with your render layer name, and than the image will have the name of the render layer…I use that ALL the time and really wish I could do the same thing in Houdini…maybe I can, but I don't know how…
I've always done this using a simple python script run from my Pre-Render script.
You can put the following code in a python module, then import it and run it in the script parm.
import hou import os
def verifyPlanePaths(rop_node): “”“ Ensure that all directories of Extra Images Planes are created. ”“” # Get the number of planes. num_planes = rop_node.evalParm(“vm_numaux”)
for i in range(num_planes): # Skip Disabled planes. if rop_node.evalParm(“vm_disable_plane%s” % i): continue
# Using external file. if rop_node.evalParm(“vm_usefile_plane%s” % i): # Get the target file path. file_path = rop_node.evalParm(“vm_filename_plane%s” % i) # Get the directory component of the path. dir_path = os.path.dirname(file_path) # If the target directory doens't exist, create it. if not os.path.isdir(dir_path): os.makedirs(dir_path)
In the Pre-Render script, set the language to Python and then add this, renaming rendermodule with whatever your module name is called.