Skip to content

Commit

Permalink
Create feature flag to allow deeding
Browse files Browse the repository at this point in the history
- Set AllowDeeding=1 in general config to be able to use local cores
- Use Local Cores option disabled by default
  • Loading branch information
roulaoregan-spi committed Mar 30, 2022
1 parent d899b71 commit 3f6cd42
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions 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 @@ -877,6 +880,8 @@ def __init__(self, widget, filterSelectedLayersCallback):
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 @@ -305,7 +305,9 @@ def contextMenuEvent(self, e):
self.__menuActions.jobs().addAction(menu, "view")
self.__menuActions.jobs().addAction(menu, "emailArtist")
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
6 changes: 4 additions & 2 deletions 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,8 +232,9 @@ def contextMenuEvent(self, e):

if len(__selectedObjects) == 1:
menu.addSeparator()
self.__menuActions.layers().addAction(menu, "useLocalCores")
if len({layer.data.range for layer in __selectedObjects}) == 1:
if bool(int(QtGui.qApp.settings.value("AllowDeeding", 0))):
self.__menuActions.layers().addAction(menu, "useLocalCores")
if len(set([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 3f6cd42

Please sign in to comment.