Skip to content

Incorrect frame range detection #34

@georgeantonopoulos-bcnvisuals

Description

Is there an existing issue for this?

  • I have searched the existing issues and added correct labels.

Description

Current Behavior

  1. In development mode, the pre-launch hooks (pre_setup_openrv.py, etc.) are not being loaded because the addon uses OPENRV_ROOT_DIR instead of the development directory path in the addon.py file.

  2. When loading image sequences in OpenRV, the frame range detection in client/ayon_openrv/plugins/load/openrv/load_frames.py is checking representation attributes first, which often contain incorrect frame range data (showing same start and end frame), causing sequences to be loaded as single frames. This has only been confirmed for publishes from Houdini and Nuke.

Expected Behavior

  1. When AYON_USE_DEV environment variable is set, the addon should look for hooks in the development directory structure (client/ayon_openrv/hooks) instead of using OPENRV_ROOT_DIR.

  2. Frame range detection should check version attributes first, as they contain the correct frame range information for the sequence (e.g., frameStart: 1635, frameEnd: 1765). Only if version attributes are not available, it should fall back to representation attributes.

Steps To Reproduce:

Steps to Reproduce

DEV Mode Issue:

  1. Set up OpenRV addon in development mode
  2. Set AYON_USE_DEV=1 environment variable
  3. Try to launch OpenRV
  4. Observe that pre-launch hooks are not executed because they're not found in the correct path

Frame Range Issue:

  1. Have an image sequence with multiple frames (e.g., 1635-1765) published from Houdini or Nuke
  2. Try to load the sequence through OpenRV
  3. Observe that only a single frame (1635) is loaded
  4. Add debug logging to see that it's using representation attributes instead of version attributes which contain the correct frame range

Additional context:

Additional Context

Version

  • AYON Server: 1.5.3+202410241812
  • ayon-core: 1.0.12-bcn.1
  • openrv addon: 1.0.1

What platform were you running when you found the bug?

Linux - Rocky9

Additional Information

Two separate issues were identified in specific files:

  1. DEV Mode Fix: In client/ayon_openrv/addon.py, the get_launch_hook_paths method needed to be modified to check for AYON_USE_DEV environment variable and use the development directory path:

    if DEV_MODE:
        # In development mode, use the current directory's hooks
        return [
            os.path.join(os.getcwd(), "client/ayon_openrv/hooks")
        ]
  2. Frame Range Fix: In client/ayon_openrv/plugins/load/openrv/load_frames.py, the _get_sequence_range method needs to prioritize version attributes over representation attributes, as version attributes contain the correct frame range information (e.g., frameStart: 1635, frameEnd: 1765).

Relevant log output:

Custom debug to see original frame range from representation:
- { load_frames }: [ ============================= ] 
 - { load_frames }: [ Frame range from attributes - start: 1001, end: 1001 ] 
 - { load_frames }: [ Single frame detected ] 
 - { load_frames }: [ Got sequence range: None ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityIssues and PRs coming from the community memberstype: bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions