From a9564255da6e25da3e12a810978eafee3f479d1b Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Fri, 31 May 2024 17:46:07 +0200 Subject: [PATCH] WIP to convert curve to geometry --- Fange_Pipeline/operators/exports.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Fange_Pipeline/operators/exports.py b/Fange_Pipeline/operators/exports.py index 708e086..cb095fe 100644 --- a/Fange_Pipeline/operators/exports.py +++ b/Fange_Pipeline/operators/exports.py @@ -17,6 +17,7 @@ Requiert your blend file are write on your hard-drive.""" self.category = self.get_asset_type() self.instance_type_dict = {} + self.temp_copy = {} @classmethod def poll(cls, context): @@ -48,7 +49,7 @@ Requiert your blend file are write on your hard-drive.""" for ob in child.all_objects: print(f'\tLook "{ob.name}", his type are "{type(ob.data)}"') # 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)}') 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 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") if not abs_export.exists(): abs_export.mkdir(parents=True)