Skip to content

Conversation

@BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Jan 5, 2026

Changelog Description

Do not enforce frame padding minimum to match end frame length.

A sequence like 998-1010 should write 998, 999, 1000, 1001, ... - not 0998, 0999, 1000, 1001 if the anatomy template sets a frame padding of 3.

Additional info

Fix #1625

Testing notes:

  1. Set frame padding to 3
  2. Write frames 998-1002
  3. The published frames 998 and 999 should not have a padded zero up front.
  4. Set frame padding to 4
  5. Write frames 998-1002
  6. The published frames 998 and 999 should have a padded zero up front.

…me length.

A sequence like `998-1010` should write 998, 999, 1000, 1001, ... - not 0998, 0999, 1000, 1001 if the anatomy template sets a frame padding of 3.
@BigRoy BigRoy requested review from LiborBatek and iLLiCiTiT January 5, 2026 11:51
@BigRoy BigRoy self-assigned this Jan 5, 2026
@BigRoy BigRoy added type: bug Something isn't working sponsored This is directly sponsored by a client or community member labels Jan 5, 2026
@ynbot ynbot added the size/XS label Jan 5, 2026
@iLLiCiTiT
Copy link
Member

How does this matter? This is before integration.

I think we had to use this to allow ffmpeg or oiiool to work with the sequence as they require to have unified padding of frames in filenames.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Jan 5, 2026

How does this matter? This is before integration.

I think we had to use this to allow ffmpeg or oiiool to work with the sequence as they require to have unified padding of frames in filenames.

This is in the Integrator, it's not before? It's directly affecting the template data for formatting?

If this is not the solution - then perhaps the issue we have is that frame data is str and not int - and hence it's not actually the anatomy template doing the formatting? 🤔

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Jan 5, 2026

This is in the Integrator, it's not before? It's directly affecting the template data for formatting?

Sorry I jumped from ExtractOIIO PR to this and mismatched the plugin. Ok, but still should we use length of last frame to actually fill the padding? Nuke won't be able to recognize the sequence 999-1000 either (if I remember correctly).

What lead to this PR?

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Jan 5, 2026

I'm afraid this might break some load plugins, and loading in few hosts, we really should validate that all hosts, that do allow loading of sequence, can load sequence 999-1000 with these changes.

And if we gonna do this we also should change how "frame" is filled in representation context. The first_index_padded is using padding so it won't be filled correctly right now and using the first frame might cause issues if load plugin is using the frame length to determine the padding.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Jan 5, 2026

And if we gonna do this we also should change how "frame" is filled in representation context. The first_index_padded is using padding so it won't be filled correctly right now and using the first frame might cause issues if load plugin is using the frame length to determine the padding.

The first_index_padded value should actually match the value set up with this change? So should be correct? Only for {originalBasename} it now preserves the input padding length (from the last frame that is however).

I'm afraid this might break some load plugins, and loading in few hosts, we really should validate that all hosts, that do allow loading of sequence, can load sequence 999-1000 with these changes.

Works fine in Maya for file nodes and image planes, works fine to load and play in Nuke, Fusion and Blender (load to compositor).

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Jan 5, 2026

The first_index_padded value should actually match the value set up with this change? So should be correct?

It should match, but it doesn't based on the code I've seen. It does add padding based on the last frame. So if you have padding 3 and frame range 999-1000 the "frame" in context would be "0999" which is not what would be used in the path ("999").

Works fine in Maya for file nodes and image planes, works fine to load and play in Nuke, Fusion and Blender (load to compositor).

That's great start, now Flame, Harmony, Houdini, TVPaint, Houdini, AE, OpenRV, etc. BTW did you use AYON loaders or just dropped them into the DCC?

I'm really scared about this and I'm tempted to say that this should be settings based and not enabled by default.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Jan 6, 2026

That's great start, now Flame, Harmony, Houdini, TVPaint, Houdini, AE, OpenRV, etc. BTW did you use AYON loaders or just dropped them into the DCC?

AYON loaders of course.

I now tested these - and these play fine:

  • Maya Image Plane
  • Maya File Node
  • Blender Compositor Image
  • Fusion Load Image
  • Nuke Load Clip
  • After Effects Load file
  • Premiere Pro Load file

These currently fail:

  • Houdini Load Image (Copernicus)
  • Houdini Load Image (COP2)

This is because our load logic loads it with $F4 in the filenames instead of $F3. Once that's swapped it works fine too.
Those values are hardcoded and that's just a trivial bug: https://github.com/ynput/ayon-houdini/blob/a690f83e5945c16c3677c4fe21b0ce3124964242/client/ayon_houdini/plugins/load/load_image_copernicus.py#L146

It would likewise also fail if e.g. padding was 3 or 5 throughout the full sequence. So it's unrelated to this PR.


More to test would be:

  • TVPaint - @iLLiCiTiT validated
  • OpenRV
  • Harmony
  • Flame

But so far so good.
@LiborBatek perhaps?

@BigRoy
Copy link
Collaborator Author

BigRoy commented Jan 6, 2026

It should match, but it doesn't based on the code I've seen. It does add padding based on the last frame. So if you have padding 3 and frame range 999-1000 the "frame" in context would be "0999" which is not what would be used in the path ("999").

