[Sidefx-houdini-list] Backslash treated as an escape character

John Coldrick jc at axyzfx.com
Wed Jan 30 09:17:36 EST 2008


On Wednesday 30 January 2008 08:41, Sean Lewkiw wrote:
> I was assuming that Francois wants to automate the process of creating
> destination render dirs.  Why would it put them in $HOME/.my etc? 

	My point was that if you screw up, it will create your screwup.  If you 
formalize the process, as in a script, there's far less liklihood that there 
will be a screwup.  I'd rather have the script or houdini slap me in the face 
for being an idiot than have houdini blindly create anything I enter and 
possibly have missing files that I need to hunt down.   For example, our 
rendering script, as part of the process, will check for the existence of 
output dirs and create them, all using logic like(python sucks for email 
quoting! ;) ):

if not (os.path.isdir(os.path.join( os.path.split(options.PIC_DIR)
[0] ,'BKUPS'))):
	try:
		os.makedirs(os.path.join( os.path.split(options.PIC_DIR)[0],'BKUPS'))
	except:
		print "Seemed to have some troubles creating", os.path.join( 
os.path.split(options.PIC_DIR)[0] ,'BKUPS'), "- check your permissions"
		sys.exit()

	where options.PIC_DIR was nicely assembled using the user's input:

	options.PIC_DIR = os.path.join(JOB,"Pic",options.SCENE,options.LAYER)

	Going through all this is IMHO infinitely superior to falling back on 
something the user manually enters over and over again for each job.  I mean, 
I hear you, sure it could be an option, it's just something you could turn 
off, but it really is a non-standard approach in applications.  It forces a 
certain degree of responsibility - you have to make the output dir.  It falls 
under the category of the hated 'smart' software model.

	Cheers,

	J.C.


-- 
John Coldrick                  www.axyzfx.com        Axyz Animation
416-504-0425                                         477 Richmond St W
                                                     Toronto, ON Canada
jc at axyzfx.com                                        M5V 3E7
-----------------------------------------------------------------------
It's easier to fight for one's principles than to live up to them.



More information about the Sidefx-houdini-list mailing list