diff --git a/pype/plugins/global/publish/collect_filesequences.py b/pype/plugins/global/publish/collect_filesequences.py index 7181a7a366..3dcf0fdea6 100644 --- a/pype/plugins/global/publish/collect_filesequences.py +++ b/pype/plugins/global/publish/collect_filesequences.py @@ -88,7 +88,6 @@ class CollectFileSequences(pyblish.api.ContextPlugin): order = pyblish.api.CollectorOrder targets = ["filesequence"] label = "File Sequences" - hosts = ['maya'] def process(self, context): diff --git a/pype/plugins/maya/publish/submit_deadline.py b/pype/plugins/maya/publish/submit_deadline.py index 2321cad96f..a18d7a3aba 100644 --- a/pype/plugins/maya/publish/submit_deadline.py +++ b/pype/plugins/maya/publish/submit_deadline.py @@ -235,6 +235,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin): "MAYA_RENDER_DESC_PATH", "MAYA_MODULE_PATH", "ARNOLD_PLUGIN_PATH", + "AVALON_SCHEMA", # todo: This is a temporary fix for yeti variables "PEREGRINEL_LICENSE", @@ -243,26 +244,44 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin): "VRAY_FOR_MAYA2018_PLUGINS_X64", "VRAY_PLUGINS_X64", "VRAY_USE_THREAD_AFFINITY", - "MAYA_MODULE_PATH" + "MAYA_MODULE_PATH", + "TOOL_ENV" ] environment = dict({key: os.environ[key] for key in keys if key in os.environ}, **api.Session) + for path in os.environ: + if path.lower().startswith('pype_'): + environment[path] = os.environ[path] + PATHS = os.environ["PATH"].split(";") environment["PATH"] = ";".join([p for p in PATHS if p.startswith("P:")]) - clean_pythonpath = '' for path in environment['PYTHONPATH'].split(os.pathsep): # self.log.debug('checking path for UTF: {}'.format(path)) try: path.decode('UTF-8', 'strict') - clean_pythonpath += os.pathsep + path + # path = path.lower().replace("k:/", r"\\kre-c01\\share\\").replace("p:/", r"\\kre-p01\\share\\") + clean_pythonpath += path + os.pathsep except UnicodeDecodeError: self.log.debug('path contains non UTF characters') - environment['PYTHONPATH'] = clean_pythonpath + for key in environment: + remapped_key = '' + list_paths = environment[key].split(os.pathsep) + if len(list_paths) > 1: + for path in list_paths: + path = path.replace("K:/", "\\\\kre-c01\\share\\").replace("P:/", "\\\\kre-p01\\share\\") + path = path.replace("K:\\", "\\\\kre-c01\\share\\").replace("P:\\", "\\\\kre-p01\\share\\") + remapped_key += path + os.pathsep + else: + path = list_paths[0].replace("K:/", "\\\\kre-c01\\share\\").replace("P:/", "\\\\kre-p01\\share\\") + path = path.replace("K:\\", "\\\\kre-c01\\share\\").replace("P:\\", "\\\\kre-p01\\share\\") + remapped_key = path + environment[key] = remapped_key + payload["JobInfo"].update({ "EnvironmentKeyValue%d" % index: "{key}={value}".format( key=key,