This is what's stored in representation["context"]["frame"] on this publish for me "993". So seems fine?

    "representation": {
        "active": true,
        "attrib": {
            "clipIn": null,
            "clipOut": null,
            "description": null,
            "extension": null,
            "fps": null,
            "frameEnd": null,
            "frameStart": null,
            "handleEnd": null,
            "handleStart": null,
            "path": "C:/projects/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.993.exr",
            "pixelAspect": null,
            "resolutionHeight": null,
            "resolutionWidth": null,
            "template": "{root[work]}/{project[name]}/{hierarchy}/{folder[name]}/publish/{product[type]}/{product[name]}/v{version:0>3}/{project[code]}_{folder[name]}_{product[name]}_v{version:0>3}<_{output}><.{frame:0>3}>.{ext}"
        },
        "context": {
            "ext": "exr",
            "folder": {
                "name": "nuke",
                "parents": [
                    "apps"
                ],
                "path": "/apps/nuke",
                "type": "Folder"
            },
            "frame": "993",
            "hierarchy": "apps",
            "product": {
                "name": "renderCompMain",
                "type": "render"
            },
            "project": {
                "code": "tes",
                "name": "test"
            },
            "representation": "exr",
            "root": {
                "work": "C:/projects"
            },
            "task": {
                "name": "comp",
                "short": "comp",
                "type": "Compositing"
            },
            "user": {
                "name": "bigroy"
            },
            "username": "bigroy",
            "version": 5
        },
        "createdAt": "2026-01-05T13:40:47.883978+00:00",
        "data": {
            "colorspaceData": {
                "colorspace": "scene_linear",
                "config": {
                    "path": "C:\\Users\\User\\AppData\\Local\\Ynput\\AYON\\addons\\ayon_ocio_1.2.1\\ayon_ocio\\configs\\OpenColorIOConfigs\\aces_1.2\\config.ocio",
                    "template": "{BUILTIN_OCIO_ROOT}/aces_1.2/config.ocio"
                }
            },
            "context": {
                "ext": "exr",
                "folder": {
                    "name": "nuke",
                    "parents": [
                        "apps"
                    ],
                    "path": "/apps/nuke",
                    "type": "Folder"
                },
                "frame": "993",
                "hierarchy": "apps",
                "product": {
                    "name": "renderCompMain",
                    "type": "render"
                },
                "project": {
                    "code": "tes",
                    "name": "test"
                },
                "representation": "exr",
                "root": {
                    "work": "C:/projects"
                },
                "task": {
                    "name": "comp",
                    "short": "comp",
                    "type": "Compositing"
                },
                "user": {
                    "name": "bigroy"
                },
                "username": "bigroy",
                "version": 5
            }
        },
        "files": [
            {
                "hash": "tes_nuke_renderCompMain_v005,993,exr|1767620440,2805698|490",
                "id": "2469ab1fea3c11f0940b3c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.993.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.993.exr",
                "size": 490
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,994,exr|1767620440,3348887|71735",
                "id": "2469bf7aea3c11f085ad3c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.994.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.994.exr",
                "size": 71735
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,995,exr|1767620440,378352|71735",
                "id": "2469bf7bea3c11f0bf783c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.995.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.995.exr",
                "size": 71735
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,996,exr|1767620440,4270296|72815",
                "id": "2469bf7cea3c11f0aef83c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.996.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.996.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,997,exr|1767620440,47722|71735",
                "id": "2469bf7dea3c11f0aa943c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.997.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.997.exr",
                "size": 71735
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,998,exr|1767620440,5269928|72815",
                "id": "2469bf7eea3c11f0ad573c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.998.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.998.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,999,exr|1767620440,5771012|72815",
                "id": "2469bf7fea3c11f092093c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.999.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.999.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1000,exr|1767620440,6269474|72815",
                "id": "2469bf80ea3c11f083d33c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1000.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1000.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1001,exr|1767620440,6769366|71735",
                "id": "2469d7fdea3c11f081a63c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1001.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1001.exr",
                "size": 71735
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1002,exr|1767620440,7310107|72815",
                "id": "2469d7feea3c11f093163c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1002.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1002.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1003,exr|1767620440,7768497|72815",
                "id": "2469d7ffea3c11f09def3c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1003.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1003.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1004,exr|1767620440,8285966|72815",
                "id": "2469d800ea3c11f09c783c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1004.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1004.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1005,exr|1767620440,8836403|72815",
                "id": "2469d801ea3c11f0bcb83c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1005.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1005.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1006,exr|1767620440,928549|72815",
                "id": "2469d802ea3c11f093e53c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1006.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1006.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1007,exr|1767620440,9812398|72815",
                "id": "2469d803ea3c11f087a43c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1007.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1007.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1008,exr|1767620441,0286255|72815",
                "id": "2469d804ea3c11f09fba3c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1008.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1008.exr",
                "size": 72815
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1009,exr|1767620441,0791242|71735",
                "id": "2469d805ea3c11f0bd933c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1009.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1009.exr",
                "size": 71735
            },
            {
                "hash": "tes_nuke_renderCompMain_v005,1010,exr|1767620441,1271331|63095",
                "id": "2469d806ea3c11f0ae863c0af39c4c02",
                "name": "tes_nuke_renderCompMain_v005.1010.exr",
                "path": "{root[work]}/test/apps/nuke/publish/render/renderCompMain/v005/tes_nuke_renderCompMain_v005.1010.exr",
                "size": 63095
            }
        ],
        "id": "245f2f3bea3c11f0bbe53c0af39c4c02",
        "name": "exr",
        "status": "Omitted",
        "tags": [],
        "traits": null,
        "versionId": "2456c25bea3c11f080f93c0af39c4c02"
    },

@LiborBatek
Copy link
Member

I guess speaking of testing the rest its more for @kalisp and @MustafaJafar (houdini) and flame maybe @MilaKudr flame?

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: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YN-0338: Anatomy formatting with padding of three does not work

4 participants