Skip to content

Commit

Permalink
Remove the Debug menu now that it has been replaced.
Browse files Browse the repository at this point in the history
The new Debug window in usdview is more functional than the menu, so
we can now get rid of the menu.

(Internal change: 1970079)
  • Loading branch information
c64kernal authored and pixar-oss committed May 15, 2019
1 parent de2cc35 commit 58eadf3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
34 changes: 0 additions & 34 deletions pxr/usdImaging/lib/usdviewq/appController.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,6 @@ class HUDEntries(ConstantGroup):
class PropertyIndex(ConstantGroup):
VALUE, METADATA, LAYERSTACK, COMPOSITION = range(4)

class DebugTypes(ConstantGroup):
# Tf Debug entries to include in debug menu
HDST = "HDST"
HD = "HD"
HDX = "HDX"
USD = "USD"
USDIMAGING = "USDIMAGING"
USDVIEWQ = "USDVIEWQ"

class UIDefaults(ConstantGroup):
STAGE_VIEW_WIDTH = 604
PRIM_VIEW_WIDTH = 521
Expand Down Expand Up @@ -1040,8 +1031,6 @@ def __init__(self, parserData, resolverContextFn):

self._ui.actionDeactivate.triggered.connect(self.deactivateSelectedPrims)

self._setupDebugMenu()

# We refresh as if all view settings changed. In the future, we
# should do more granular refreshes. This first requires more
# granular signals from ViewSettingsDataModel.
Expand Down Expand Up @@ -4089,29 +4078,6 @@ def _calculateGeomCounts(self, prim, frame):
finally:
QtWidgets.QApplication.restoreOverrideCursor()


def _setupDebugMenu(self):
def __helper(debugType, menu):
return lambda: self._createTfDebugMenu(menu, '{0}_'.format(debugType))

for debugType in DebugTypes:
menu = self._ui.menuDebug.addMenu('{0} Flags'.format(debugType))
menu.aboutToShow.connect(__helper(debugType, menu))

def _createTfDebugMenu(self, menu, flagFilter):
def __createTriggerLambda(flagToSet, value):
return lambda: Tf.Debug.SetDebugSymbolsByName(flagToSet, value)

flags = [flag for flag in Tf.Debug.GetDebugSymbolNames() if flag.startswith(flagFilter)]
menu.clear()
for flag in flags:
action = menu.addAction(flag)
isEnabled = Tf.Debug.IsDebugSymbolNameEnabled(flag)
action.setCheckable(True)
action.setChecked(isEnabled)
action.setStatusTip(Tf.Debug.GetDebugSymbolDescription(flag))
action.triggered[bool].connect(__createTriggerLambda(flag, not isEnabled))

def _updateNavigationMenu(self):
"""Make the Navigation menu items enabled or disabled depending on the
selected prim."""
Expand Down
6 changes: 0 additions & 6 deletions pxr/usdImaging/lib/usdviewq/mainWindowUI.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1452,16 +1452,10 @@
<addaction name="showInterpreter"/>
<addaction name="showDebugFlags"/>
</widget>
<widget class="QMenu" name="menuDebug">
<property name="title">
<string>Debug</string>
</property>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menuView"/>
<addaction name="menuWindow"/>
<addaction name="menuDebug"/>
</widget>
<widget class="QStatusBar" name="statusbar">
<property name="sizeGripEnabled">
Expand Down

0 comments on commit 58eadf3

Please sign in to comment.