Publisher: context menu option to revert each attribute to default
Changelog Description
Publisher - now has a "Revert to default" context menu option for each menu of various widgets ( Int, Float, String and Enum)
Additional info
Paragraphs of text giving context of additional technical information or code examples.
Testing notes:
- start with this step
- follow this step
Revert to default menu options now appears for Bool, Int, Float, String and Enum menus.
It adds itself to existing menus, instead of replacing them.
BlackMagic Resolve
Not sure how much more complexity it would add, but this approach seems to be best UX. Reset button on right of each row.
Maybe @Innders could chip in with ideas or whether there is some convention in AYON already.
BlackMagic Resolve
Not sure how much more complexity it would add, but this approach seems to be best UX. Reset button on right of each row.
qargparse actually does that and thus the OpenPype Loader Option box fields also do that, e.g. see the button to right of Remove Publish Folder here:
There does seem to be a bug though that if you click that reset button it doesn't disappear in that particular UI - but it's a decent reference.
I do agree that right click is not good option to reset value, consideting I want to reset all attributes to default state.
I do agree that right click is not good option to reset value, consideting I want to reset all attributes to default state.
Well, not always. I usually want to revert an attribute or two - not the full instance. But if I'd want to revert 10, then yes. This will be very slow. However, the context menu could show a "shortcut" label like e.g. CTRL+LMB and when clicking that on an attribute that it reverts to default. Works perfectly fine like that in Houdini.
There is a separate ticket for a reset all attributes button. So in this case you wouldn't need to click every attribute directly. https://github.com/ynput/ayon-core/pull/153
What's the consensus should we keep the context menu, or add a button next to each attribute. Personally I find its a lot of visual noise having a button next to each attribute.
I find the Houdini context menu option to be a clean non distacting implementation.
I find the Houdini context menu option to be a clean non distacting implementation.
You just described hidden feature, that requires 2 clicks. But I'm not known for UX, so hard to tell.
EDITED: @mkolar mentioned that if we'll add the button then right click should be enough.
I find the Houdini context menu option to be a clean non distacting implementation.
I personally quite like Houdini's implementation - only if we can also match the shortcut behavior of CTRL + MMB to revert to default and the context menu label showing the shortcut.
That way you can also perform the revert in one click per attribute.
That way you can also perform the revert in one click per attribute.
So, let it in context menu with hint to use Ctrl + MMB instead (oh, Mac users will be pissed 😈 ).
(oh, Mac users will be pissed 😈 ).
Would be Command + MMB then I suppose. No idea how that works. Didn't Qt have something built-in for that and also to labelize menu entries, etc - by QAction.setShortcut and enabling its visibility in the context menu.
Also according to Qt docs:
Note: On Mac OS X, the CTRL value corresponds to the Command keys on the Macintosh keyboard, and the META value corresponds to the Control keys.
As such, that should handle itself?
Would be Command + MMB then I suppose.
It was not about CTRL, you would have to find MMB :)
It was not about CTRL, you would have to find MMB :)
🤦♂️ Of course. Anyway, not sure what Houdini does there.
Seriously folks. Context menu is more than enough here. We're talking about something that is probably used very occasionally and it's super common to add these kinds of things to right click. It's a few attributes, so resetting all at once is really on a fringe of usefulness compared to the effort.
Closed in favor of https://github.com/ynput/ayon-core/pull/986
BlackMagic Resolve