ynput / ayon-ftrack

Apache License 2.0
3 stars 9 forks source link

Failing detect thumbnail component if model product type with thumbnail from source #67

Closed jakubjezek001 closed 5 months ago

jakubjezek001 commented 9 months ago

Current state

Thumbnail representation created in TrayPublisher via screengrub on model product type is failing to be integrated as thumbnail on Ftrack.

Solution

Some better thumbnail detection need to be improved so representation is correctly converted into Thumbnail component.

Publisher output

Representation comming into the plugin IntegrateFtrackInstance:

DEBUG: Representation {'name': 'thumbnail', 'ext': 'jpg', 'files': '70cea2d37ea24e07a10b7d98b8b24c16_thumb.jpg', 'stagingDir': 'C:\\Users\\PIPELI~1\\AppData\\Local\\Temp\\pyblish_tmp_our86n9r', 'thumbnail': True, 'tags': ['thumbnail'], 'outputName': 'thumbnail', 'published_path': 'P:\\2023\\AyonTests\\assets\\props\\crate_a\\publish\\model\\modelMain\\v003\\atst_crate_a_modelMain_v003_thumbnail.jpg'}
DEBUG: Representation {'name': 'abc', 'ext': 'abc', 'files': 'crate_a_modelMain.abc', 'stagingDir': 'C:\\Users\\PIPELI~1\\AppData\\Local\\Temp\\pyblish_tmp_v3kjfchn', 'published_path': 'P:\\2023\\AyonTests\\assets\\props\\crate_a\\publish\\model\\modelMain\\v003\\atst_crate_a_modelMain_v003.abc'}
DEBUG: Representation {'name': 'blend', 'ext': 'blend', 'files': 'crate_a_modelMain.blend', 'stagingDir': 'C:\\Users\\PIPELI~1\\AppData\\Local\\Temp\\pyblish_tmp_v3kjfchn', 'published_path': 'P:\\2023\\AyonTests\\assets\\props\\crate_a\\publish\\model\\modelMain\\v003\\atst_crate_a_modelMain_v003.blend'}
DEBUG: Multiple output names: []

Components created at the end of the plugin:

DEBUG: Components list: [
    {
        "additional_data": {},
        "asset_data": {
            "name": "modelMain"
        },
        "assettype_data": {
            "short": "geo"
        },
        "assetversion_data": {
            "comment": "",
            "status_name": null,
            "version": 3
        },
        "component_data": {
            "metadata": {
                "ftr_meta": "{\"width\": 946, \"height\": 673, \"format\": \"image\"}"
            },
            "name": "ftrackreview-image_src"
        },
        "component_location": null,
        "component_location_name": "ftrack.unmanaged",
        "component_overwrite": false,
        "component_path": "P:\\2023\\AyonTests\\assets\\props\\crate_a\\publish\\model\\modelMain\\v003\\atst_crate_a_modelMain_v003_thumbnail.jpg",
        "thumbnail": false
    },
    {
        "additional_data": {},
        "asset_data": {
            "name": "modelMain"
        },
        "assettype_data": {
            "short": "geo"
        },
        "assetversion_data": {
            "comment": "",
            "status_name": null,
            "version": 3
        },
        "component_data": {
            "metadata": {},
            "name": "abc"
        },
        "component_location": null,
        "component_location_name": "ftrack.unmanaged",
        "component_overwrite": false,
        "component_path": "P:\\2023\\AyonTests\\assets\\props\\crate_a\\publish\\model\\modelMain\\v003\\atst_crate_a_modelMain_v003.abc",
        "thumbnail": false
    },
    {
        "additional_data": {},
        "asset_data": {
            "name": "modelMain"
        },
        "assettype_data": {
            "short": "geo"
        },
        "assetversion_data": {
            "comment": "",
            "status_name": null,
            "version": 3
        },
        "component_data": {
            "metadata": {},
            "name": "blend"
        },
        "component_location": null,
        "component_location_name": "ftrack.unmanaged",
        "component_overwrite": false,
        "component_path": "P:\\2023\\AyonTests\\assets\\props\\crate_a\\publish\\model\\modelMain\\v003\\atst_crate_a_modelMain_v003.blend",
        "thumbnail": false
    }
]
iLLiCiTiT commented 9 months ago

@jakubjezek001 at this moment you know how thumbnails are detected. I lost track when multi-thumbnails support was added with https://github.com/ynput/OpenPype/pull/5939 which I guess is also source of the issue.

jakubjezek001 commented 8 months ago

@jakubjezek001 at this moment you know how thumbnails are detected. I lost track when multi-thumbnails support was added with ynput/OpenPype#5939 which I guess is also source of the issue.

This seems to be unrelated since different plugin is dealing with Thumbnail from source. BTW since it had been so long, is this still an issue, or we can close it?

iLLiCiTiT commented 7 months ago

This seems to be unrelated since different plugin is dealing with Thumbnail from source

It is actually related. From that PR it is required to have at least one review representation otherwise nothing will get to ftrack. This loop is causing it https://github.com/ynput/ayon-ftrack/blob/develop/client/ayon_ftrack/plugins/publish/integrate_ftrack_instances.py#L247 . But I don't know why the loop is there and how it actually works.

So I guess it is still an issue.

iLLiCiTiT commented 5 months ago

Resolved with https://github.com/ynput/ayon-ftrack/pull/93