Skip to content

Conversation

@jakubjezek001
Copy link
Member

@jakubjezek001 jakubjezek001 commented Nov 14, 2025

Summary

This enhancement introduces conditional shot attribute publishing functionality to the CollectHierarchy plugin, allowing users to control when shot attributes (Frame Start/End, Clip In/Out, etc.) are updated during publishing.

User is able to toggle the updating by going into Publisher's Context item and toggle Ignore shot attributes on update
image

Changelog Description

Shot attributes can now be updated on demand with Shot product instance attribute toggle. When enabled, shot attributes like Frame Start/End and Clip In/Out will be updated during publishing. When disabled, existing shot attributes remain unchanged.

Changes Made

Core Functionality

  • Enhanced CollectHierarchy plugin with conditional shot attribute updating
    • Added ignore_shot_attributes_on_update setting with per-instance control
    • Introduced AYONPyblishPluginMixin for settings integration
    • Added API call optimization for checking existing folder entities

Key Features Added

  • Conditional Attribute Updates: Shot attributes are only updated when:
    • The shot folder already exists AND
    • The ignore_shot_attributes_on_update toggle is disabled
  • Instance-level Control: Each shot instance can independently control attribute updating
  • Performance Optimization: Batch API calls to check existing folder entities
  • Settings Integration: Full integration with AYON's settings system

Settings

  • Location: Project Settings > Core > Collect Hierarchy
  • Option: "Ignore shot attributes on update" (default: false)
  • Behavior: When true, prevents updating shot attributes on existing shots

Shot Attributes Controlled

The following shot attributes are conditionally updated:

  • handleStart / handleEnd - Shot handle frames
  • frameStart / frameEnd - Shot frame range
  • clipIn / clipOut - Editorial clip timing
  • fps - Frame rate
  • resolutionWidth / resolutionHeight - Shot resolution
  • pixelAspect - Pixel aspect ratio

Testing Notes

  1. Enable Attribute Updates: Publish a shot with specific cut and duration settings, keep the toggle OFF (default)
    • ✅ Shot attributes like Frame Start/End and Clip In/Out should be updated
  2. Disable Attribute Updates: Publish the same shot again with the toggle ON
    • ✅ Shot attributes should remain unchanged from previous publish
  3. New Shot Creation: Create a new shot with toggle ON
    • ✅ Shot attributes should still be set (only affects existing shots)

Compatibility

  • ✅ Backward compatible - defaults maintain existing behavior
  • ✅ No breaking changes to existing workflows

Related

  • Client ticket: YN-0075

@ynbot ynbot added type: enhancement Improvement of existing functionality or minor addition size/XS labels Nov 14, 2025
@jakubjezek001 jakubjezek001 self-assigned this Nov 14, 2025
defined. This is only used inside of any editorial or csv ingest
Adds an option to the Collect Hierarchy plugin to ignore shot attributes
when updating.
@jakubjezek001 jakubjezek001 added the sponsored This is directly sponsored by a client or community member label Nov 14, 2025
Collect existing folder entities for shots to check if shot attributes
should be synced during update.
@ynbot ynbot moved this to Review In Progress in PR reviewing Nov 18, 2025
Simplify folder path collection and existing entity lookup for
CollectHierarchy plugin. Use sets and dicts for improved efficiency and
readability.
The collect hierarchy plugin was retrieving all fields when getting
existing folders from the database, but only the 'path' field is needed.
This change reduces the amount of data transferred.
Comment on lines +2 to +4
from ayon_core.lib import BoolDef
import ayon_api
from ayon_core.pipeline import publish
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from ayon_core.lib import BoolDef
import ayon_api
from ayon_core.pipeline import publish
import ayon_api
from ayon_core.lib import BoolDef
from ayon_core.pipeline import publish

Comment on lines +148 to +159
SHOT_ATTRS = (
"handleStart",
"handleEnd",
"frameStart",
"frameEnd",
"clipIn",
"clipOut",
"fps",
"resolutionWidth",
"resolutionHeight",
"pixelAspect",
)
Copy link
Member

Choose a reason for hiding this comment

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

I guess this can be at the top of the files as constant.

@github-project-automation github-project-automation bot moved this from Review In Progress to Merge Requested in PR reviewing Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition

Projects

Status: Merge Requested

Development

Successfully merging this pull request may close these issues.

4 participants