Jump to content

Does "primgroup" in class makes sense in findattribval() ?


probiner

Recommended Posts

http://www.sidefx.com/docs/houdini/vex/functions/findattribval.html

Here's a test with "primgroup"

What doesn't make sense to me is that I thought I had to use the class for "primgroup", and the attribname for groupname, but then there's no input for the actuall attribute name.

Cheers

PRB_findattribval_primgroup.hiplc

Link to comment
Share on other sites

it's not a group scope, its literally for treating groups like an attribute

so if you say... "prim", "attribname", value ... it will find @primnum whose attribname value is the same as your value

and ... "primgroup", "groupname", value ... will find @primnum whose grupname membership is the same as your value (0 or 1)

so in your case I'd assume you'd do:

findattribval(0, "primgroup", "prims", 1) ;

however it doesn't seem to do what it says, I'd assume it'll give you 2 as that is the first @primnum with the prims group of value 1, but I was always getting -1, it feels like a bug

you can always use 

expandprimgroup(0, "prims")[0];

even though it may be slower

 

However I assume you were hoping for group scope to limit which prims the findattribval() is searching, so I'm afraid that's not implemented

Edited by anim
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...