[Blender_Kitsu] Add Operators to cleanup Animation Files #38

Merged
Nick Alberelli merged 12 commits from feature/enforce_naming into main 2023-05-09 17:12:20 +02:00
Showing only changes of commit c35575170e - Show all commits

View File

@ -353,15 +353,18 @@ class KITSU_OT_anim_update_output_coll(bpy.types.Operator):
active_shot = cache.shot_active_get()
output_coll_name = opsdata.get_output_coll_name(active_shot)
output_coll = bpy.data.collections[output_coll_name]
asset_colls = opsdata.find_asset_collections_in_scene(context.scene)
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)
bpy.context.view_layer.update()
asset_colls = opsdata.find_asset_collections_in_scene(context.scene)
missing: List[bpy.types.Collection] = []
output_coll_childs = list(opsdata.traverse_collection_tree(output_coll))
# Check if all found asset colls are in output coll.
for coll in asset_colls:
if coll in output_coll_childs: