Jump to content

GroupType limit to only 3 types.


Guest mantragora

Recommended Posts

Guest mantragora

Hi.

 

1. I got group field that can take points/edges/polygons. 

2. i got selector that supports points/edges/polygons. 

 

I need to limit GroupType menu to only points/edges/polygons, so the user can modify it only between those three if he wishes to change it manually. But if I set menu to only support positions 2-4, than it stops working. If I add all 0-4 positions, it works OK, but those first 2 are not supported and just confuse user. On the other hand if I use Integer parameter instead of menu as Grouptype, and limit it to only 2-4, it works.

 

I tried to update my custom GroupType with callback from original GroupType field, so the original would be working as it should invisible for the user and my custom field would be accessible, but callback doesn't execute if call it in viewport, only when I manually change original GroupType field in newtork view.

 

Anybody got some tip how to solve this?

 

Thanks in avance!

 

 

EDIT: 

To expand a little, if I have selector:

thisType = hou.sopNodeTypeCategory().nodeTypes()['mantragora::sop::foo']
thisType.addSelector('FooSelector', selector_type='everything', primitive_types=(hou.primType.Polygon, ), prompt='Select points/edges or polygons. Press <ENTER> to accept.', group_parm_name='groupinput0', input_index=0, input_required=True)
it requires 5 positions long grouptype menu to work correctly and update what was selected. But I need to force it to work with 3 positions long grouptype menu. And I don't need positions 0-1, which are for Guess/Breakpoints. I need Point/Edges/Primitives, which are 2-4. Edited by fântastîque Mântragorîè
Link to comment
Share on other sites

Guest mantragora

Anyone?

 

Right now I solved it by naming first two options as Not Used, so my menu looks like:

  • Not Used
  • Not Used
  • Points
  • Edges
  • Primitives

And it hurts my eyes.

 

Is there a way to limit selector to only last 3? Are you using selectors?

 

BTW. Does anyone know how transformSOP Guess group mode figures out what type is selected? Is it something that is available with selectors or only in HDK?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...