Search - User list
Full Version: local to global var
Root » Houdini Lounge » local to global var
metaclay
1/ if i create a point/primitive attribute using attribcreate SOP then make it as local variable. this local var is only available to all nodes downstream and not recognized by nodes with different tree/hierarchy.
ussually i have to access that value using point() or prim(). how to convert/change that local var to become a global var, so i can access that var directly from any nodes in my network (just by typing $VARNAME)? is it possible?

2/ if i make a custom expression/functions, that functions only available in current hip file, so if i load another project file, i have to load that function again one by one .
is there any better way so i can load them automatically?

thx
wolfwood
1.) Nope, when you create attributes with the AttribCreate SOP it adds variable mappings to the geometry. You can only access it in that local SOP chain.

2.) Look at the ex____ hscript commands. Specifically you can do a excat * > $JOB/myexpressions. Then in your 123.cmd you can add a line that exread's those expression into Houdini whenever you start a new file. Some people also use a HDA. They make some dummy HDA which doesn't do anything execpt have some expressions defined. And in the HDA's OnLoad Event script it does a exread opdef:.?myExpressions.expr. So now your expressions are wrapped up in a HDA.
metaclay
thanx a lot, that's really helpful.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB