[Blender_Kitsu] Add Operators to cleanup Animation Files #38
@ -353,15 +353,18 @@ class KITSU_OT_anim_update_output_coll(bpy.types.Operator):
|
|||||||
active_shot = cache.shot_active_get()
|
active_shot = cache.shot_active_get()
|
||||||
output_coll_name = opsdata.get_output_coll_name(active_shot)
|
output_coll_name = opsdata.get_output_coll_name(active_shot)
|
||||||
output_coll = bpy.data.collections[output_coll_name]
|
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
|
# Clear Out Output Collection before Starting
|
||||||
for collection in output_coll.children:
|
for collection in output_coll.children:
|
||||||
output_coll.children.unlink(collection)
|
output_coll.children.unlink(collection)
|
||||||
bpy.context.view_layer.update()
|
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.
|
# Check if all found asset colls are in output coll.
|
||||||
for coll in asset_colls:
|
for coll in asset_colls:
|
||||||
if coll in output_coll_childs:
|
if coll in output_coll_childs:
|
||||||
|
Loading…
Reference in New Issue
Block a user