variables and attributes

   2070   5   4
User Avatar
Member
174 posts
Joined: 3月 2014
Offline
Hi, i'm triing to get my head around this…

I have a curve geo where i want to refine exactly by a factor of two.

but this don't work:

1. putting $NPT in division U of the refine SOP
-> won't work…

2. attribcreate -> primitive -> $NPT in Value (works now) then going to a local variable NUMTOTAL.
getting $NUMTOTAL on division U of the refine SOP don't works too…

first, why 1) don't works ??? and secondly how can i make it works ?

Thanks !
User Avatar
Member
443 posts
Joined: 9月 2012
Offline
Because local variables are not supported everywhere in Houdini. $NPT is not local variable for refine SOP.
Use this expression instead:
npoints(opinputpath(“.”, 0))
User Avatar
Member
174 posts
Joined: 3月 2014
Offline
ok=…

since i'm in the learning section what do you recommends about learning houdini, i'm totally lost between different formating of expression and variables…

since you write me expression code maybe i should learn that directly instead ?
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
If you want to get a handle on SOPs and geometry, look to each operator's help.

Many SOPs do support local variables. These specific SOPs will have a list of local variables supported by that SOP within it's own parameter fields.

Many SOPs also have example files to give you ideas as to how to use that node.
There's at least one school like the old school!
User Avatar
Member
208 posts
Joined: 11月 2010
Offline
This used to drive me nuts (still does sometimes), i.e., what a parameter is expecting, e.g., HSCRIPT, VEX, local, etc. I love the VEX snippets boxes. They want VEX. I wish all the parameters were that clear about what they need.
I also wish there were more clarity in the help files about what each node expects, e.g., this node operates on points, this node expects a volume, etc.
My 2¢ worth, k
User Avatar
Member
208 posts
Joined: 11月 2010
Offline
This used to drive me nuts (still does sometimes), i.e., what a parameter is expecting, e.g., HSCRIPT, VEX, local, etc. I love the VEX snippets boxes. They want VEX. I wish all the parameters were that clear about what they need.
I also wish there were more clarity in the help files about what each node expects, e.g., this node operates on points, this node expects a volume, etc.
My 2¢ worth, k
  • Quick Links