Skip to content

Commit

Permalink
Apply override on AOV layer path
Browse files Browse the repository at this point in the history
  • Loading branch information
jlorrain authored and ClementHector committed Feb 7, 2022
1 parent cc3167b commit c22763f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 11 additions & 4 deletions openpype/hosts/maya/plugins/publish/collect_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def process(self, context):
return

render_globals = render_instance
# Get global overrides and translate to Deadline values
overrides = self.parse_options(str(render_globals))

collected_render_layers = render_instance.data["setMembers"]
filepath = context.data["currentFile"].replace("\\", "/")
asset = api.Session["AVALON_ASSET"]
Expand Down Expand Up @@ -235,8 +238,14 @@ def process(self, context):
for aov in exp_files:
full_paths = []
for file in aov[aov.keys()[0]]:
full_path = os.path.join(workspace, default_render_file,
file)
if 'overrideOutput' in overrides:
full_path = os.path.join(overrides['overrideOutput'],
default_render_file,
file)
else:
full_path = os.path.join(workspace,
default_render_file,
file)
full_path = full_path.replace("\\", "/")
full_paths.append(full_path)
publish_meta_path = os.path.dirname(full_path)
Expand Down Expand Up @@ -380,8 +389,6 @@ def process(self, context):
data["families"].append("assscene_render")

# Include (optional) global settings
# Get global overrides and translate to Deadline values
overrides = self.parse_options(str(render_globals))
data.update(**overrides)

# Define nice label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ def process(self, instance):
jobname = "%s - %s" % (filename, instance.name)

# Get the variables depending on the renderer
render_variables = get_renderer_variables(renderlayer, dirname, override_output)
render_variables = get_renderer_variables(renderlayer, dirname,
override_output)
filename_0 = render_variables["filename_0"]
if self.use_published:
new_scene = os.path.splitext(filename)[0]
Expand Down

0 comments on commit c22763f

Please sign in to comment.