david-cattermole / mayaMatchMoveSolver

A Bundle Adjustment solver for MatchMove related tasks.
https://david-cattermole.github.io/mayaMatchMoveSolver/
Other
101 stars 29 forks source link

Solver UI - Make the Solver UI Dockable #197

Closed david-cattermole closed 3 years ago

david-cattermole commented 3 years ago

Feature

To create a better UI experience, and improve screen real estate, it would be good to make the Maya UI dockable, similar to other panels in Maya, like the Graph Editor. This would make the UI very similar to the native Maya panels and window navigation.

Expected behavior: Users should be able to drag the Solver UI window to any area that a Graph Editor, or Attribute Editor can be "docked".

Actual behavior: Currently there is a "traditional" floating UI window only.

Implementation detail ideas

We could potentially just inherit all Windows from maya.app.general.mayaMixin.MayaQWidgetDockableMixin instead of the current maya.app.general.mayaMixin.MayaQWidgetBaseMixin.

There will need to be some research done into how to integrate this. Some of the below links might be helpful: http://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/CommandsPython/panel.html http://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/CommandsPython/scriptedPanel.html http://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/CommandsPython/paneLayout.html

We'll probably need to look into Maya's UI MEL code to see how we can use the same infrastructure - it might be a "simple" Qt fix, but to create a panel layout (just like a Graph Editor panel), there might be other hurdles.

Software Versions

ktonegawa commented 3 years ago

Just as a quick update to this, it was simple enough to implement image

Problem now is that it just looks ugly. Especially if it goes on the bottom: image I much prefer this layout and treating this UI like I would a Graph Editor.

I also set the entire BaseWindow class to "dockable" and we probably don't want that, but was good enough to test to see if the idea will work. We probably will still need a solution to https://github.com/david-cattermole/mayaMatchMoveSolver/issues/195 for "UI presets" like "Normal", "Minimal", "Advanced" or something to that extent.

I did look into this whole business of "custom panels" but that seems almost impossible to do with Maya it seems (or its totally not mentioned anywhere). Its a shame since you can do it with applications like Houdini and perhaps even in Nuke from what I found. Anyways if a more compact UI layout was offered then I think this issue can be pretty easily resolved...

david-cattermole commented 3 years ago

@ktonegawa This is really cool!

Rather than a "minimal", "normal" and "advanced" what about different orientations for the UI? "Top/Bottom" and "Left/Right"? Or "Horizontal" and "Vertical"?

For example we could have the Input Objects, Output Attributes and Solver tabs horizontal, like in this (terrible) mock-up? image

The dividers between each of the 3 areas could be adjustable with a "QSlider" just like the division between "Input Objects" and "Output Attributes" is already adjustable.

Regarding #195, I was imagining simply hiding some of the Solver UI widgets automatically while the solver is doing it's magic, and allowing the user to control that using a preference. I didn't think of actually creating a "minimal" Solver UI layout.

I should also mention that I've had problems trying to force Qt to reduce the vertical size of the "Solver tabs" section. I think the "Legacy tab" is some how forcing the vertical height, which wastes a lot of room in the "Basic" and "Standard" solvers. It's one of the reasons I want to remove the "Legacy" tab in v0.4.x.

ktonegawa commented 3 years ago

Being someone who is more of a fan using older versions of applications, I always die a little inside when I hear something like "removing legacy yyy", but I totally do understand the reasoning for sure. Just like how I was disappointed when I realized that the Legacy Viewport is no longer available in Maya 2019 in the Renderer menu. But what can you do.

Anyways, I think that's also a really great idea you proposed. I would want to grab some input like from @bpatchasaheb and see if there are any more ideas to consolidate the UI as it probably is useful to gather these sorts of things before moving forward with anything...

david-cattermole commented 3 years ago

Yes, it would be good to hear your ideas @anilreddy24fps too.

P.S. The image plane in #173 will not support the "legacy" viewport 1.0, only viewport 2.0, I'm sorry but it's just not worth it.

david-cattermole commented 3 years ago

I have added the "minimal UI while solving" feature (#195 / https://github.com/david-cattermole/mayaMatchMoveSolver/commit/4bdbdf68851fd0da2283774125ba2065d09c21d1), but I believe that while the Solver UI is docked, the "minimal UI while solving" feature shouldn't have any affect.

Something to take into consideration perhaps.

ktonegawa commented 3 years ago

Well its been about a month and have not received any feedback yet. I am considering to make a pull request with just this change of at least the Solver Window being dockable. @david-cattermole what would you like me to base this upcoming PR from (develop or develop_v0.3.x)?

david-cattermole commented 3 years ago

Hi Kazuma,

Yes, I think we should move forward, I'm not sure others have strong opinions. I'm happy for a PR into the develop_v0.3.x branch.

David

david-cattermole commented 3 years ago

I think this issue can be closed since the dockable feature is merged into develop_v0.3.x and will be released with v0.3.13.

I have created a new issue (#214) to track the UI presets feature.