-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Hi,
Today while re-working the integration of the outliner widget into our application framework (unfortunately we cannot use the dialogs as widgets need to get embedded) I noticed the assumption of singleton behaviour on some of the context menues launching dialogs, which is a bit problematic as we very often have multiple stages opened in the same session (via AL_USDMaya proxy shapes).
i.e.
usd-qt/pxr/usdQtEditors/outliner.py
Lines 135 to 142 in 35b01ea
| def Do(self, context): | |
| if context.selectedLayer: | |
| dialog = LayerTextEditorDialog.GetSharedInstance( | |
| context.selectedLayer, | |
| parent=context.qtParent or context.layerDialog) | |
| dialog.show() | |
| dialog.raise_() | |
| dialog.activateWindow() |
I can certainly re-implement these MenuAction classes and the OutlinerRole on our side, but I feel like I'm already duplicating a big chunk of the glue code by not using the dialogs and was wondering if this use case would help to reconsider these default choices? Is there a particular reason for the reuse of the dialog?
Thanks!
C.