Group Selection in HDA

   2149   7   1
User Avatar
Member
21 posts
Joined: Aug. 2014
Offline
Hi,

I am trying to build a HDA to orient and copy some geometry to a selection of faces. It works “somewhat” but I cannot get the group selection button to work.

I have no knowledge of python scripting, and the closes solutions I could find did not work out for me.

I would be thankful for a solution or some information what I should look up.

My five cents: Group selection in custom HDA´s should be easy. Perhaps it is

Thank you for considering.

Attachments:
Orient.hiplc (158.9 KB)
GroupSelectError.PNG (198.6 KB)

User Avatar
Member
21 posts
Joined: Aug. 2014
Offline
Hi there,
Is more information needed? I would really like to implement that.
Greetings, Christian
User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
Hey Christian,

Im not in front of a Maschine right now. But you need to expose some of the other group node parameters, too. I cant recall exactly which one but add them till it works like group type and create ordered and so on.

Cheers
CYTE
User Avatar
Member
8582 posts
Joined: July 2007
Offline
you could expose "grouptype" as your action button expression is looking for it

but if you know that ou will always want to select primitives you can change your action button script to this
import soputils
kwargs['geometrytype'] = hou.geometryType.Primitives
kwargs['inputindex'] = 0
soputils.selectGroupParm(kwargs)

Attachments:
Orient_fix.hipnc (173.4 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
21 posts
Joined: Aug. 2014
Offline
That did the job. Thank you CYTE and tamte for helping me out. I will study this further as I think it´s usefull in building my tools.

Cheers
Schmauch
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Hmmm... I've use that python script in my hda but on some assets (not all), it doesn't group what I select in the viewport. Instead, it groups a bunch of primitives everywhere on the model.

When I use the rubber toy and group its front-left arm, I get this group:

1533-1628 1674-1776 1885-1928
etc.
(the result doesn't look like what I had selected in the viewport. its all messed up)

When I dive inside the hda and select from the group sop to make the same selection, I get this:
2189-2955
(and it works. I get the front-left arm)

Why would the selection give a different result whether I'm using the hda parameters or using the group sop directly from inside the hda?
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Ok, I did another HDA (super simple, just a group sop inside and a null). Everything works but if I add a sort sop before the group and set it to change the primitive order by X, the group selection from the hda doesnt work.

I get the feeling that using a group in an HDA will display the input geo to let you select on it instead of displaying the geo as it is right before the group sop. I'll try to have my groups at the top of the sop chain in my HDA...

**I moved the groups at the very top of the sop chain and it fixed my problems!
Edited by olivierth - March 16, 2023 14:22:44
User Avatar
Member
8582 posts
Joined: July 2007
Offline
yes, that selector is by default looking at the input geo
so if invoked on internal Group SOP it will allow you to select on geo of the Sort SOP
if invoked on HDA it looks at the input of HDA which has obviously original prim order

but once HDA is locked, you can't really enter selector on any internal node so you can't point it to Sort SOP as you may get some permission errors, so yes, definitely a good idea to have your group SOPs working directly with geometry from input
Edited by tamte - March 16, 2023 14:21:02
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links