Hi
As a beginner of Houdini16.5
I'm so confusing the different between $ and @ for variables
They seem both could be used as a global variables, as well as their definition.
Am I misunderstand their meaning in some way
Help for understanding $ and @ in variables
4468 3 4- jessicalorence
- Member
- 8 posts
- Joined: Oct. 2017
- Offline
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
All of the things circled in that image are local variables, and they are all different local variables. Most parameters in most nodes do not support local variables; we've been trying to slowly phase them out of anywhere that might need to be evaluated more than a few times per cook, because an expression using local variables can't be evaluated for multiple points/prims at the same time in parallel in the same node cook.
Anything starting with
Things like
Hopefully that helps clear things up!
Anything starting with
@
refers to an attribute, except for @Frame
, @Time
, @ptnum
, @vtxnum
, @primnum
, @numpt
, @numvtx
, @numprim
, which were added for consistency with VEX. This avoids the need for the varmap attribute that has been a nuissance for ages. The $N
local variable on the Delete SOP [www.sidefx.com] is “The number minus one of points or primitives, depending on the ”Entity“ choice.” The $N
description you included in the inset is for ROPs (Render OPerators), not SOPs (Surface OPerators).Things like
$F
and $HIP
are global variables, because they work everywhere with the same meaning, instead of having custom meaning in different situations.Hopefully that helps clear things up!
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- Sweetener
- Member
- 58 posts
- Joined: Nov. 2014
- Offline
ndickson
The$N
local variable on the Delete SOP [www.sidefx.com] is “The number minus one of points or primitives, depending on the ”Entity“ choice.” The$N
description you included in the inset is for ROPs (Render OPerators), not SOPs (Surface OPerators).
Things like$F
and$HIP
are global variables, because they work everywhere with the same meaning, instead of having custom meaning in different situations.
Hopefully that helps clear things up!
I believe you are Referring about the rangeend parameter field rather than the $N(global variable)
and
I have a doubt on @ptnum
which is mentioned as local variable in doc. Houdini 16.5/ Networks and parameters/ Parameter expressions/ variables and Attributes/ local variables
is @ptnum,@primnum etc.. are variables or attributes or both ?
Houdini Fx Artist (Build)
- Grendizer
- Member
- 375 posts
- Joined: May 2014
- Offline
One related thread here : https://www.sidefx.com/forum/topic/57330/ [www.sidefx.com]
Houdini gamboler
-
- Quick Links