Skip to content

Instantly share code, notes, and snippets.

@BigRoy
Last active October 5, 2023 15:29
Show Gist options
  • Save BigRoy/02c3407c904d1b7c43f7b31c6b9f62ac to your computer and use it in GitHub Desktop.
Save BigRoy/02c3407c904d1b7c43f7b31c6b9f62ac to your computer and use it in GitHub Desktop.
OpenPype JSON Publish Data
{
"asset": "ASSET_NAME",
"comment": "",
"deadline_publish_job_id": "651ea743d5ea807051ce62e1",
"fps": 25.0,
"frameEnd": 1250,
"frameStart": 1001,
"instances": [
{
"asset": "ASSET_NAME",
"colorspace": null,
"comment": "",
"deadlineUrl": "http://DEADLINE_HOST_URL:8082",
"extendFrames": false,
"families": [
"render",
"review"
],
"family": "render",
"fps": 25.0,
"frameEnd": 1250,
"frameEndHandle": 1250,
"frameStart": 1001,
"frameStartHandle": 1001,
"handleEnd": 0,
"handleStart": 0,
"inputVersions": [
"650d6e28ef016aad9d49904c",
"650d6e26ef016aad9d499043",
"650d6e26ef016aad9d499046",
"650d6e27ef016aad9d499049",
"650d6e28ef016aad9d499051",
"650d6e29ef016aad9d499054",
"650d6e29ef016aad9d499057",
"621e4e01c71f4cd97d999893"
],
"jobBatchName": "",
"multipartExr": false,
"overrideExistingFrame": false,
"pixelAspect": 1.0,
"representations": [
{
"colorspaceData": {
"colorspace": "ACEScg",
"config": {
"path": "C:/Program Files/Autodesk/Maya2024/resources/OCIO-configs/Maya2022-default/config.ocio",
"template": "C:/Program Files/Autodesk/Maya2024/resources/OCIO-configs/Maya2022-default/config.ocio"
},
"display": "sRGB",
"view": "ACES 1.0 SDR-video"
},
"ext": "exr",
"files": [
"shadow.1001.exr",
"shadow.1002.exr",
"shadow.1003.exr",
"shadow.1004.exr",
"shadow.1005.exr",
"shadow.1006.exr",
"shadow.1007.exr",
"shadow.1008.exr",
"shadow.1009.exr",
"shadow.1010.exr",
],
"fps": 25.0,
"frameEnd": 1010,
"frameStart": 1001,
"name": "exr",
"stagingDir": "{root[work]}/PROJECT_NAME/ASSET_NAME/work/lighting/maya/renders/shadow",
"tags": []
}
],
"resolutionHeight": 1920,
"resolutionWidth": 1920,
"source": "{root[work]}/PROJECT_NAME/ASSET_NAME/work/lighting/maya/scenes/FILENAME.ma",
"stagingDir_persistent": false,
"subset": "renderLightingShadow_",
"subsetGroup": "renderLightingShadow",
"useSequenceForReview": true,
"version": 28
}
],
"intent": null,
"job": {}
"session": {
"AVALON_APP": "maya",
"AVALON_ASSET_NAME": "ASSET_NAME",
"AVALON_DB": "avalon",
"AVALON_LABEL": "OpenPype",
"AVALON_PROJECT": "PROJECT_NAME",
"AVALON_PROJECTS": "",
"AVALON_SCENEDIR": "scenes",
"AVALON_TASK": "lighting",
"AVALON_TIMEOUT": "1000",
"AVALON_WORKDIR": "P:\\Projects\\PROJECT_NAME\\ASSET_NAME\\work\\lighting\\maya",
"schema": "openpype:session-3.0"
},
"source": "{root[work]}/PROJECT_NAME/ASSET_NAME/work/lighting/maya/scenes/FILENAME.ma",
"user": "USER_WHO_ORIGINALLY_CREATED_THE_RENDER_OR_YOU_WANT_LISTED_ON_THE_PUBLISHED_FILE",
"version": 28
}
{
    // The top level of the JSON file is the context data for the publish
    // Required top level keys listed here: https://github.com/ynput/OpenPype/blob/75e265198bda58d78b1b21c0f9be2713a67b74f2/openpype/plugins/publish/collect_rendered_files.py#L61-L62
    "asset": "ASSET_NAME",
    "comment": "",
    "deadline_publish_job_id": "651ea743d5ea807051ce62e1",
    "fps": 25.0,
    "frameEnd": 1250,
    "frameStart": 1001,
    "instances": [
        {
            "asset": "ASSET_NAME",
            "colorspace": null,
            "comment": "",
            "deadlineUrl": "http://DEADLINE_HOST_URL:8082",
            "extendFrames": false,
            "families": [
                "render",
                "review"
            ],
            "family": "render",
            "fps": 25.0,
            "frameEnd": 1250,
            "frameEndHandle": 1250,
            "frameStart": 1001,
            "frameStartHandle": 1001,
            "handleEnd": 0,
            "handleStart": 0,
            "inputVersions": [
                "650d6e28ef016aad9d49904c",
                "650d6e26ef016aad9d499043",
                "650d6e26ef016aad9d499046",
                "650d6e27ef016aad9d499049",
                "650d6e28ef016aad9d499051",
                "650d6e29ef016aad9d499054",
                "650d6e29ef016aad9d499057",
                "621e4e01c71f4cd97d999893"
            ],
            "jobBatchName": "",
            "multipartExr": false,
            "overrideExistingFrame": false,
            "pixelAspect": 1.0,
            "representations": [
                {
                    "colorspaceData": {
                        "colorspace": "ACEScg",
                        "config": {
                            "path": "C:/Program Files/Autodesk/Maya2024/resources/OCIO-configs/Maya2022-default/config.ocio",
                            "template": "C:/Program Files/Autodesk/Maya2024/resources/OCIO-configs/Maya2022-default/config.ocio"
                        },
                        "display": "sRGB",
                        "view": "ACES 1.0 SDR-video"
                    },
                    "ext": "exr",
                    "files": [
                        "shadow.1001.exr",
                        "shadow.1002.exr",
                        "shadow.1003.exr",
                        "shadow.1004.exr",
                        "shadow.1005.exr",
                        "shadow.1006.exr",
                        "shadow.1007.exr",
                        "shadow.1008.exr",
                        "shadow.1009.exr",
                        "shadow.1010.exr",
                    ],
                    "fps": 25.0,
                    "frameEnd": 1010,
                    "frameStart": 1001,
                    "name": "exr",
                    "stagingDir": "{root[work]}/PROJECT_NAME/ASSET_NAME/work/lighting/maya/renders/shadow",
                    "tags": []
                }
            ],
            "resolutionHeight": 1920,
            "resolutionWidth": 1920,
            "source": "{root[work]}/PROJECT_NAME/ASSET_NAME/work/lighting/maya/scenes/FILENAME.ma",
            "stagingDir_persistent": false,
            "subset": "renderLightingShadow_",
            "subsetGroup": "renderLightingShadow",
            "useSequenceForReview": true,
            "version": 28
        }
    ],
    "intent": null,
    "job": {}  
    "session": {
        "AVALON_APP": "maya",
        "AVALON_ASSET_NAME": "ASSET_NAME",
        "AVALON_DB": "avalon",
        "AVALON_LABEL": "OpenPype",
        "AVALON_PROJECT": "PROJECT_NAME",
        "AVALON_PROJECTS": "",
        "AVALON_SCENEDIR": "scenes",
        "AVALON_TASK": "lighting",
        "AVALON_TIMEOUT": "1000",
        "AVALON_WORKDIR": "P:\\Projects\\PROJECT_NAME\\ASSET_NAME\\work\\lighting\\maya",
        "schema": "openpype:session-3.0"
    },
    // source: What should be listed as the source 'workfile' for the published data
    "source": "{root[work]}/PROJECT_NAME/ASSET_NAME/work/lighting/maya/scenes/FILENAME.ma",
    // user: This should be the user name you want to be listed on the published version
    // Usually this is the one who generated the source files (e.g. the render scene and submitted it)
    // But if you're batch generating the JSON for other ingesting it's likely the current user
    // TODO: This might be optional - if not provided it might just use the current user on publish
    "user": "USER_NAME",
    // This defines the destination version it should publish into
    "version": 28
}
@BigRoy
Copy link
Author

BigRoy commented Oct 5, 2023

As mentioned on Ynput #general discord here:

Usually these get generated by ProcessSubmittedJobOnFarm

This is the most used entry point currently that generates the JSON files, the global plugin ProcessSubmittedJobOnFarm in submit_publish_job.py.

Note

Specifically note the skeleton data it generates.


The publishing picks the JSON file up in CollectRenderedFiles

Which in the publishing will get picked up by Collect Rendered Files


The openpype publish cli

Note the targets on that CollectRenderedFiles plugin, you might need to specify the the correct publish target to trigger it.

the openpype publish command seems to default to farm already.

Note

The openpype publish CLI runs this pype publish command.

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