Search - User list
Full Version: variable in textport
Root » Technical Discussion » variable in textport
clay
i got some problem , can anyone help me:

1. how can i access the value of channel in textport? for example i want to display the channel tx,ty,tz value of my /obj/geo1/box1. is there any command like ‘echo’ that can do that?
when i reach /obj/geo1/box1 then seems to hit the wall, there's no additional information i can access such channel i mentioned above.

2. i tried to access some local variables using texport. in my case i have a box then applied a transform node (xform1) to it. in my texport the path for this : cd /obj/geo1/xform1/
i can do ‘echo $GCX or $GCY $GCZ’ and it gave me the good response.
but if i tried to access other variables other than that like $CEX, $XMIN, $SIZEX etc. it always return zero (0) which is wrong. so what's going on?

3. if i have an ‘duplicate’ node and let's say i duplicate a sphere(let's name it : A)and set the number of copies to 10 for example.
i'm guessing that the output obj will be reffered using it's array index number in internal databaase such A, A …etc (am i wrong?)
in the texport or any other window ,can i access the individual obj created from this duplicate op? for example i want to access the exact value (not the relative value or the function/expression itself) of the sizex of A or A etc. in case that i need this value for debugging when working with expression.

4. i tried to tweak houdini UI. does anyone know how any variables in configuration file that can control the HIGHLIGHT color of obj like button, tab, slider etc. in houdini user interface. i've explore the files such resource, miscolor etc, but couldn't find it.

regards,
clay
old_school
1. how can i access the value of channel in textport? for example i want to display the channel tx,ty,tz value of my /obj/geo1/box1. is there any command like ‘echo’ that can do that?
when i reach /obj/geo1/box1 then seems to hit the wall, there's no additional information i can access such channel i mentioned above.

/ -> echo `ch(“/obj/geo1/tx”)
1.2095
/ -> echo `ch(“/obj/geo1/box1/sizex”)`
1
/ -> echo `ch(“/obj/geo1/box1/ty”)`
12.897
/ ->

Now to get at the actual name of the parameter, you should be able to hover over the parameter name and it should return the real underlying name which can be very different from the actual paramter name (especially so for digital asset parms). You can yank that channel then look in the clipboard, use opscript on the node and closely inspect the opparm output.

2. i tried to access some local variables using texport. in my case i have a box then applied a transform node (xform1) to it. in my texport the path for this : cd /obj/geo1/xform1/
i can do ‘echo $GCX or $GCY $GCZ’ and it gave me the good response.
but if i tried to access other variables other than that like $CEX, $XMIN, $SIZEX etc. it always return zero (0) which is wrong. so what's going on?

Rarely are global local variables directly echoing values you can rely on. Local variables that are point specific need to use either a point() or prim() expression to fetch the information. Other times, there is a specific expression to fetch what you want if the attribute is global like the size of the object (BB?) or the centroid.

You want $CEX, you need to use the centroid() expression like:

/ -> echo `centroid(“/obj/geo1/xform1”, 0)`
7

where the last 0 is the X component of the centroid and 1 is Y and 2 is Z.

or use the ever so handy bbox() expression with all it's options:

/ -> echo `bbox(“/obj/geo1/xform1”, D_XMIN)
5

where D_XMIN is the plane that defines the minimum X position of all the data in that SOP. I like the D_XSIZE, D_YSIZE, or D_ZSIZE options to return the overall size of the data in the specified SOP.

Now to get at point specific info, you need the point() expression. Let's say you want the position of point number 9 in the geometry:

/ -> echo `point(“/obj/geo1/xform1”, 9, “P”, 0)
7.66667

where 9 is the point number, “P” means the Position attribute and 0 is the first component of P where 1 is Y and 2 is Z. The attribute could be any attribute on the geometry including your own. Some common ones are “Cd”, “N”, “uv” and “life”.



3. if i have an ‘duplicate’ node and let's say i duplicate a sphere(let's name it : A)and set the number of copies to 10 for example.
i'm guessing that the output obj will be reffered using it's array index number in internal databaase such A, A …etc (am i wrong?)
in the texport or any other window ,can i access the individual obj created from this duplicate op? for example i want to access the exact value (not the relative value or the function/expression itself) of the sizex of A or A etc. in case that i need this value for debugging when working with expression.


The copied spheres are just that, copied spheres. You end up with plain geometric data. There is no specific way to directly get at each sphere the way you mention. Not unless you write your own duplicate SOP in the HDK.
To get around this, you can use local expressions in the duplicate SOP itself. This is an extremely common power-user technique. Remember that SOPs themselves are little programming constructs and are quite dynamic. One example is the ability to generate random scales for each copy by just using the rand($CY) function where $CY is the current copy number. Now if you have to post-process after the delete you can use the modulus operator “%” given that each copy has the same number of points (given with the Duplicate SOP) and an expression in the point SOP or another SOP that gives you this kind of access.


4. i tried to tweak houdini UI. does anyone know how any variables in configuration file that can control the HIGHLIGHT color of obj like button, tab, slider etc. in houdini user interface. i've explore the files such resource, miscolor etc, but couldn't find it.


You need to edit the resources files in $HFS/houdini/config/
3DSceneColors.bw
3DSceneColors.wb

And the line to change is:

ObjectSelectColor: 1.00 1.00 0.00 # object selection highlight color

Other files to dabble in to re-configure Houdini are:

MiscColors
resources
any other files in the config directory at your peril.

Now it isn't wise to edit the files directly in $HFS but to make a directory in $HOME/houdini6.1/config/ and copy them in there then edit. Given the default load order of $HOUDINI_PATH, your $HOME/houdini6.1/ directory will take precedence over identical files in $HFS/houdini. Tweak away on your copies fully confident you can always delete them and revert to the Houdini defaults.

If you come up with some awesome schemes, please share them with the Houdini community. OdForce (www.odforce.net) is a great repositor for things like this.
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