Blender Kitsu: Add option to Exclude Collections from Output Collection #120
@ -460,6 +460,7 @@ class KITSU_OT_anim_update_output_coll(bpy.types.Operator):
|
||||
if coll_comp in coll_childs:
|
||||
childs.append(coll_comp)
|
||||
|
||||
# TODO check why this only returns some collections after running operator once
|
||||
return [coll for coll in missing if coll not in childs]
|
||||
|
||||
def draw(self, context):
|
||||
@ -477,6 +478,10 @@ class KITSU_OT_anim_update_output_coll(bpy.types.Operator):
|
||||
self.output_coll.children.unlink(collection)
|
||||
bpy.context.view_layer.update()
|
||||
parents = self.get_collections(context)
|
||||
if self.exclude_collections:
|
||||
parents = [
|
||||
col for col in parents if not col.blender_kitsu_exclusions.exclude
|
||||
]
|
||||
for coll in parents:
|
||||
self.output_coll.children.link(coll)
|
||||
logger.info("%s linked in %s", coll.name, self.output_coll.name)
|
||||
|
Loading…
Reference in New Issue
Block a user