-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selection Modification #5720
Selection Modification #5720
Conversation
I made the changes we talked about yesterday in the team call, namely :
I'm looking at the jumpy UI when switching from Select to Translate and other tools that add additional UI elements alongside this new |
a8ceccd
to
2b926a9
Compare
I found a couple of ways to fix the jump in the UI. One is to add a 4px What I went with instead is adding a I'm open to other solutions if something seems better. Otherwise, ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Eric, and once again, sorry for the delay in getting to the review. This is a nice addition, and I like how you're querying the kind registry to work with anything in there, rather than just hardcoding it.
In addition to the inline comments, here's a couple of other talking points :
- I think we discussed synchronising the select mode across all the tools? Currently they each have their own mode, which is going to get pretty confusing I think.
- I don't have a strong rationale either way, but I do wonder if "Standard" might be better than "Any" as the default mode. Or maybe "Default"?
- I wonder if there are any non-usd modes we could provide out of the box? First-ancestor-with-a-shader-assignment perhaps? Not that I can think of a concise label for that right now.
Cheers...
John
Right! That had slipped my mind. I'll look at that now that I have the other feedback addressed.
"Standard" seems pretty good to me, it sounds a bit more confident than "Default" to my mind. That is fixed over the course of 5aa08c4, f16556d and 4b460cf for the purposes of squishability.
That sounds like a nice one to have too, I'll add that in with something better than First-ancestor-with-a-shader-assignment or, my working title, "Shader-Bequether" |
7abb4b0
to
521ea42
Compare
Thanks Eric, looks great! I like the new shader-bequeather modes :) Two small things :
|
Without this extra height, there is a jump in the UI when switching from `SelectionTool` to any `TransformTool` because `TransformToolUI._SelectionWidget` is taller and widgets are top-aligned.
USD Kind comparisons are case-sensitive, so I didn't do this initially in order to not make assumptions when converting to and from the native Kind name. Do you think
Yeah, with #5737 is on |
I think |
Oh yes, of course. Had a brain blockage on that one. |
Cool - if you could get this all squashed down and ready to merge for |
Thanks Eric! |
This adds a mechanism for modifying what scene locations are actually selected when making a viewport selection. Users can register functions in Python or C++ that get a scene and the selection made by the user, and return the selection they want as a result.
It also includes a first use of the mechanism in the form of USD Kind selection. Starting at the viewport selected location, the first ancestor, or the original location itself, that is the USD Kind chosen in the
selectionModifier
plug is what is actually selected.I tried a few different methods of presenting the USD Kinds in the
selectionModifier
widget. USD Kinds are hierarchical (https://openusd.org/dev/api/kind_page_front.html#mainpage_kind) so, for example, setting theselectionModifier
to select USD Kind ofmodel
will also selectcomponent
,group
andassembly
. Currently I'm expressing that by spelling out all the Kinds that will be considered a match in the menu item.That was originally driven by using the standard presets metadata and dropdown. I think a nicer widget is what I have now, very similar to the
displayTransform.name
widget. Before settling on this presentation, I also looked at indenting based on the hierarchy, and even a little ASCII art to draw out elbows and lines to form a tree look.Indenting with the default presets widget meant that when you make your selection, the label in the collapsed dropdown is indented too, which felt rather odd.
Now that I'm using a custom widget anyways, maybe the indented presentation is worth another look?
Checklist