generated from stilobique/BlenderTemplate
Setup thumbnail param
Update export to find export path without the operator
This commit is contained in:
+23
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user