From dff8409df2bcb071db71b6e32fd7ecc63ca2fccf Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 1 Apr 2021 11:09:04 +0200 Subject: [PATCH] changed "pype" group to "openpype" --- pype/modules/ftrack/lib/avalon_sync.py | 7 ++++--- .../ftrack/plugins/publish/integrate_hierarchy_ftrack.py | 7 +++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pype/modules/ftrack/lib/avalon_sync.py b/pype/modules/ftrack/lib/avalon_sync.py index 43e02283c2..2bfa0125e8 100644 --- a/pype/modules/ftrack/lib/avalon_sync.py +++ b/pype/modules/ftrack/lib/avalon_sync.py @@ -37,7 +37,7 @@ EntitySchemas = { } # Group name of custom attributes -CUST_ATTR_GROUP = "pype" +CUST_ATTR_GROUP = "openpype" # name of Custom attribute that stores mongo_id from avalon db CUST_ATTR_ID_KEY = "avalon_mongo_id" @@ -102,11 +102,12 @@ def get_pype_attr(session, split_hierarchical=True, query_keys=None): "is_hierarchical", "default" ] - # TODO remove deprecated "avalon" group from query + # TODO remove deprecated "pype" group from query cust_attrs_query = ( "select {}" " from CustomAttributeConfiguration" - " where group.name in (\"avalon\", \"{}\")" + # Kept `pype` for Backwards Compatiblity + " where group.name in (\"pype\", \"{}\")" ).format(", ".join(query_keys), CUST_ATTR_GROUP) all_avalon_attr = session.query(cust_attrs_query).all() for cust_attr in all_avalon_attr: diff --git a/pype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py b/pype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py index b4a2760c93..68d0f9cf55 100644 --- a/pype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py +++ b/pype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py @@ -6,9 +6,11 @@ from avalon import io # Copy of constant `pype.modules.ftrack.lib.avalon_sync.CUST_ATTR_AUTO_SYNC` CUST_ATTR_AUTO_SYNC = "avalon_auto_sync" +CUST_ATTR_GROUP = "openpype" # Copy of `get_pype_attr` from pype.modules.ftrack.lib +# TODO import from openpype's ftrack module when possible to not break Python 2 def get_pype_attr(session, split_hierarchical=True): custom_attributes = [] hier_custom_attributes = [] @@ -16,8 +18,9 @@ def get_pype_attr(session, split_hierarchical=True): cust_attrs_query = ( "select id, entity_type, object_type_id, is_hierarchical, default" " from CustomAttributeConfiguration" - " where group.name in (\"avalon\", \"pype\")" - ) + # Kept `pype` for Backwards Compatiblity + " where group.name in (\"pype\", \"{}\")" + ).format(CUST_ATTR_GROUP) all_avalon_attr = session.query(cust_attrs_query).all() for cust_attr in all_avalon_attr: if split_hierarchical and cust_attr["is_hierarchical"]: