group-name from name attribute

   4669   7   2
User Avatar
Member
60 posts
Joined: 7月 2015
オフライン
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 - 2023年9月25日 15:17:50
User Avatar
Member
2658 posts
Joined: 6月 2008
オフライン
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 - 2023年9月25日 15:41:40
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
474 posts
Joined: 2月 2012
オンライン
You could also use groups from name sop. If I understand correctly what you want.
User Avatar
Member
60 posts
Joined: 7月 2015
オフライン
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 - 2023年9月26日 03:54:10
User Avatar
Member
10 posts
Joined: 4月 2022
オフライン
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
2171 posts
Joined: 9月 2015
オフライン
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 - 2024年5月24日 16:31:32
User Avatar
Member
10 posts
Joined: 4月 2022
オフライン
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
2171 posts
Joined: 9月 2015
オフライン
Red colored nodes.

Attachments:
Reclaim_Name_Attribute.hiplc (738.7 KB)

  • Quick Links