From c53abb50f07c5e7e1df185425e034f744d2314a8 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 13 Sep 2023 22:06:11 +0800 Subject: [PATCH] fixing the issue of duplciated contents during switching assets --- openpype/hosts/max/plugins/load/load_camera_fbx.py | 2 +- openpype/hosts/max/plugins/load/load_model_fbx.py | 2 +- openpype/hosts/max/plugins/load/load_model_usd.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/max/plugins/load/load_camera_fbx.py b/openpype/hosts/max/plugins/load/load_camera_fbx.py index 5e4623fe4c..1f891e19b3 100644 --- a/openpype/hosts/max/plugins/load/load_camera_fbx.py +++ b/openpype/hosts/max/plugins/load/load_camera_fbx.py @@ -75,7 +75,7 @@ class FbxLoader(load.LoaderPlugin): path, rt.name("noPrompt"), using=rt.FBXIMP) current_fbx_objects = [sel for sel in rt.GetCurrentSelection() if sel != rt.Container - and sel.name == node_name] + and sel.name != node_name] update_custom_attribute_data(node, current_fbx_objects) for fbx_object in current_fbx_objects: diff --git a/openpype/hosts/max/plugins/load/load_model_fbx.py b/openpype/hosts/max/plugins/load/load_model_fbx.py index 9542eaa74e..cdc5667d78 100644 --- a/openpype/hosts/max/plugins/load/load_model_fbx.py +++ b/openpype/hosts/max/plugins/load/load_model_fbx.py @@ -58,7 +58,7 @@ class FbxModelLoader(load.LoaderPlugin): rt.Select(node_list) prev_fbx_objects = [sel for sel in rt.GetCurrentSelection() if sel != rt.Container - and sel.name == node_name] + and sel.name != node_name] transform_data = object_transform_set(prev_fbx_objects) for prev_fbx_obj in prev_fbx_objects: if rt.isValidNode(prev_fbx_obj): diff --git a/openpype/hosts/max/plugins/load/load_model_usd.py b/openpype/hosts/max/plugins/load/load_model_usd.py index cabcdaa6b5..38233cfd62 100644 --- a/openpype/hosts/max/plugins/load/load_model_usd.py +++ b/openpype/hosts/max/plugins/load/load_model_usd.py @@ -73,7 +73,7 @@ class ModelUSDLoader(load.LoaderPlugin): rt.Select(node_list) prev_objects = [sel for sel in rt.GetCurrentSelection() if sel != rt.Container - and sel.name == node_name] + and sel.name != node_name] transform_data = object_transform_set(prev_objects) for n in prev_objects: rt.Delete(n)