diff --git a/client/ayon_core/hosts/max/api/pipeline.py b/client/ayon_core/hosts/max/api/pipeline.py index 1486f7218d..6fd0a501ff 100644 --- a/client/ayon_core/hosts/max/api/pipeline.py +++ b/client/ayon_core/hosts/max/api/pipeline.py @@ -169,7 +169,7 @@ def containerise(name: str, nodes: list, context, "name": name, "namespace": namespace or "", "loader": loader, - "representation": context["representation"]["_id"], + "representation": context["representation"]["id"], } container_name = f"{namespace}:{name}{suffix}" container = rt.container(name=container_name) diff --git a/client/ayon_core/hosts/max/plugins/load/load_camera_fbx.py b/client/ayon_core/hosts/max/plugins/load/load_camera_fbx.py index d56445c695..664904eb4e 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_camera_fbx.py +++ b/client/ayon_core/hosts/max/plugins/load/load_camera_fbx.py @@ -54,8 +54,8 @@ class FbxLoader(load.LoaderPlugin): def update(self, container, context): from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node_name = container["instance_node"] node = rt.getNodeByName(node_name) namespace, _ = get_namespace(node_name) @@ -88,7 +88,7 @@ class FbxLoader(load.LoaderPlugin): update_custom_attribute_data(node, fbx_objects) lib.imprint(container["instance_node"], { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_max_scene.py b/client/ayon_core/hosts/max/plugins/load/load_max_scene.py index 39bb3b568d..f68e934d54 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_max_scene.py +++ b/client/ayon_core/hosts/max/plugins/load/load_max_scene.py @@ -51,8 +51,8 @@ class MaxSceneLoader(load.LoaderPlugin): def update(self, container, context): from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node_name = container["instance_node"] node = rt.getNodeByName(node_name) namespace, _ = get_namespace(node_name) @@ -87,7 +87,7 @@ class MaxSceneLoader(load.LoaderPlugin): update_custom_attribute_data(node, max_objects) lib.imprint(container["instance_node"], { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_model.py b/client/ayon_core/hosts/max/plugins/load/load_model.py index e0241bdb73..0c39c1ba0d 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_model.py +++ b/client/ayon_core/hosts/max/plugins/load/load_model.py @@ -73,8 +73,8 @@ class ModelAbcLoader(load.LoaderPlugin): def update(self, container, context): from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node = rt.GetNodeByName(container["instance_node"]) node_list = [n for n in get_previous_loaded_object(node) if rt.ClassOf(n) == rt.AlembicContainer] @@ -91,7 +91,7 @@ class ModelAbcLoader(load.LoaderPlugin): abc_obj.source = path lib.imprint( container["instance_node"], - {"representation": str(repre_doc["_id"])}, + {"representation": repre_entity["id"]}, ) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_model_fbx.py b/client/ayon_core/hosts/max/plugins/load/load_model_fbx.py index 03ba901b32..7f5f1255ec 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_model_fbx.py +++ b/client/ayon_core/hosts/max/plugins/load/load_model_fbx.py @@ -50,8 +50,8 @@ class FbxModelLoader(load.LoaderPlugin): def update(self, container, context): from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node_name = container["instance_node"] node = rt.getNodeByName(node_name) if not node: @@ -86,7 +86,7 @@ class FbxModelLoader(load.LoaderPlugin): rt.Select(node) update_custom_attribute_data(node, fbx_objects) lib.imprint(container["instance_node"], { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_model_obj.py b/client/ayon_core/hosts/max/plugins/load/load_model_obj.py index a6c3d2a2fe..4b8d260921 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_model_obj.py +++ b/client/ayon_core/hosts/max/plugins/load/load_model_obj.py @@ -50,8 +50,8 @@ class ObjLoader(load.LoaderPlugin): def update(self, container, context): from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node_name = container["instance_node"] node = rt.getNodeByName(node_name) namespace, _ = get_namespace(node_name) @@ -78,7 +78,7 @@ class ObjLoader(load.LoaderPlugin): rt.Select(node) lib.imprint(node_name, { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_model_usd.py b/client/ayon_core/hosts/max/plugins/load/load_model_usd.py index 6673a2e48b..6bcff2b6a5 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_model_usd.py +++ b/client/ayon_core/hosts/max/plugins/load/load_model_usd.py @@ -66,8 +66,8 @@ class ModelUSDLoader(load.LoaderPlugin): namespace, loader=self.__class__.__name__) def update(self, container, context): - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node_name = container["instance_node"] node = rt.GetNodeByName(node_name) namespace, name = get_namespace(node_name) @@ -108,7 +108,7 @@ class ModelUSDLoader(load.LoaderPlugin): rt.Select(node) lib.imprint(node_name, { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_pointcache.py b/client/ayon_core/hosts/max/plugins/load/load_pointcache.py index 6f79caea42..613d240447 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_pointcache.py +++ b/client/ayon_core/hosts/max/plugins/load/load_pointcache.py @@ -79,8 +79,8 @@ class AbcLoader(load.LoaderPlugin): def update(self, container, context): from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node = rt.GetNodeByName(container["instance_node"]) abc_container = [n for n in get_previous_loaded_object(node) if rt.ClassOf(n) == rt.AlembicContainer] @@ -97,7 +97,7 @@ class AbcLoader(load.LoaderPlugin): abc_obj.source = path lib.imprint( container["instance_node"], - {"representation": str(repre_doc["_id"])}, + {"representation": repre_entity["id"]}, ) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_pointcache_ornatrix.py b/client/ayon_core/hosts/max/plugins/load/load_pointcache_ornatrix.py index 67d1374266..7cf7d162c1 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_pointcache_ornatrix.py +++ b/client/ayon_core/hosts/max/plugins/load/load_pointcache_ornatrix.py @@ -63,8 +63,8 @@ class OxAbcLoader(load.LoaderPlugin): ) def update(self, container, context): - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node_name = container["instance_node"] namespace, name = get_namespace(node_name) node = rt.getNodeByName(node_name) @@ -99,7 +99,7 @@ class OxAbcLoader(load.LoaderPlugin): update_custom_attribute_data(node, ox_abc_objects) lib.imprint( container["instance_node"], - {"representation": str(repre_doc["_id"])}, + {"representation": repre_entity["id"]}, ) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_pointcloud.py b/client/ayon_core/hosts/max/plugins/load/load_pointcloud.py index 894648ff23..6b9e5d6fb1 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_pointcloud.py +++ b/client/ayon_core/hosts/max/plugins/load/load_pointcloud.py @@ -45,8 +45,8 @@ class PointCloudLoader(load.LoaderPlugin): """update the container""" from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node = rt.GetNodeByName(container["instance_node"]) node_list = get_previous_loaded_object(node) update_custom_attribute_data( @@ -56,7 +56,7 @@ class PointCloudLoader(load.LoaderPlugin): for prt in rt.Selection: prt.filename = path lib.imprint(container["instance_node"], { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_redshift_proxy.py b/client/ayon_core/hosts/max/plugins/load/load_redshift_proxy.py index 7395a6eca5..40c7701797 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_redshift_proxy.py +++ b/client/ayon_core/hosts/max/plugins/load/load_redshift_proxy.py @@ -55,8 +55,8 @@ class RedshiftProxyLoader(load.LoaderPlugin): def update(self, container, context): from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node = rt.getNodeByName(container["instance_node"]) node_list = get_previous_loaded_object(node) rt.Select(node_list) @@ -66,7 +66,7 @@ class RedshiftProxyLoader(load.LoaderPlugin): proxy.file = path lib.imprint(container["instance_node"], { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context): diff --git a/client/ayon_core/hosts/max/plugins/load/load_tycache.py b/client/ayon_core/hosts/max/plugins/load/load_tycache.py index 5acc759b4a..24cb762b2d 100644 --- a/client/ayon_core/hosts/max/plugins/load/load_tycache.py +++ b/client/ayon_core/hosts/max/plugins/load/load_tycache.py @@ -43,8 +43,8 @@ class TyCacheLoader(load.LoaderPlugin): """update the container""" from pymxs import runtime as rt - repre_doc = context["representation"] - path = get_representation_path(repre_doc) + repre_entity = context["representation"] + path = get_representation_path(repre_entity) node = rt.GetNodeByName(container["instance_node"]) node_list = get_previous_loaded_object(node) update_custom_attribute_data(node, node_list) @@ -52,7 +52,7 @@ class TyCacheLoader(load.LoaderPlugin): for tyc in node_list: tyc.filename = path lib.imprint(container["instance_node"], { - "representation": str(repre_doc["_id"]) + "representation": repre_entity["id"] }) def switch(self, container, context):