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

Sean Lewkiw seanl at rainmaker.com
Wed Jan 30 10:20:51 EST 2008


All good points.  Our HDA does what it sounds like yours does, and the 
users can't enter their own file paths and names.  So I maintain that I 
can be trusted to make sure that the path to which I want to render my 
images is correct, and that Houdini, knowing what this path is can 
simply create it, and that's one less bit of code I have to maintain.  
It's not like Houdini doesn't create other dirs if it needs them, 
($HOME/houdini, etc). 

As an aside, Houdini used to fail with the cryptic warning "Unable to 
create script or pipe" when a target dir didn't exist.  Now it outputs, 
"No such file or directory" to the shell which is a big improvement, 
although the red flag just reports "Command Exit Code 1". 

Sean




John Coldrick wrote:
> 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.
>
>
>   

-- 
Sean Lewkiw
--
CIS London
130 Shaftesbury Avenue
London W1D 5EU
--
+44 (0) 207.031.1138 (P) (Direct)
+44 (0) 207.031.1136 (F)
+44 (0) 795.606.7245 (M)





More information about the Sidefx-houdini-list mailing list