I have a primitive attribute which is created by promoting a point attribute to primitive. It's an integer, and contains a bunch of values. I want to add 500 to every one of them, but whatever wrangle I use the attribute values do not change. I get no error, the values just do not change.
I've tried a detail wrangle with an iteration through each primitive, I've tried a primitive wrangle with setprimattrib as well as just directly referencing it as i@abc123=+500. Obviously the wrangles are below the promote node, and are wired up to it.
Nothing works. I am really stumped by this, what should be ridiculously simple thing to do has already swallowed multiple hours of trial and error and chatgpt.
What am I missing?
Primitive Attribute won't update regardless of what I do.
940 7 2-
- fs_reddog
- Member
- 12 posts
- Joined: June 2024
- Offline
-
- ifree
- Member
- 65 posts
- Joined: Sept. 2008
- Online
-
- raincole
- Member
- 691 posts
- Joined: Aug. 2019
- Offline
-
- eikonoklastes
- Member
- 447 posts
- Joined: April 2018
- Offline
I'd recommend (for now, at least) save the time you spend on ChatGPT (or any AI assistant) and put that time into learning Houdini fundamentals. The AI assistants are extremely error-prone right now and will confidently spit out outright wrong answers.
For your issue, you can use an Attribute Adjust Integer node, which makes your task very easy, and you do not have to deal with VEX syntax if you're not comfortable with that.
For your issue, you can use an Attribute Adjust Integer node, which makes your task very easy, and you do not have to deal with VEX syntax if you're not comfortable with that.
-
- fs_reddog
- Member
- 12 posts
- Joined: June 2024
- Offline
Turns out that this was all caused by the attribute being a string, not an integer. I would have thought Houdini could have signalled this issue to me in a clearer way, but I now know better and have learned to look at the info tab even when an error is NOT being thrown, as it would have been much quicker to resolve.
While I've solved the issue, is there a way to change an attribute type permanently, my method at the moment is a bit clunky (create another attribute of integer type, convert the value using atoi and then delete the original attribute.)
While I've solved the issue, is there a way to change an attribute type permanently, my method at the moment is a bit clunky (create another attribute of integer type, convert the value using atoi and then delete the original attribute.)
-
- Tanto
- Member
- 538 posts
- Joined: Nov. 2016
- Offline
fs_reddog
While I've solved the issue, is there a way to change an attribute type permanently, my method at the moment is a bit clunky (create another attribute of integer type, convert the value using atoi and then delete the original attribute.)
I believe this is the only way. You can do all of this in your primitive wrangle, though, but only if you change the attribute's name:
i@xyz321 = atoi(s@abc123) + 500; removeattrib(0, 'prim', 'abc123');
-
- tamte
- Member
- 9291 posts
- Joined: July 2007
- Offline
-
- ifree
- Member
- 65 posts
- Joined: Sept. 2008
- Online
-
- Quick Links