generated from stilobique/BlenderTemplate
Update socket config
This commit is contained in:
@@ -44,14 +44,20 @@ class ExportForFange(bpy.types.Operator):
|
|||||||
print(f'\tLook "{ob.name}", his type are "{type(ob.data)}"')
|
print(f'\tLook "{ob.name}", his type are "{type(ob.data)}"')
|
||||||
# TODO Support another type object, not only SM/SK
|
# TODO Support another type object, not only SM/SK
|
||||||
if ob.type == 'MESH' or 'EMPTY':
|
if ob.type == 'MESH' or 'EMPTY':
|
||||||
|
print(f'[Pipeline] Check ob {ob.name} and is type {type(ob)}')
|
||||||
ob.select_set(True)
|
ob.select_set(True)
|
||||||
|
|
||||||
abs_export = self.category.joinpath(self.asset, "Meshes")
|
abs_export = self.category.joinpath(self.asset, "Meshes")
|
||||||
if not abs_export.exists():
|
if not abs_export.exists():
|
||||||
abs_export.mkdir(parents=True)
|
abs_export.mkdir(parents=True)
|
||||||
|
|
||||||
# TODO Use a preset system
|
if coll.name != 'Socket':
|
||||||
bpy.ops.export_scene.fbx(filepath=abs_export.joinpath(f"SM_{coll.name}.fbx").as_posix(),
|
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_selection=True,
|
||||||
use_visible=False,
|
use_visible=False,
|
||||||
use_active_collection=False,
|
use_active_collection=False,
|
||||||
|
|||||||
Reference in New Issue
Block a user