Skip to content

Commit 3c9a43b

Browse files
Keep track of all currently open instances of 'BaseMayaWindow'.
Issue #222
1 parent 06e8360 commit 3c9a43b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

python/mmSolver/ui/base_maya_window.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def apply(self):
6161

6262

6363
LOG = mmSolver.logger.get_logger()
64+
ALL_CLASS_INSTANCES = set()
6465

6566

6667
class BaseMayaWindow(MayaQWidgetDockableMixin,
@@ -75,6 +76,9 @@ def __init__(self, parent, name=None):
7576
super(BaseMayaWindow, self).__init__()
7677
self.windowGeometry = None
7778

79+
global ALL_CLASS_INSTANCES
80+
ALL_CLASS_INSTANCES.add(self)
81+
7882
# Destroy this widget when closed. Otherwise it will stay around.
7983
self.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
8084

0 commit comments

Comments
 (0)