[Sidefx-houdini-list] Resolving path names

Nick Nimble nick at nicknimble.com
Tue Feb 4 14:52:37 EST 2014


Hi,

I've found that the best place to store version information, that goes 
along with the hipfile, is on nodes. For more information about storing 
data on nodes: http://www.sidefx.com/docs/houdini13.0/hom/nodeuserdata

I also found that for some reason the root node isn't saved with the 
hipfile but recreated every time. We don't see it but / is a node that 
lives above the obj (object level) node where your actual objects live 
inside. For me it made sense to use the /obj/ node to store my version 
information. To define or set it I use this code in a shelf button 
script where I grab the version from the hipname: 
hou.node("/obj").setUserData('version', str('01')) Then on any node you 
can call for this version by using: 
hou.node("/obj").userDataDict()['version'].

I'm currently not near my workstation but I can share the code later 
this week. Its quite simple but it works for me like a charm :-)

Cheers,
Nick, be Nimble
-- 2014 the year where things become clearer --
+31 622 4243 94 | www.nicknimble.com | www.facebook.com/nicknimble

On 04/02/14 18:17, steven ong wrote:
> Hi,
>
> IMHO, it's more effective to create environment variables for shots,
> versions etc that's global to the network/farm so every machine will
> be able to resolve the path/variables properly.
>
> To resolve your issue in the meantime, you can create a string
> parameter for the automatically create path and add a button, when
> clicked, that will run the python command and set the evaluated path
> to the correct parameter with either opparm or hou.Node.parms()
>
> opparm /path/to/node parmName "yourFinalPath"
>
> hou.node('/obj/geo1/file1').parm('file').set("boo")
>
> I'm no python guru (more hscript person) so there are better ways to
> do what you want. I'm sure others will chime in.
>
> Hope the above helps.
>
> Cheers!
> steven
>
>
>> Hello all,
>>
>> Apologies in advance for the noob question, but we have just got
>> Houdini
>> in to the pipeline here and I am trying to get my head around some
>> issues to submit to the render farm.
>>
>> Our Lead lighter has setup a nice method for paths that automatically
>> fills in sections depending on shot,version, output node etc... which
>> when submitted to the farm causes some chaos.
>>
>> I want to have a tool that resolves all paths before submitting -will
>> eventually become part of a submitter tool.
>>
>> I have found that -
>>
>> sspath = hou.parm('/out/main/soho_diskfile').eval()
>> print sspath
>>
>> gives me a nice usable path - but I am struggling to find how to set
>> that back to the parm.
>>
>> Also I would like to iterate through the scene from '/' and find all
>> paths including cache and texture paths and do the same thing.
>>
>> Can anyone please point me in the right direction to do this?
>>
>> Many thanks
>>
>> Cheers
>>
>> Sandy
>>
>> --
>> Sandy Sutherland
>> CG Supervisor
>>
>> Sunrise Productions
>> Unit B4 Westlake Square
>> Westlake 7945
>> Cape Town, South Africa
>>
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list




More information about the Sidefx-houdini-list mailing list