diff --git a/client/ayon_max/api/pipeline.py b/client/ayon_max/api/pipeline.py index 5f57ed0a79..9d56e0bf17 100644 --- a/client/ayon_max/api/pipeline.py +++ b/client/ayon_max/api/pipeline.py @@ -202,6 +202,7 @@ def containerise(name: str, nodes: list, context, "namespace": namespace or "", "loader": loader, "representation": context["representation"]["id"], + "project_name": context["project"]["name"] } container_name = f"{namespace}:{name}{suffix}" container = rt.container(name=container_name) diff --git a/client/ayon_max/hooks/force_startup_script.py b/client/ayon_max/hooks/force_startup_script.py index 1699ea300a..da3a34ce18 100644 --- a/client/ayon_max/hooks/force_startup_script.py +++ b/client/ayon_max/hooks/force_startup_script.py @@ -15,7 +15,6 @@ class ForceStartupScript(PreLaunchHook): Hook `GlobalHostDataHook` must be executed before this hook. """ app_groups = {"3dsmax", "adsk_3dsmax"} - order = 11 launch_types = {LaunchTypes.local} def execute(self): diff --git a/client/ayon_max/plugins/load/load_camera_fbx.py b/client/ayon_max/plugins/load/load_camera_fbx.py index 81ea15d52a..d6b55246ef 100644 --- a/client/ayon_max/plugins/load/load_camera_fbx.py +++ b/client/ayon_max/plugins/load/load_camera_fbx.py @@ -88,7 +88,8 @@ def update(self, container, context): update_custom_attribute_data(node, fbx_objects) lib.imprint(container["instance_node"], { - "representation": repre_entity["id"] + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context): diff --git a/client/ayon_max/plugins/load/load_max_scene.py b/client/ayon_max/plugins/load/load_max_scene.py index 7fca69b193..02432d23b0 100644 --- a/client/ayon_max/plugins/load/load_max_scene.py +++ b/client/ayon_max/plugins/load/load_max_scene.py @@ -166,7 +166,8 @@ def update(self, container, context): update_custom_attribute_data(node, max_objects) lib.imprint(container["instance_node"], { - "representation": repre_entity["id"] + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context): diff --git a/client/ayon_max/plugins/load/load_model.py b/client/ayon_max/plugins/load/load_model.py index 2a6bc45c18..94466174ab 100644 --- a/client/ayon_max/plugins/load/load_model.py +++ b/client/ayon_max/plugins/load/load_model.py @@ -74,7 +74,7 @@ def update(self, container, context): from pymxs import runtime as rt repre_entity = context["representation"] - path = get_representation_path(repre_entity) + path = os.path.normpath(self.filepath_from_context(context)) node = rt.GetNodeByName(container["instance_node"]) node_list = [n for n in get_previous_loaded_object(node) if rt.ClassOf(n) == rt.AlembicContainer] @@ -89,10 +89,11 @@ def update(self, container, context): rt.Select(abc_con.Children) for abc_obj in abc_con.Children: abc_obj.source = path - lib.imprint( - container["instance_node"], - {"representation": repre_entity["id"]}, - ) + + lib.imprint(container["instance_node"], { + "representation": repre_entity["id"], + "project_name": context["project"]["name"] + }) def switch(self, container, context): self.update(container, context) diff --git a/client/ayon_max/plugins/load/load_model_fbx.py b/client/ayon_max/plugins/load/load_model_fbx.py index 2775e1b453..cc33cd3d04 100644 --- a/client/ayon_max/plugins/load/load_model_fbx.py +++ b/client/ayon_max/plugins/load/load_model_fbx.py @@ -51,7 +51,7 @@ def update(self, container, context): from pymxs import runtime as rt repre_entity = context["representation"] - path = get_representation_path(repre_entity) + path = os.path.normpath(self.filepath_from_context(context)) node_name = container["instance_node"] node = rt.getNodeByName(node_name) if not node: @@ -85,8 +85,10 @@ def update(self, container, context): with maintained_selection(): rt.Select(node) update_custom_attribute_data(node, fbx_objects) + lib.imprint(container["instance_node"], { - "representation": repre_entity["id"] + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context): diff --git a/client/ayon_max/plugins/load/load_model_obj.py b/client/ayon_max/plugins/load/load_model_obj.py index d38aadb5bc..ac151a14c8 100644 --- a/client/ayon_max/plugins/load/load_model_obj.py +++ b/client/ayon_max/plugins/load/load_model_obj.py @@ -50,7 +50,7 @@ def update(self, container, context): from pymxs import runtime as rt repre_entity = context["representation"] - path = get_representation_path(repre_entity) + path = os.path.normpath(self.filepath_from_context(context)) node_name = container["instance_node"] node = rt.getNodeByName(node_name) namespace, _ = get_namespace(node_name) @@ -76,8 +76,9 @@ def update(self, container, context): with maintained_selection(): rt.Select(node) - lib.imprint(node_name, { - "representation": repre_entity["id"] + lib.imprint(container["instance_node"], { + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context): diff --git a/client/ayon_max/plugins/load/load_model_usd.py b/client/ayon_max/plugins/load/load_model_usd.py index f4dd41d5db..e4e41c71b6 100644 --- a/client/ayon_max/plugins/load/load_model_usd.py +++ b/client/ayon_max/plugins/load/load_model_usd.py @@ -107,8 +107,9 @@ def update(self, container, context): with maintained_selection(): rt.Select(node) - lib.imprint(node_name, { - "representation": repre_entity["id"] + lib.imprint(container["instance_node"], { + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context): diff --git a/client/ayon_max/plugins/load/load_pointcache.py b/client/ayon_max/plugins/load/load_pointcache.py index 87ea5c75bc..b2e2f842a9 100644 --- a/client/ayon_max/plugins/load/load_pointcache.py +++ b/client/ayon_max/plugins/load/load_pointcache.py @@ -98,10 +98,11 @@ def update(self, container, context): rt.Select(abc_con.Children) for abc_obj in abc_con.Children: abc_obj.source = path - lib.imprint( - container["instance_node"], - {"representation": repre_entity["id"]}, - ) + + lib.imprint(container["instance_node"], { + "representation": repre_entity["id"], + "project_name": context["project"]["name"] + }) def switch(self, container, context): self.update(container, context) diff --git a/client/ayon_max/plugins/load/load_pointcache_ornatrix.py b/client/ayon_max/plugins/load/load_pointcache_ornatrix.py index bc997951c1..71feffa6dd 100644 --- a/client/ayon_max/plugins/load/load_pointcache_ornatrix.py +++ b/client/ayon_max/plugins/load/load_pointcache_ornatrix.py @@ -97,10 +97,10 @@ def update(self, container, context): abc.pos = transform_data[ox_transform] or 0 abc.scale = transform_data[f"{abc}.scale"] or 0 update_custom_attribute_data(node, ox_abc_objects) - lib.imprint( - container["instance_node"], - {"representation": repre_entity["id"]}, - ) + lib.imprint(container["instance_node"], { + "representation": repre_entity["id"], + "project_name": context["project"]["name"] + }) def switch(self, container, context): self.update(container, context) diff --git a/client/ayon_max/plugins/load/load_pointcloud.py b/client/ayon_max/plugins/load/load_pointcloud.py index 0fb506d5bd..0525866091 100644 --- a/client/ayon_max/plugins/load/load_pointcloud.py +++ b/client/ayon_max/plugins/load/load_pointcloud.py @@ -55,8 +55,10 @@ def update(self, container, context): rt.Select(node_list) for prt in rt.Selection: prt.filename = path + lib.imprint(container["instance_node"], { - "representation": repre_entity["id"] + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context): diff --git a/client/ayon_max/plugins/load/load_redshift_proxy.py b/client/ayon_max/plugins/load/load_redshift_proxy.py index 3fd84b7538..4a3cbb182e 100644 --- a/client/ayon_max/plugins/load/load_redshift_proxy.py +++ b/client/ayon_max/plugins/load/load_redshift_proxy.py @@ -66,7 +66,8 @@ def update(self, container, context): proxy.file = path lib.imprint(container["instance_node"], { - "representation": repre_entity["id"] + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context): diff --git a/client/ayon_max/plugins/load/load_tycache.py b/client/ayon_max/plugins/load/load_tycache.py index 7fa2215273..0dbb813241 100644 --- a/client/ayon_max/plugins/load/load_tycache.py +++ b/client/ayon_max/plugins/load/load_tycache.py @@ -51,8 +51,10 @@ def update(self, container, context): with maintained_selection(): for tyc in node_list: tyc.filename = path + lib.imprint(container["instance_node"], { - "representation": repre_entity["id"] + "representation": repre_entity["id"], + "project_name": context["project"]["name"] }) def switch(self, container, context):