generated from stilobique/BlenderTemplate
Make model about path used
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import bpy
|
||||
|
||||
from .models import FangeProject
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@@ -10,7 +11,7 @@ class ExportForFange(bpy.types.Operator):
|
||||
|
||||
def __init__(self):
|
||||
self.coll_layout = bpy.data.collections.get('Placeholder')
|
||||
self.output = Path("W:\\", "Graou Studio", "Game Projects", "Fange Prototype", "Assets", "Graph", "Buildings")
|
||||
self.path = FangeProject()
|
||||
self.fbx_preset = 'sm-unity-building'
|
||||
|
||||
@classmethod
|
||||
@@ -32,11 +33,12 @@ class ExportForFange(bpy.types.Operator):
|
||||
print(f'[Pipeline] Select all mesh inside the collection "{child.name}"')
|
||||
for ob in child.all_objects:
|
||||
print(f'\tLook "{ob.name}", his type are "{type(ob.data)}"')
|
||||
if isinstance(ob.data, bpy.types.Mesh) or isinstance(ob.data, bpy.types.Empty):
|
||||
# TODO Support another type object, not only SM/SK
|
||||
if isinstance(ob.data, bpy.types.Mesh):
|
||||
ob.select_set(True)
|
||||
|
||||
# TODO The plugin export only the garden building
|
||||
abs_export = self.output.joinpath("Garden", "Meshes")
|
||||
abs_export = self.path.buildings.joinpath("Garden", "Meshes")
|
||||
if not abs_export.exists():
|
||||
abs_export.mkdir()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user