Skip to content
Open
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
74e6928
implement save file action for non-exr format and raw save filename i…
moonyuet Jun 9, 2026
d6bdc71
Merge remote-tracking branch 'origin/develop' into bugfix/138-impleme…
moonyuet Jun 9, 2026
1c2d69d
Apply suggestion from @BigRoy
moonyuet Jun 10, 2026
37f37f8
implement the function is_vray_sawrawfile for rt.rendSaveFile
moonyuet Jun 10, 2026
eb79581
Merge branch 'bugfix/138-implement-save-file-action-when-non-exr-form…
moonyuet Jun 10, 2026
08e1d07
fix typo & use is_vray_exr_saverawfile
moonyuet Jun 10, 2026
cf4e2ef
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jun 18, 2026
a6115df
enhancement: tweak on expectedFile when only splitfilename used.
moonyuet Jun 18, 2026
a72370a
bugfix: make sure expected files have been set correctly
moonyuet Jun 22, 2026
c0aff25
enhancement: fix on the exr format
moonyuet Jun 22, 2026
c3042c6
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jun 26, 2026
2841a45
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jul 3, 2026
6757445
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jul 7, 2026
4e8aed5
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jul 8, 2026
3b7e887
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jul 8, 2026
c86672c
Merge remote-tracking branch 'origin/develop' into bugfix/138-impleme…
moonyuet Jul 8, 2026
4b93a36
fix the logic
moonyuet Jul 8, 2026
9a17e15
fix logic issue
moonyuet Jul 8, 2026
a3030c7
bugfix: repair action would repair default 3dsmax render output when …
moonyuet Jul 10, 2026
60f573d
Refactoring to use rt.rendouptufilename for validation and repair action
moonyuet Jul 15, 2026
1605e8d
Fix the logic changes regarding to the recent changes on the render w…
moonyuet Jul 15, 2026
1bbb62f
Make sure the related attributes of workfile name is updated in the c…
moonyuet Jul 15, 2026
e9e9ac9
Potential fix for pull request finding
moonyuet Jul 15, 2026
9520675
Potential fix for pull request finding
moonyuet Jul 15, 2026
d583fee
Potential fix for pull request finding
moonyuet Jul 15, 2026
59e3786
Potential fix for pull request finding
moonyuet Jul 15, 2026
c011fa8
Potential fix for pull request finding
moonyuet Jul 15, 2026
9a9a26e
Potential fix for pull request finding
moonyuet Jul 15, 2026
a3f1110
Apply code changes according to copilot's suggestion
moonyuet Jul 15, 2026
c8a2123
Potential fix for pull request finding
moonyuet Jul 15, 2026
c7390a0
Potential fix for pull request finding
moonyuet Jul 15, 2026
d0eeee5
Potential fix for pull request finding
moonyuet Jul 15, 2026
beed835
apply the fix as regard to the copilot's suggestion
moonyuet Jul 15, 2026
2941904
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jul 16, 2026
574f5ec
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Jul 16, 2026
07d1b62
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Aug 7, 2026
f90b6ba
fix the local rendering render in different image format
moonyuet Aug 12, 2026
5d6938f
Merge branch 'develop' into bugfix/138-implement-save-file-action-whe…
moonyuet Sep 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions client/ayon_max/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,28 @@ def set_correct_workfile_name_for_render_output(
return filepath

rest = match.group("rest") or ""

# update the changes in the context instances to reflect the new workfile name
host = registered_host()
create_context = CreateContext(host, discover_publish_plugins=False)
workfile_name_keys = {
"original_workfile_pattern",
# backward compatibility for older versions of Ayon
"AssetName"
}

has_changes = False
for created_instance in create_context.instances:
for key in workfile_name_keys:
if key not in created_instance:
continue
if created_instance[key] != render_workfile_name:
continue
created_instance[key] = current_workfile_filename
has_changes = True

Comment thread
Copilot marked this conversation as resolved.
if has_changes:
create_context.save_changes()
return os.path.join(
render_root,
current_workfile_filename,
Expand Down Expand Up @@ -1153,3 +1175,22 @@ def build_general_output_filename(
ext = match.group("ext")
filename = f"{name}_{element}..{ext}"
return os.path.join(output_dir, filename)


def is_vray_exr_saverawfile(image_format: str, vr_settings: Any) -> bool:
"""Check if V-Ray renderer is set to output raw files in EXR format.

Args:
image_format (str): The image format being used for rendering.
vr_settings (Any): The V-Ray settings object

Returns:
bool: True if the image format is EXR and V-Ray is set to save
raw files, False otherwise.
"""
return (
image_format == "exr"
# safe check
and hasattr(vr_settings, "output_saverawfile")
and vr_settings.output_saverawfile
)
24 changes: 15 additions & 9 deletions client/ayon_max/api/lib_renderproducts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
get_current_renderer,
get_multipass_setting,
reformat_filename,
is_vray_exr_saverawfile,
)
from ayon_core.pipeline import get_current_project_name
from ayon_core.settings import get_project_settings
Expand Down Expand Up @@ -218,19 +219,24 @@ def get_vray_render_output(
if "GPU" in str(vr_renderer)
else vr_renderer
)
if (
not is_render_element
and image_format == "exr"
and not vray_settings.output_rawfilename
):
return getattr(vray_settings, "output_splitfilename", "") or rt.rendOutputFilename
is_save_vray_exr_rawfile = is_vray_exr_saverawfile(
image_format,
vray_settings,
)
if not is_save_vray_exr_rawfile and not is_render_element:
# In non-raw mode V-Ray writes the beauty output to `rt.rendOutputFilename`.
return rt.rendOutputFilename or getattr(vray_settings, "output_splitfilename", "")
output_attr = (
"output_rawfilename"
if not is_render_element and image_format == "exr"
if not is_render_element
and is_save_vray_exr_rawfile
else "output_splitfilename"
)
render_output = getattr(vray_settings, output_attr)
return render_output if render_output else rt.rendOutputFilename
render_output = getattr(vray_settings, output_attr, "")
if not render_output:
return rt.rendOutputFilename

return render_output

def get_arnold_render_output(self, arnold_renderer: Any, extension: str) -> str:
"""Get the Arnold render output filename.
Expand Down
16 changes: 12 additions & 4 deletions client/ayon_max/api/lib_rendersettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
get_default_render_folder,
get_multipass_setting,
get_vray_settings,
is_vray_exr_saverawfile,
)


Expand Down Expand Up @@ -140,12 +141,17 @@ def render_output(self):
if img_fmt == "exr":
vr_settings.output_saverawfile = True
vr_settings.output_rawfilename = f"{output}.{img_fmt}"
else:
if hasattr(vr_settings, "output_saverawfile"):
vr_settings.output_saverawfile = False
if hasattr(vr_settings, "output_rawfilename"):
vr_settings.output_rawfilename = ""
rt.rendOutputFilename = f"{output}..{img_fmt}"
Comment thread
Copilot marked this conversation as resolved.

if multipass_enabled:
rt.rendOutputFilename = output_filename
vr_settings.output_splitfilename = f"{output}.{img_fmt}"
else:
rt.rendOutputFilename = f"{output}_tmp..{img_fmt}"

self.render_element_layer(output, width, height, img_fmt)
# TODO: supports multipass for different renderers
elif renderer_name == "Redshift_Renderer":
Expand All @@ -155,8 +161,10 @@ def render_output(self):
rt.renderers.production.OutputExrMultipart = multipass_enabled

# prevent rendering extra files when using V-Ray
rt.rendSaveFile = True if not renderer_name.startswith("V_Ray_") else False

rt.rendSaveFile = not (
renderer_name.startswith("V_Ray_")
and is_vray_exr_saverawfile(img_fmt, vr_settings)
)
rt.renderSceneDialog.update()

def arnold_setup(self, output_dir, container, multipass_enabled):
Expand Down
Loading
Loading