Remove empty attributes
967 7 0- CGxiao
- Member
- 15 posts
- Joined: 6月 2015
- Offline
- alexwheezy
- Member
- 304 posts
- Joined: 1月 2013
- Online
- BabaJ
- Member
- 2128 posts
- Joined: 9月 2015
- Offline
If you want to remove attributes there is the Attribute Delete node or if in a vex context you can use one of the removeattrib function or one of its variations - https://www.sidefx.com/docs/houdini/vex/functions/removeattrib.html [www.sidefx.com]
- tamte
- Member
- 8795 posts
- Joined: 7月 2007
- Offline
alexwheezyOn top of this, the default value is user defined
What do you mean by an attribute being empty?
All attributes have some default value. For example, for int type it will be zero, but zero is not an empty value. The only thing that fits the definition of an empty attribute is a string.
Like if int attrib like i@id has default value -1 would you consider it empty if all elements are at -1 ? Or still 0
And likewise if a string attribute has default value other than empty string, would you consider that attribute empty if all elements are at that default value or rigidly stick to an empty string which is technically a non-dedault value in such case and technically makes it not "empty"
Edited by tamte - 2024年6月22日 10:02:38
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- alexwheezy
- Member
- 304 posts
- Joined: 1月 2013
- Online
tamte
Like if int attrib like i@id has default value -1 would you consider it empty if all elements are at -1 ? Or still 0
Thanks, I forgot that Attribute Wrangle binds the attribute with a default value of -1 if no other value is specified while Attribute Create starts with 0 and the user needs to explicitly set -1 to match the Attribute Wrangle behavior.
- tamte
- Member
- 8795 posts
- Joined: 7月 2007
- Offline
Cant chack right now, but I believe Wrangle sets some defaults and type automatically based on common attribute names like @id, @orient, @Cd
However most numerical attribs will still default to 0
What I meant by user having control over default value is that you always can set it explicitly whether in Attrib Create or in wrangle as long as that wrangle is a creator of that attribute, like this:
But ultimately I just wanted to point out varying default values so that OP can decide what is considered "empty" for their case
However most numerical attribs will still default to 0
What I meant by user having control over default value is that you always can set it explicitly whether in Attrib Create or in wrangle as long as that wrangle is a creator of that attribute, like this:
int @id = 123;
But ultimately I just wanted to point out varying default values so that OP can decide what is considered "empty" for their case
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- CGxiao
- Member
- 15 posts
- Joined: 6月 2015
- Offline
- BabaJ
- Member
- 2128 posts
- Joined: 9月 2015
- Offline
-
- Quick Links