From c000fae4a8131c846bb09f92cdd761ad180f47f0 Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Thu, 9 May 2024 16:00:41 +0200 Subject: [PATCH] Support empty export --- Fange Pipeline/operators/exports.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Fange Pipeline/operators/exports.py b/Fange Pipeline/operators/exports.py index 182cda6..889cd28 100644 --- a/Fange Pipeline/operators/exports.py +++ b/Fange Pipeline/operators/exports.py @@ -40,19 +40,16 @@ class ExportForFange(bpy.types.Operator): print(f'[Pipeline] Update "{coll.name}" mesh') child = bpy.data.collections.get(coll.name) - print(f'[Pipeline] Select all mesh inside the collection "{child.name}"') for ob in child.all_objects: print(f'\tLook "{ob.name}", his type are "{type(ob.data)}"') # TODO Support another type object, not only SM/SK - if isinstance(ob.data, bpy.types.Mesh): + if ob.type == 'MESH' or 'EMPTY': ob.select_set(True) abs_export = self.category.joinpath(self.asset, "Meshes") if not abs_export.exists(): abs_export.mkdir() - print(f'[Pipeline] Export fbx here "{abs_export.joinpath(f"SM_{coll.name}.fbx").as_posix()}"') - # TODO Use a preset system bpy.ops.export_scene.fbx(filepath=abs_export.joinpath(f"SM_{coll.name}.fbx").as_posix(), use_selection=True,