mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merge pull request #1428 from pypeclub/bugfix/maya_in_deadline
This commit is contained in:
commit
ca297996c6
5 changed files with 6 additions and 10 deletions
|
|
@ -1872,7 +1872,7 @@ def set_context_settings():
|
||||||
|
|
||||||
# Set project fps
|
# Set project fps
|
||||||
fps = asset_data.get("fps", project_data.get("fps", 25))
|
fps = asset_data.get("fps", project_data.get("fps", 25))
|
||||||
api.Session["AVALON_FPS"] = fps
|
api.Session["AVALON_FPS"] = str(fps)
|
||||||
set_scene_fps(fps)
|
set_scene_fps(fps)
|
||||||
|
|
||||||
# Set project resolution
|
# Set project resolution
|
||||||
|
|
|
||||||
|
|
@ -358,9 +358,7 @@ class CollectMayaRender(pyblish.api.ContextPlugin):
|
||||||
options["extendFrames"] = extend_frames
|
options["extendFrames"] = extend_frames
|
||||||
options["overrideExistingFrame"] = override_frames
|
options["overrideExistingFrame"] = override_frames
|
||||||
|
|
||||||
maya_render_plugin = "MayaPype"
|
maya_render_plugin = "MayaBatch"
|
||||||
if attributes.get("useMayaBatch", True):
|
|
||||||
maya_render_plugin = "MayaBatch"
|
|
||||||
|
|
||||||
options["mayaRenderPlugin"] = maya_render_plugin
|
options["mayaRenderPlugin"] = maya_render_plugin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ print("starting OpenPype usersetup")
|
||||||
settings = get_project_settings(os.environ['AVALON_PROJECT'])
|
settings = get_project_settings(os.environ['AVALON_PROJECT'])
|
||||||
shelf_preset = settings['maya'].get('project_shelf')
|
shelf_preset = settings['maya'].get('project_shelf')
|
||||||
|
|
||||||
|
|
||||||
if shelf_preset:
|
if shelf_preset:
|
||||||
project = os.environ["AVALON_PROJECT"]
|
project = os.environ["AVALON_PROJECT"]
|
||||||
|
|
||||||
|
|
@ -23,7 +22,7 @@ if shelf_preset:
|
||||||
print(import_string)
|
print(import_string)
|
||||||
exec(import_string)
|
exec(import_string)
|
||||||
|
|
||||||
cmds.evalDeferred("mlib.shelf(name=shelf_preset['name'], iconPath=icon_path, preset=shelf_preset)")
|
cmds.evalDeferred("mlib.shelf(name=shelf_preset['name'], iconPath=icon_path, preset=shelf_preset)")
|
||||||
|
|
||||||
|
|
||||||
print("finished OpenPype usersetup")
|
print("finished OpenPype usersetup")
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ payload_skeleton_template = {
|
||||||
"BatchName": None, # Top-level group name
|
"BatchName": None, # Top-level group name
|
||||||
"Name": None, # Job name, as seen in Monitor
|
"Name": None, # Job name, as seen in Monitor
|
||||||
"UserName": None,
|
"UserName": None,
|
||||||
"Plugin": "MayaPype",
|
"Plugin": "MayaBatch",
|
||||||
"Frames": "{start}-{end}x{step}",
|
"Frames": "{start}-{end}x{step}",
|
||||||
"Comment": None,
|
"Comment": None,
|
||||||
"Priority": 50,
|
"Priority": 50,
|
||||||
|
|
@ -396,7 +396,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
||||||
step=int(self._instance.data["byFrameStep"]))
|
step=int(self._instance.data["byFrameStep"]))
|
||||||
|
|
||||||
self.payload_skeleton["JobInfo"]["Plugin"] = self._instance.data.get(
|
self.payload_skeleton["JobInfo"]["Plugin"] = self._instance.data.get(
|
||||||
"mayaRenderPlugin", "MayaPype")
|
"mayaRenderPlugin", "MayaBatch")
|
||||||
|
|
||||||
self.payload_skeleton["JobInfo"]["BatchName"] = filename
|
self.payload_skeleton["JobInfo"]["BatchName"] = filename
|
||||||
# Job name, as seen in Monitor
|
# Job name, as seen in Monitor
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ def inject_openpype_environment(deadlinePlugin):
|
||||||
with open(export_url) as fp:
|
with open(export_url) as fp:
|
||||||
contents = json.load(fp)
|
contents = json.load(fp)
|
||||||
for key, value in contents.items():
|
for key, value in contents.items():
|
||||||
deadlinePlugin.SetEnvironmentVariable(key, value)
|
deadlinePlugin.SetProcessEnvironmentVariable(key, value)
|
||||||
|
|
||||||
os.remove(export_url)
|
os.remove(export_url)
|
||||||
|
|
||||||
|
|
@ -162,4 +162,3 @@ def __main__(deadlinePlugin):
|
||||||
inject_openpype_environment(deadlinePlugin)
|
inject_openpype_environment(deadlinePlugin)
|
||||||
else:
|
else:
|
||||||
pype(deadlinePlugin) # backward compatibility with Pype2
|
pype(deadlinePlugin) # backward compatibility with Pype2
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue