Adding a selector to an HDA
952 3 2- Bugg
- Member
- 11 posts
- Joined: Nov. 2016
- Offline
Hi, what is the best way to add a selector to an HDA? By selector I mean a prompt asking for a geometry selection. I tried to figure this out by looking at `matchsize` HDA but I can't find a part responsible for the selection. Second thing I tried was Tool Scripts recommended by State Selectors [www.sidefx.com] but the examples do not fully work. Tool Script example for a filter node shows the prompt but fails to fill the group parameter ( I think createFilterSop may be bugged ). Any tips would be great.
- Lucca
- Member
- 42 posts
- Joined: March 2019
- Offline
- Bugg
- Member
- 11 posts
- Joined: Nov. 2016
- Offline
- Bugg
- Member
- 11 posts
- Joined: Nov. 2016
- Offline
I'm still not sure how to mimic something like matchsize but code below does most of it. It's the same thing polybevel does.
The issue is it will throw an error if user doesn't select anything. More suggestions are welcome, thanks
The issue is it will throw an error if user doesn't select anything. More suggestions are welcome, thanks
import soptoolutils soptoolutils.addNodeWithCurrentSelection( kwargs, '$HDA_NAME', allowed_group_types = { 'prims' }, group_parm = 'base_group_name', empty_means_all = False, default_group_type = 'prims', asterisk_to_select_all = True)
-
- Quick Links