Add custom frame range support for local rendering - #132
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for rendering a custom (non-contiguous) frame range during local rendering by collecting an explicit expected frame list and propagating it into render execution and expected output file collection.
Changes:
- Collects and stores
expectedFrameRangeformaxrenderinstances. - Uses
expectedFrameRangeto drive localrt.render()frame iteration (with cancellation support). - Updates
RenderProductsto generate expected output filenames from an explicit frame list instead ofrendStart/rendEnd.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| client/ayon_max/plugins/publish/extract_render.py | Uses expectedFrameRange for local rendering and adds cancellation handling. |
| client/ayon_max/plugins/publish/collect_render.py | Passes expectedFrameRange into RenderProducts so expected files match custom frames. |
| client/ayon_max/plugins/publish/collect_frame_range.py | Computes expectedFrameRange via helper and stores min/max handles from it. |
| client/ayon_max/api/lib.py | Adds get_expected_frames() helper to parse/compute expected frames. |
| client/ayon_max/api/lib_renderproducts.py | Refactors expected-file generation APIs to accept an explicit frame list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…6--Custom-Frame-Range-Support-for-Local-Rendering
There was a problem hiding this comment.
I was able to submit successfully the custom frames and also my render job got finnished succesfully on DL too, however my DL Publish job failed on ffmpeg...
Im not super sure about the failure but its definetely due to my custom frame range used
1001,1025-1026,1050
Im enclosing the publishing report json and DL publish job log:
3dsmax-publish-report-260511-15-13.json.txt
DL-PublishJob-Failure_2026-05-11_14-58-35_6a01d27b5063b87f0ba96d32.txt
|
also when trying the same but render locally, Im getting this error during the publish action: |
LiborBatek
left a comment
There was a problem hiding this comment.
I had succesfully published render with custom frames using Local rendering and Farm Rendering ...both were succesfully finnished and integrated on AYON too..
tested with 3dsmax 2026 and Vray
LGTM
| was_cancelled = rt.Name('wasCancelled') | ||
| was_cancelled.value = False |
…upport-for-Local-Rendering
LiborBatek
left a comment
There was a problem hiding this comment.
I have tested both local rendering and farm rendering with Use custom frames
First, the good thing is it didnt failed neither on submission nor rendering on DL which is awesome...
There are some issues still, tho.
First, Ayon can handle continuous custom frames sequence like 1005-1010 (while global context been e.g. 1001-1050 ) and also correctly renders mp4 and integrates those frames...
But once using non-continuous custom frames range like 1001, 1005, 1025 there 2 issues, first if having set in ayon-deadline settings Frame per task set to 5 it wont handle such render job correctly. See imgs below
which might lead to rendering unnecessary frames not corresponding to the custom frames set in the publisher.
And secondly, it fails to create correctly the reviewable mp4 and creating just single frame mp4. I would expect to either having mov composed of all those frames only or putting black for missing frames (this might be actually my missing configuration for Extract Review).
Lastly the integrated frames does not follow the frame number so instead of frames 1001, 1005, 1025 integrates those as 1001 1002 and 1003
This was during the render set to local rendering as the farm job had those incorrect frame ranges containing unneccessary frames as seen above.
|
@moonyuet speaking of the |
…upport-for-Local-Rendering
will re-test with latest commits and event. give approval again right away
LiborBatek
left a comment
There was a problem hiding this comment.
I have tested rendering via Vray , RShift and Arnold for 3dsmax
My findings so far:
- Vray works and publishes and integrates well
- RShift also works
- Arnold malfunction and fails due to wrong staging folder/ rendered frames location see below
Here is the staging folder with rendered frames while additional and incorrect subfolder with metadata.json file and preload maxscript... (second screen of that subfolder below) btw when moved those rendered frames to that subfolder all works well and renders got integrated via DL publishing.
Im also providing the files for your consideration:
maxrenderMain_metadata.json.txt
So only Arnold based renders fails...the rest works...
LiborBatek
left a comment
There was a problem hiding this comment.
I couldnt successfully submit the render while using Arnold renderer as Im getting some error:
Traceback (most recent call last):
File "C:\Users\lbate\AppData\Local\Ynput\AYON\dependency_packages\ayon_2606031445_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
runner(*args)
File "C:\Work\REPO\ayon-deadline\client\ayon_deadline\plugins\publish\max\submit_max_deadline.py", line 76, in process
super().process(instance)
File "C:\Work\REPO\ayon-deadline\client\ayon_deadline\abstract_submit_deadline.py", line 136, in process
job_id = self.process_submission()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Work\REPO\ayon-deadline\client\ayon_deadline\plugins\publish\max\submit_max_deadline.py", line 113, in process_submission
payload = self._use_published_name(payload_data, project_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Work\REPO\ayon-deadline\client\ayon_deadline\plugins\publish\max\submit_max_deadline.py", line 173, in _use_published_name
plugin_info["PostLoadScript"] = self.tmp_pre_load_max_script(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Work\REPO\ayon-deadline\client\ayon_deadline\plugins\publish\max\submit_max_deadline.py", line 411, in tmp_pre_load_max_script
render_dir.mkdir(parents=True, exist_ok=True)
File "C:\Program Files\Autodesk\3ds Max 2026\Python\Lib\pathlib.py", line 1116, in mkdir
os.mkdir(self, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\projects\\Quantum_Demo\\assets\\props\\max_tests\\container_b\\work\\lookdev\renders\\3dsmax\\maxrenderMain\\QD_container_b_workfileLookdev_v003'
Also enclosing the full publish report json:
|
should be fixed in the updated commit in ynput/ayon-deadline#252. |
|
So Im again able to pick custom frames in the Publisher UI and when trying to render with When trying |
|
This is an annoying issue to deal with in Arnold. I will commit the change to see if it can potentially fix that in terms of local rendering. |
…6--Custom-Frame-Range-Support-for-Local-Rendering
|
e5a4bab fixes the potential path issue |
|
As I was testing with Also enclosing full publish report: |
|
Local rendering with Enclosing also publish successful report for comparison? local-Rshift-publish-report-260814-18-58.json.txt Small but important update: I also succesfully rendered locally with arnold-local-render-publish-report-260814-19-21.json.txt So far: Local rendering with custom frames works for
|
Can you provide me your scene to me for testing(as well as the way you set up for publish-report-260815-21-10.json I would try to update the latest vray and see if I can replicate the issue |
|
Hmm, Vray still giving me some error ocio related one...dont know why, also tried different ocio config files but still didnt helped... Here is the full report: Vray-custom-fr-publish-report-260817-16-14.json.txt Some excerpt from the report (in case my attachement dont work for you) |
LiborBatek
left a comment
There was a problem hiding this comment.
The last missing bit seems working! I was able to successfully publish custom frames while using Vray in local render and farm render too...
All been correctly integrated to AYON and also with blank frames in the reviewable mp4.
LGTM!
Enclosing successful publish report json for you to look:
…upport-for-Local-Rendering



Changelog Description
This PR is to add custom frame range support for local rendering.
Resolve #131
Additional review information
Required dependencies
Test with the twin PR in:
Testing notes: