diff --git a/Fange_Pipeline/operators/exports.py b/Fange_Pipeline/operators/exports.py index 147fa17..90068bd 100644 --- a/Fange_Pipeline/operators/exports.py +++ b/Fange_Pipeline/operators/exports.py @@ -5,7 +5,8 @@ from pathlib import Path class ExportForFange(bpy.types.Operator): - """Export a building for fange""" + """Export a building for fange. +Requiert your blend file are write on your hard-drive.""" bl_idname = 'graou.building_export' bl_label = 'Easily export a building asset' @@ -37,7 +38,12 @@ class ExportForFange(bpy.types.Operator): self.report({'ERROR'}, 'Can\'t find the asset category.') return {'CANCELLED'} - if len(self.coll_layout.collection_children): + if not len(self.coll_layout.children): + self.report({'WARNING'}, 'No children collection, nothing can be exported.') + return {'CANCELLED'} + + if not len(self.coll_layout.collection_children): + for coll in self.coll_layout.children: print(f'[Pipeline] Update "{coll.name}" mesh') child = bpy.data.collections.get(coll.name)