Skip to content

Commit

Permalink
Disable UI Docking for Maya 2025
Browse files Browse the repository at this point in the history
Due to GitHub issue #267, here I had a hack BaseMayaWindow to disable
the Docking feature for all UIs in Maya 2025+

The only UI in mmSolver that actually uses docking (because it's
disabled by default) is the Solver window.

GitHub issue #251 and #267.
  • Loading branch information
david-cattermole committed Oct 19, 2024
1 parent 183d4f4 commit 6ba0085
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion python/mmSolver/ui/base_maya_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,30 @@ def apply(self):
import os
import os.path

from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
import maya.cmds

# In Maya 2025 the
# 'maya.app.general.mayaMixin.MayaQWidgetDockableMixin' class is
# creating an error with mmSolver UIs (because they all inherit from
# BaseMayaWindow). This conditional is used to disable the use of
# 'MayaQWidgetDockableMixin' and avoid the problem while also avoiding
# code changes.
#
# See https://github.com/david-cattermole/mayaMatchMoveSolver/issues/267
#
_USE_MAYA_MIX_IN = maya.cmds.about(apiVersion=True) < 20250000
if _USE_MAYA_MIX_IN is True:
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
else:

# Stub class for compatibility only.
class MayaQWidgetDockableMixin(object):
def __init__(self, parent=None, *args, **kwargs):
super(MayaQWidgetDockableMixin, self).__init__()

def setDockableParameters(self, *args, **kwargs):
pass


import mmSolver.ui.qtpyutils as qtpyutils

Expand Down

0 comments on commit 6ba0085

Please sign in to comment.