From 7418be41962e5c65d5c74aece08a3cd0dbfaf18d Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Mon, 13 May 2024 22:31:31 +0200 Subject: [PATCH] Update socket config --- Fange Pipeline/operators/exports.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Fange Pipeline/operators/exports.py b/Fange Pipeline/operators/exports.py index 39d05dd..74e84f4 100644 --- a/Fange Pipeline/operators/exports.py +++ b/Fange Pipeline/operators/exports.py @@ -44,14 +44,20 @@ class ExportForFange(bpy.types.Operator): print(f'\tLook "{ob.name}", his type are "{type(ob.data)}"') # TODO Support another type object, not only SM/SK if ob.type == 'MESH' or 'EMPTY': + print(f'[Pipeline] Check ob {ob.name} and is type {type(ob)}') ob.select_set(True) abs_export = self.category.joinpath(self.asset, "Meshes") if not abs_export.exists(): abs_export.mkdir(parents=True) - # TODO Use a preset system - bpy.ops.export_scene.fbx(filepath=abs_export.joinpath(f"SM_{coll.name}.fbx").as_posix(), + if coll.name != 'Socket': + asset_name = f"SM_{coll.name}.fbx" + else: + asset_name = f"{coll.name}.fbx" + + # TODO Use the preset system + bpy.ops.export_scene.fbx(filepath=abs_export.joinpath(asset_name).as_posix(), use_selection=True, use_visible=False, use_active_collection=False,