Skip to content

Commit

Permalink
Create feature flag to allow deeding (#1114)
Browse files Browse the repository at this point in the history
* Create feature flag to allow deeding

- Set AllowDeeding=1 in general config to be able to use local cores
- Use Local Cores option disabled by default

* Update cuegui/cuegui/FrameMonitorTree.py

Fix merging conflict

Co-authored-by: Diego Tavares da Silva <[email protected]>
  • Loading branch information
roulaoregan-spi and DiegoTavares committed May 27, 2022
1 parent 76536a6 commit 34c2bde
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion cuegui/cuegui/FrameMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def __init__(self, parent):

cuegui.AbstractTreeWidget.AbstractTreeWidget.__init__(self, parent)

# Used to build right click context menus
self.__menuActions = cuegui.MenuActions.MenuActions(
self, self.updateSoon, self.selectedObjects, self.getJob)
self.__sortByColumnCache = {}
self.ticksWithoutUpdate = 999
self.__lastUpdateTime = None
Expand Down Expand Up @@ -876,7 +879,8 @@ def __init__(self, widget, filterSelectedLayersCallback):
elif count == 2:
self.__menuActions.frames().addAction(self, "xdiff2")

self.__menuActions.frames().addAction(self, "useLocalCores")
if bool(int(QtGui.qApp.settings.value("AllowDeeding", 0))):
self.__menuActions.frames().addAction(self, "useLocalCores")

# pylint: disable=no-member
if QtGui.qApp.applicationName() == "CueCommander":
Expand Down
4 changes: 3 additions & 1 deletion cuegui/cuegui/JobMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ def contextMenuEvent(self, e):
self.__menuActions.jobs().addAction(menu, "emailArtist")
self.__menuActions.jobs().addAction(menu, "showProgBar")
self.__menuActions.jobs().addAction(menu, "viewComments")
self.__menuActions.jobs().addAction(menu, "useLocalCores")

if bool(int(QtGui.qApp.settings.value("AllowDeeding", 0))):
self.__menuActions.jobs().addAction(menu, "useLocalCores")

depend_menu = QtWidgets.QMenu("&Dependencies",self)
self.__menuActions.jobs().addAction(depend_menu, "viewDepends")
Expand Down
4 changes: 3 additions & 1 deletion cuegui/cuegui/LayerMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from __future__ import division

from PySide2 import QtCore
from PySide2 import QtGui
from PySide2 import QtWidgets

from opencue.exception import EntityNotFoundException
Expand Down Expand Up @@ -231,7 +232,8 @@ def contextMenuEvent(self, e):

if len(__selectedObjects) == 1:
menu.addSeparator()
self.__menuActions.layers().addAction(menu, "useLocalCores")
if bool(int(QtGui.qApp.settings.value("AllowDeeding", 0))):
self.__menuActions.layers().addAction(menu, "useLocalCores")
if len({layer.data.range for layer in __selectedObjects}) == 1:
self.__menuActions.layers().addAction(menu, "reorder")
self.__menuActions.layers().addAction(menu, "stagger")
Expand Down

0 comments on commit 34c2bde

Please sign in to comment.