kleer001 Posted July 4, 2014 Share Posted July 4, 2014 (edited) EDIT: All I had to do was change the channel scripting language to python. That handy little pull down on the right hand side IS NOT for the channel contents, it's for the imported script. Ugh. Totally fixed. Btw, here's some code fixing sideFx's blind side on creation of folders for image planes. ---------- Sadly the new coolness of "Create Intermediate Directories" doesn't work for image plane folders with global variables in their name. I've already submitted and RFE. And I'm working on some tiny little python to help out, but it doesn't seem to do the job. I've got 5 image planes standard in this pipe I wanna toss together: import os import hou self_mantra = "/out/"+hou.expandString("$OS") for i in range(1,6): chan_name = self_mantra + "/vm_filename_plane" + str(i) plane_chan = hou.parm(chan_name) plane_chanVal = plane_chan.eval() plane_bits = plane_chanVal.split('/') folder_name = '/'.join(plane_bits[:-1]) if not os.path.exists(folder_name): os.makedirs(folder_name) Right? That looks fine to me. All the pieces work. I've slapped it into the pre-render script channel as an expression. So, it should run once before the frame starts, right? But it doesn't seem to run at all. Ugh, what did I miss?! Does this work for you? What do you do to make those directories automagically? Edited July 4, 2014 by kleer001 Quote Link to comment Share on other sites More sharing options...
kleer001 Posted July 8, 2014 Author Share Posted July 8, 2014 (edited) and some more code for the remedial home pipeline builder: import os import hou # requires $SHOW/EPISODE/SEQ/SHOT/VER pipeline global variables # along with the formatted Different File paths like: # $JOB/renders/${SHOW}_${EPISODE}_${SEQUENCE}_$SHOT/$ELEM/$VER/ # Spec/${SHOW}_${EPISODE}_${SEQUENCE}_${SHOT}_${ELEM}_${OS}$VER.S.$F4.tif self_mantra = "/out/"+hou.expandString("$OS") # hard coded to 16 just because 16 layers is a lot for i in range(1,16): chan_name = self_mantra + "/vm_filename_plane" + str(i) switch_chan = self_mantra + "/vm_disable_plane" + str(i) plane_chan = hou.parm(chan_name) if plane_chan != None: if not hou.parm(switch_chan).eval(): plane_chanVal = plane_chan.eval() plane_bits = plane_chanVal.split('/') folder_name = '/'.join(plane_bits[:-1]) if not os.path.exists(folder_name): os.makedirs(folder_name) Edited July 8, 2014 by kleer001 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.