From 3c6bcfb67b9558128dd25d7280a959f772f71d05 Mon Sep 17 00:00:00 2001 From: Nick Alberelli Date: Mon, 8 May 2023 13:02:19 -0400 Subject: [PATCH] [Blender_Kistsu] Improve 'Update Output Collection' - Remove all collections from output col at beginning of operator - This ensures any legacy collection that was previously added to output collection is cleared out --- scripts-blender/addons/blender_kitsu/anim/ops.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts-blender/addons/blender_kitsu/anim/ops.py b/scripts-blender/addons/blender_kitsu/anim/ops.py index 2e7b6ddd..d1690e06 100644 --- a/scripts-blender/addons/blender_kitsu/anim/ops.py +++ b/scripts-blender/addons/blender_kitsu/anim/ops.py @@ -261,6 +261,10 @@ class KITSU_OT_anim_update_output_coll(bpy.types.Operator): missing: List[bpy.types.Collection] = [] output_coll_childs = list(opsdata.traverse_collection_tree(output_coll)) + # Clear Out Output Collection before Starting + for collection in output_coll.children: + output_coll.children.unlink(collection) + # Check if all found asset colls are in output coll. for coll in asset_colls: if coll in output_coll_childs: -- 2.30.2