HundredsofBears Posted October 28, 2020 Share Posted October 28, 2020 Hey all, I'm attempting to find the number of unique values across the intrinsic:typename attribute for incoming geometry, but I'm having no luck in getting the uniquevals() function to detect any intrinsics. Originally I assumed that this was just a limitation of the function, but I then realized that the docs explicitly state that you're able to provide the name of 'any attribute (or intrinsic) to read.' For context, let's say I've got a polygonal box and a NURBs curve, which both have unique values for their typename. If I try and access those values in a wrangle, I just get an empty array. I've tried setting the attribute class to 'primintrinsic' instead of 'prim', I've tried removing the 'intrinsic:' prefix from the attribute name, and any number of other gotchas that come to mind. I get the same results when trying to use nuniqueval() and uniqueval() as well. It isn't the end of the world since there are ways to do something similar in python, but if anyone's got some secret sauce to get these VEX functions in particular to play nicely with intrinsics, I'd appreciate the help. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Gorrod Posted October 30, 2020 Share Posted October 30, 2020 I don't know why it doesnt work but you could just write the intrinsic to a string/int attribute before and then use the uniquevals function after. That's probably still more convenient and faster than using python. Also typename is a string, so declaring your foo array as an int would, if the function would work with intrinsics, result in an array with a bunch of -1s I think. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.