Skip to content

fix: only copy attributes if they exist#249

Merged
jakubjezek001 merged 1 commit into
ynput:developfrom
straylondon:load_products_without_fps
May 5, 2026
Merged

fix: only copy attributes if they exist#249
jakubjezek001 merged 1 commit into
ynput:developfrom
straylondon:load_products_without_fps

Conversation

@vincentullmann
Copy link
Copy Markdown
Contributor

Changelog Description

Only copy fps and source if they exists on version_attributes

Additional review information

Its not uncommon for us to ingest nukenodes via the traypublisher (eg.: as part of deliveries from third party vendors)
Those products do not have an fps attribute and don't really need one either.

During load error happened on Product: "nukenodesLensDistortion" Representation: "nk" Version: 1

Error message: 'fps'

Traceback (most recent call last):
  File "/home/v/dev/ayon-core/client/ayon_core/tools/loader/models/actions.py", line 1005, in _load_representations_by_loader
    load_with_repre_context(
  File "/home/v/dev/ayon-core/client/ayon_core/pipeline/load/utils.py", line 327, in load_with_repre_context
    return loader.load(repre_context, name, namespace, options)
  File "/home/v/dev/ayon-core/client/ayon_core/pipeline/load/plugins.py", line 430, in wrapped_method
    result = original_method(self, *args, **kwargs)
  File "/home/v/dev/ayon-nuke/client/ayon_nuke/plugins/load/load_backdrop.py", line 70, in load
    data_imprint[k] = version_attributes[k]
KeyError: 'fps'

Testing notes:

  1. in nuke: create a node and export it into a file (nuke.nodeCopy("/mnt/d/work/nodes.nk")
  2. configure trayPublisher to publish a nukenodes product type
  3. publish the nodes.nk from trayPublisher
  4. load them back into nuke via AYON

example tray publisher config:

{
  "simple_creators": [
    {
      "icon": "",
      "label": "Lens Distortion Node",
      "extensions": [
        ".nk"
      ],
      "identifier": "",
      "description": "Ingest Nuke Lens Distortion Nodes from Tracking Outsource",
      "allow_sequences": false,
      "default_variants": [
        "LensDistortion"
      ],
      "product_base_type": "nukenodes",
      "product_type_items": [],
      "allow_multiple_items": false,
      "detailed_description": "",
      "allow_version_control": true
    }
  ]
}

Copy link
Copy Markdown
Member

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Seems like a decent fix. At the same time, I personally don't see why we'd want to imprint this data to begin with. I feel like we're better off at some point removing these from being imprinted at all. @jakubjezek001 thoughts?

@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Apr 28, 2026
@BigRoy BigRoy requested a review from jakubjezek001 April 28, 2026 10:59
@jakubjezek001 jakubjezek001 merged commit cb0b2be into ynput:develop May 5, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants