Skip to content

YN-0022 Consolidate LoadClip and LoadClipBatch#123

Merged
rdelillo merged 40 commits into
developfrom
bugfix/YN-0022_fix_clip_loaders
Jun 18, 2026
Merged

YN-0022 Consolidate LoadClip and LoadClipBatch#123
rdelillo merged 40 commits into
developfrom
bugfix/YN-0022_fix_clip_loaders

Conversation

@rdelillo

@rdelillo rdelillo commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Changelog Description

fixes: #114 and #113

Consolidate LoadClip and LoadClipBatch:

  • AttributeError formatting data bug with batch group
  • handle incompatible Flame media input (e.g. sxr)
  • handle version with missing representation NoneType
  • Fix video based clip import
  • ensure all version for a product are sourced regardless of their optional task
  • factorize loader code
  • fix clip rename logic

Additional review information

Tested on Flame 2026.2 / macOs

Testing notes:

  1. Ensure LoadClip and LoadClipBatch create the relevant source clips in Flame
  2. Ensure all available versions are sourced and clips are created following settings name and current version

@rdelillo rdelillo changed the title Bugfix/yn 0022 fix clip loaders Consolidate LoadClip and LoadClipBatch Apr 22, 2026
@rdelillo rdelillo changed the title Consolidate LoadClip and LoadClipBatch YN-0022 Consolidate LoadClip and LoadClipBatch Apr 22, 2026
@rdelillo rdelillo added type: bug Something isn't working sponsored This is directly sponsored by a client or community member labels Apr 22, 2026
@rdelillo rdelillo requested a review from Copilot April 22, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Consolidates LoadClip and LoadClipBatch behavior by moving shared loader logic into the ClipLoader base class, aiming to fix version/representation edge cases and reduce duplication.

Changes:

  • Move common product_base_types / representations / extensions and clip-loading logic into client/ayon_flame/api/plugin.py::ClipLoader.
  • Update LoadClip and LoadClipBatch to rely on the consolidated base implementation and simplify reel retrieval logic.
  • Add OpenClip “current version” setter guard and adjust clip naming format-data handling.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.

File Description
client/ayon_flame/plugins/load/load_clip_batch.py Switches to base ClipLoader defaults and customizes clip-name format data with batch name.
client/ayon_flame/plugins/load/load_clip.py Switches to base ClipLoader defaults and refactors reel group/reel creation logic.
client/ayon_flame/api/plugin.py Centralizes clip loading/version aggregation logic in ClipLoader and adds OpenClip current-version handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/ayon_flame/api/plugin.py
Comment thread client/ayon_flame/plugins/load/load_clip_batch.py Outdated
Comment thread client/ayon_flame/api/plugin.py
Comment thread client/ayon_flame/api/plugin.py
Comment thread client/ayon_flame/plugins/load/load_clip.py Outdated
Comment thread client/ayon_flame/plugins/load/load_clip.py Outdated
Comment thread client/ayon_flame/api/plugin.py
Comment thread client/ayon_flame/api/plugin.py
Comment thread client/ayon_flame/api/plugin.py
@rdelillo rdelillo marked this pull request as ready for review April 23, 2026 15:58
@rdelillo rdelillo self-assigned this Apr 23, 2026
@rdelillo rdelillo requested a review from jakubjezek001 April 23, 2026 15:58

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should've been approved. I'm hearing this has been tested via some other PRs 🤔

@rdelillo rdelillo merged commit ffa275b into develop Jun 18, 2026
1 check passed
@rdelillo rdelillo deleted the bugfix/YN-0022_fix_clip_loaders branch June 18, 2026 19:39

@jakubjezek001 jakubjezek001 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried LoadClip and LoadClipBatch, both with the same result. I have noticed that it is only happening on certain product versions. I will investigate more if this is not caused by my setup or it could be effecting also productions:

Traceback (most recent call last):
  File "/Users/jakub/CODE/__YNPUT/ayon-core/client/ayon_core/tools/loader/models/actions.py", line 1005, in _load_representations_by_loader
    load_with_repre_context(
  File "/Users/jakub/CODE/__YNPUT/ayon-core/client/ayon_core/pipeline/load/utils.py", line 327, in load_with_repre_context
    return loader.load(repre_context, name, namespace, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jakub/CODE/__YNPUT/ayon-core/client/ayon_core/pipeline/load/plugins.py", line 430, in wrapped_method
    result = original_method(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jakub/CODE/__YNPUT/ayon-flame/client/ayon_flame/plugins/load/load_clip_batch.py", line 30, in load
    return super().load(context, name, namespace, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jakub/CODE/__YNPUT/ayon-flame/client/ayon_flame/api/plugin.py", line 785, in load
    clip_solver.add_feed(
  File "/Users/jakub/CODE/__YNPUT/ayon-flame/client/ayon_flame/api/plugin.py", line 897, in add_feed
    self._create_new_open_clip(
  File "/Users/jakub/CODE/__YNPUT/ayon-flame/client/ayon_flame/api/plugin.py", line 933, in _create_new_open_clip
    self._rename_track_name(
  File "/Users/jakub/CODE/__YNPUT/ayon-flame/client/ayon_flame/api/plugin.py", line 1001, in _rename_track_name
    name_obj.text = StringTemplate(
    ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text'

@jakubjezek001

Copy link
Copy Markdown
Member

So I can confirm that this will be effecting productions which are for example publishing from Windows Nuke and want to load it into linux or MacOS Flame. It might be perhaps unrelated for this PR and I will make a bugfix PR. #130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sponsored This is directly sponsored by a client or community member type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YN-0022: Finish LoadClip containerisation

5 participants