Skip to content

Commit

Permalink
Merge branch 'master' into limit_user_interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTavares authored Aug 21, 2024
2 parents 403b4da + 97ced67 commit 60c53d9
Show file tree
Hide file tree
Showing 11 changed files with 697 additions and 16 deletions.
22 changes: 12 additions & 10 deletions cuegui/cuegui/Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ def __packaged_version():
if not os.path.isabs(CONFIG_PATH):
CONFIG_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), CONFIG_PATH))


EMAIL_SUBJECT_PREFIX = "cuemail: please check "
EMAIL_BODY_PREFIX = "Your PSTs request that you check:\n"
EMAIL_BODY_SUFFIX = "\n\n"
EMAIL_DOMAIN = ""

DEFAULT_INI_PATH = os.getenv('CUEGUI_DEFAULT_INI_PATH', __config.get('paths.default_ini_path'))
if not os.path.isabs(DEFAULT_INI_PATH):
DEFAULT_INI_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), DEFAULT_INI_PATH))
Expand All @@ -133,10 +127,14 @@ def __packaged_version():
LOGGER_FORMAT = __config.get('logger.format')
LOGGER_LEVEL = __config.get('logger.level')

EMAIL_SUBJECT_PREFIX = __config.get('email.subject_prefix')
EMAIL_BODY_PREFIX = __config.get('email.body_prefix')
EMAIL_BODY_SUFFIX = __config.get('email.body_suffix')
EMAIL_DOMAIN = __config.get('email.domain')
EMAIL_SUBJECT_PREFIX = __config.get('email.subject_prefix', "cuemail: please check ")
EMAIL_BODY_PREFIX = __config.get('email.body_prefix',
"Your Support Team requests that you check:\n")
EMAIL_BODY_SUFFIX = __config.get('email.body_suffix', "\n\n")
EMAIL_DOMAIN = __config.get('email.domain', "")
SHOW_SUPPORT_CC_TEMPLATE = [val.strip()
for val
in __config.get('email.show_support_cc_template', '').split(',')]

GITHUB_CREATE_ISSUE_URL = __config.get('links.issue.create')
URL_USERGUIDE = __config.get('links.user_guide')
Expand Down Expand Up @@ -185,6 +183,10 @@ def __packaged_version():

RESOURCE_LIMITS = __config.get('resources')

OUTPUT_VIEWER_ACTION_TEXT = __config.get('output_viewer.action_text')
OUTPUT_VIEWER_EXTRACT_ARGS_REGEX = __config.get('output_viewer.extract_args_regex')
OUTPUT_VIEWER_CMD_PATTERN = __config.get('output_viewer.cmd_pattern')
OUTPUT_VIEWER_STEREO_MODIFIERS = __config.get('output_viewer.stereo_modifiers')
FINISHED_JOBS_READONLY_FRAME = __config.get('finished_jobs_readonly.frame', False)
FINISHED_JOBS_READONLY_LAYER = __config.get('finished_jobs_readonly.layer', False)

Expand Down
1 change: 1 addition & 0 deletions cuegui/cuegui/CueJobMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ def contextMenuEvent(self, e):

self.__menuActions.jobs().addAction(menu, "view")
self.__menuActions.jobs().addAction(menu, "emailArtist")
self.__menuActions.jobs().addAction(menu, "requestCores")
self.__menuActions.jobs().addAction(menu, "subscribeToJob")
self.__menuActions.jobs().addAction(menu, "viewComments")
self.__menuActions.jobs().addAction(menu, "sendToGroup")
Expand Down
2 changes: 2 additions & 0 deletions cuegui/cuegui/FrameMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,8 @@ def __init__(self, widget, filterSelectedLayersCallback, readonly=False):
if bool(int(self.app.settings.value("AllowDeeding", 0))):
self.__menuActions.frames().addAction(self, "useLocalCores")

self.__menuActions.frames().addAction(self, "viewOutput")

if self.app.applicationName() == "CueCommander":
self.__menuActions.frames().addAction(self, "viewHost")

Expand Down
5 changes: 5 additions & 0 deletions cuegui/cuegui/JobMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,17 @@ def contextMenuEvent(self, e):
self.__menuActions.jobs().addAction(menu, "unmonitor")
self.__menuActions.jobs().addAction(menu, "view")
self.__menuActions.jobs().addAction(menu, "emailArtist")
self.__menuActions.jobs().addAction(menu, "requestCores")
self.__menuActions.jobs().addAction(menu, "subscribeToJob")
self.__menuActions.jobs().addAction(menu, "viewComments")

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

