Setup thumbnail param

Update export to find export path without the operator
This commit is contained in:
2024-06-07 10:49:41 +02:00
parent cfb7a8b514
commit 44b0781b94
4 changed files with 34 additions and 35 deletions
+23 -5
View File
@@ -1,5 +1,6 @@
import bpy
from .properties.models import FangeProject
from pathlib import Path
@@ -21,8 +22,25 @@ def get_export_preset():
print(f'[Pipeline] Preset folder not found')
def apply_mesh_and_join():
"""
This function make a new mesh with all selected asset.
"""
pass
def get_export_path():
"""Look the file path, to understand if the asset are a Character, Buildings or Props"""
abs_blend_path = Path(bpy.data.filepath)
game_path = FangeProject()
if 'Buildings' in abs_blend_path.parts:
return game_path.buildings
elif 'Props' in abs_blend_path.parts:
return game_path.props
elif 'Characters' in abs_blend_path.parts:
return game_path.characters
else:
return Path()
def get_asset_name() -> str:
"""From the .blend file, return the blend name."""
abs_blend_path = Path(bpy.data.filepath)
return abs_blend_path.stem