Convert multiple attributes to groups

   4921   8   2
User Avatar
Member
385 posts
Joined: 7月 2018
Offline
This subjects has come up a lot of times, but how can you handle it when you have a lot of attributes and you want to convert all of them to groups whatever their name is.
I need to do this because i want to cycle through my primitives based on attributes, like a quick filter. So groups i think is the best way using a blast, each time selecting a different group and seeing which objects have a particular attribute.
User Avatar
Member
31 posts
Joined: 3月 2017
Offline
I don't understand what you are trying to do here, but you can take a look at these SOPs: Connectivity SOP, Partition SOP, Name SOP, Group Expression SOP, and Group Promote SOP. They all deal with groups form attributes or the opposite..
User Avatar
Member
679 posts
Joined: 2月 2017
Offline
You can also blast by attribute.
Just type in the group field of the blast node something like: @attribute>0.5

Cheers
CYTE
User Avatar
Member
385 posts
Joined: 7月 2018
Offline
rpopovici
I don't understand what you are trying to do here, but you can take a look at these SOPs: Connectivity SOP, Partition SOP, Name SOP, Group Expression SOP, and Group Promote SOP. They all deal with groups form attributes or the opposite..

I know, but i havent found a way to convert every attribute into a group, not just one or two that i know their name but all of them at once.
There is probably a rule in partition sop that can do this but i have no idea
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Hello, you might want to look at doing it in a python node:
https://www.sidefx.com/docs/houdini/hom/hou/Geometry.html [www.sidefx.com]

pointAttribs() and primAttribs() functions can help you to return tuples of the attributes in the geometry ('P' included), then you can loop over them to extract their name()

cheers
Edited by Andr - 2019年6月3日 15:06:30
User Avatar
Member
2040 posts
Joined: 9月 2015
Offline
You could use a primitive wrangle and ordered menu to select which primitive based on attribute you want to isolate.

You'll save on your processing/scene size instead of trying to convert all your attributes to groups.
User Avatar
Member
2040 posts
Joined: 9月 2015
Offline
Or…if you want to just scroll through the prims via their names(without having to type the names themselves).
Edited by BabaJ - 2019年6月3日 16:44:02

Attachments:
Select Prim via Attribute Name.hiplc (133.9 KB)

User Avatar
Member
385 posts
Joined: 7月 2018
Offline
BabaJ
Or…if you want to just scroll through the prims via their names(without having to type the names themselves).

sorry for the delay, i found some time to look at it now. This could be usefull if the attributes were a few and i knew their names.This is definitely a step forward but, i have an osm file with a lot of attributes and ideally i want this ordered menu you made to be created automatically for me so that i can select a random attribute and see which primitives are included. Maybe i can tweak the primitive wrangle.
Edited by papsphilip - 2019年6月14日 01:41:14
User Avatar
Member
2040 posts
Joined: 9月 2015
Offline
I think with python a script could be set up to get the menu item labels correspond to the attribute name.

Not sure if that is too much work for what you need.

But my hip file did give a different option with the slider parameter ( just tick off the “Scroll Through” box to activate the slider).

Then with a geometry spreadsheet open look at the @Show attribute…that lists the primitive by name isolated by your slider.

Doesn't matter if you have alot of them, you can quickly find one by name.
  • Quick Links