fixing the issue of duplciated contents during switching assets

This commit is contained in:
Kayla Man 2023-09-13 22:06:11 +08:00
parent 70bab9fdb8
commit c53abb50f0
3 changed files with 3 additions and 3 deletions

View file

@ -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:

View file

@ -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):

View file

@ -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)