Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Ftrack: Hierarchical attributes are queried properly #2682

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Feb 9, 2022

Brief description

It was discovered that ContextCustomAttributeValue does return default value of custom attribute if entity does not have set value explicitly which is an issue for querying of hierarchical attribute values.

Changes

  • 'query_custom_attributes' has ability to return only explicitly set values or all values with defaults
    • added new argument only_set_values to define if CustomAttributeValue or ContextCustomAttributeValue table is used to get values
  • almost all places that query custom attributes are using 'query_custom_attributes'

Testing notes:

Prereq

  • Create new project with some structure
  • Find one hierarchical custom attribute (e.g. fps) and set default value to something

Sync to avalon - action

  1. Set different then defaut value on project
  2. Run sync to avalon
  3. Check attribute values on assets (e.g. in project manager) they should be same as project value

Sync to avalon - event

  1. Run event server
  2. Turn on auto sync on the project
  3. Change fps on project
  4. Check if the value is propagated in avalon and on all assets that should inherit the value

Push hierarchical values

  • this pushes changes from hierarchical custom attribute to non-hierarchical (and back for event)
  1. Find/Create custom attribute that has both hierarchical and non-hierarchical version (e.g. frameStart on Shot)
  2. Run ftrack event server
  3. Change value on one of them
  4. The value should be change on the other too
  • same way it works for action but the value is propagated only from hierarchical to non-hierarchical

@mkolar
Copy link
Member

mkolar commented Feb 9, 2022

Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

attributes are correctly propagated to child entities

image

@iLLiCiTiT iLLiCiTiT merged commit 94754e0 into develop Feb 9, 2022
@iLLiCiTiT iLLiCiTiT deleted the bugfix/OP-2610_Ftrack-hiearchical-attributes-sync-uses-default-values branch February 9, 2022 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants