Update socket config

This commit is contained in:
2024-05-13 22:31:31 +02:00
parent 4f539912eb
commit 7418be4196
+8 -2
View File
@@ -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,