group-name from name attribute

   1336   7   2
User Avatar
Member
47 posts
Joined: July 2015
Offline
hi,

i have some points with a name attribute.
i want to create groups with the group-name from this name-attribute, but the group node doesnt accept @name as the group-name.
does somebody know how to achieve this?
(i need these group-names for better selection points on the rivet obj node...)
Edited by soulcage_dpt - Sept. 25, 2023 15:17:50
User Avatar
Member
2573 posts
Joined: June 2008
Offline
Wouldn't that just be a one-liner inside a point wrangle? (assuming name is actually on points and not prims)
setpointgroup(0, s@name, @ptnum, 1, "set");
Edited by Enivob - Sept. 25, 2023 15:41:40
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
442 posts
Joined: Feb. 2012
Offline
You could also use groups from name sop. If I understand correctly what you want.
User Avatar
Member
47 posts
Joined: July 2015
Offline
thx a lot for the hints...

@Enivob, this works perfect, thx for the snippet (had to rename the name-attribute since it contained a namespace-character ":" and it seems group-names dont like ":")

@sepu, the "groups from name" sop doesnt exist in 19.0.xx, seems only be available in 19.5.xx, but this also works perfect in 19.5.xx, the renaming of the namespace-character is then automatically...thx
Edited by soulcage_dpt - Sept. 26, 2023 03:54:10
User Avatar
Member
7 posts
Joined: April 2022
Offline
soulcage_dpt
thx a lot for the hints...

@Enivob, this works perfect, thx for the snippet (had to rename the name-attribute since it contained a namespace-character ":" and it seems group-names dont like ":")

@sepu, the "groups from name" sop doesnt exist in 19.0.xx, seems only be available in 19.5.xx, but this also works perfect in 19.5.xx, the renaming of the namespace-character is then automatically...thx

Hi Im not sure if you can help but seems you had a similar problem,

I have rbd sim but in that before the fracture I use an attribute create to create an attribute name in the string to use as a geoup to apply separate materials too. But except when it comes to the rbd bullet solver it doesn’t like it as it also uses a name attribute what would be a good work around here?

Regards
User Avatar
Member
2048 posts
Joined: Sept. 2015
Offline
djdoogle123
But except when it comes to the rbd bullet solver it doesn’t like it as it also uses a name attribute what would be a good work around here?

Before you run your geo through the sim, you could make an attribute like 'original_name' and assign the values as if it was 'name'.
Then after the sim, you could delete all 'name' attributes with delete attribute sop, except 'original_name' attribute.

Then use the rename attribute sop to change your 'original_name' to 'name'.
Edited by BabaJ - May 24, 2024 16:31:32
User Avatar
Member
7 posts
Joined: April 2022
Offline
BabaJ
djdoogle123
But except when it comes to the rbd bullet solver it doesn’t like it as it also uses a name attribute what would be a good work around here?

Before you run your geo through the sim, you could make an attribute like 'original_name' and assign the values as if it was 'name'.
Then after the sim, you could delete all 'name' attributes with delete attribute sop, except 'original_name' attribute.

Then use the rename attribute sop to change your 'original_name' to 'name'.


I’m not really sure what you mean could you show me an example?

Regards
User Avatar
Member
2048 posts
Joined: Sept. 2015
Offline
Red colored nodes.

Attachments:
Reclaim_Name_Attribute.hiplc (738.7 KB)

  • Quick Links