WIP to convert curve to geometry

This commit is contained in:
2024-05-31 17:46:07 +02:00
parent 0821574902
commit a9564255da
+6 -1
View File
@@ -17,6 +17,7 @@ Requiert your blend file are write on your hard-drive."""
self.category = self.get_asset_type() self.category = self.get_asset_type()
self.instance_type_dict = {} self.instance_type_dict = {}
self.temp_copy = {}
@classmethod @classmethod
def poll(cls, context): def poll(cls, context):
@@ -48,7 +49,7 @@ Requiert your blend file are write on your hard-drive."""
for ob in child.all_objects: for ob in child.all_objects:
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' or 'CURVE':
print(f'[Pipeline] Check ob {ob.name} and is type {type(ob)}') print(f'[Pipeline] Check ob {ob.name} and is type {type(ob)}')
ob.select_set(True) ob.select_set(True)
@@ -57,6 +58,10 @@ Requiert your blend file are write on your hard-drive."""
self.instance_type_dict[ob.name] = ob.instance_type self.instance_type_dict[ob.name] = ob.instance_type
ob.instance_type = 'NONE' ob.instance_type = 'NONE'
if ob.type == 'CURVE':
# Make a new objet with the Geo
bpy.ops.object.convert(target='CURVE')
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)