it_view_action = self.__menuActions.jobs().addAction(menu, "viewOutput")
it_view_action.setDisabled(__count == 0)
it_view_action.setToolTip("Open Viewer for the selected items")

depend_menu = QtWidgets.QMenu("&Dependencies",self)
self.__menuActions.jobs().addAction(depend_menu, "viewDepends")
self.__menuActions.jobs().addAction(depend_menu, "dependWizard")
Expand Down
1 change: 1 addition & 0 deletions cuegui/cuegui/LayerMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def contextMenuEvent(self, e):
menu = QtWidgets.QMenu()

self.__menuActions.layers().addAction(menu, "view")
self.__menuActions.layers().addAction(menu, "viewOutput")
depend_menu = QtWidgets.QMenu("&Dependencies", self)
self.__menuActions.layers().addAction(depend_menu, "viewDepends")
self.__menuActions.layers().addAction(depend_menu, "dependWizard")
Expand Down
26 changes: 26 additions & 0 deletions cuegui/cuegui/MenuActions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import cuegui.LocalBooking
import cuegui.Logger
import cuegui.PreviewWidget
import cuegui.RequestCoresDialog
import cuegui.ProcChildren
import cuegui.ServiceDialog
import cuegui.ShowDialog
Expand Down Expand Up @@ -233,6 +234,12 @@ def view(self, rpcObjects=None):
for job in self._getOnlyJobObjects(rpcObjects):
self.app.view_object.emit(job)

viewOutput_info = [cuegui.Constants.OUTPUT_VIEWER_ACTION_TEXT, None, "view"]
def viewOutput(self, rpcObjects=None):
jobs = self._getOnlyJobObjects(rpcObjects)
if jobs and cuegui.Constants.OUTPUT_VIEWER_ACTION_TEXT:
cuegui.Utils.viewOutput(jobs)

viewDepends_info = ["&View Dependencies...", None, "log"]

def viewDepends(self, rpcObjects=None):
Expand All @@ -255,6 +262,13 @@ def subscribeToJob(self, rpcObjects=None):
# Dialog to ask for email. Use show PST email as default
cuegui.SubscribeToJobDialog.SubscribeToJobDialog(jobs, self._caller).show()

requestCores_info = ["Request Cores...", None, "mail"]

def requestCores(self, rpcObjects=None):
jobs = self._getOnlyJobObjects(rpcObjects)
if jobs:
cuegui.RequestCoresDialog.RequestCoresDialog(jobs[0], self._caller).show()

setMinCores_info = ["Set Minimum Cores...", "Set Job(s) Minimum Cores", "configure"]

def setMinCores(self, rpcObjects=None):
Expand Down Expand Up @@ -924,6 +938,12 @@ def dependWizard(self, rpcObjects=None):
if layers:
cuegui.DependWizard.DependWizard(self._caller, [self._getSource()], layers=layers)

viewOutput_info = [cuegui.Constants.OUTPUT_VIEWER_ACTION_TEXT, None, "view"]
def viewOutput(self, rpcObjects=None):
layers = self._getOnlyLayerObjects(rpcObjects)
if layers and cuegui.Constants.OUTPUT_VIEWER_ACTION_TEXT:
cuegui.Utils.viewOutput(layers)

reorder_info = ["Reorder Frames...", None, "configure"]

def reorder(self, rpcObjects=None):
Expand Down Expand Up @@ -1114,6 +1134,12 @@ def viewDepends(self, rpcObjects=None):
frames = self._getOnlyFrameObjects(rpcObjects)
cuegui.DependDialog.DependDialog(frames[0], self._caller).show()

viewOutput_info = [cuegui.Constants.OUTPUT_VIEWER_ACTION_TEXT, None, "view"]
def viewOutput(self, rpcObjects=None):
frames = self._getOnlyFrameObjects(rpcObjects)
if frames and cuegui.Constants.OUTPUT_VIEWER_ACTION_TEXT:
cuegui.Utils.viewFramesOutput(self._getSource(), frames)

getWhatDependsOnThis_info = ["print getWhatDependsOnThis", None, "log"]

def getWhatDependsOnThis(self, rpcObjects=None):
Expand Down
Loading

0 comments on commit 60c53d9

Please sign in to comment.