From 090fdd9701988cb85dc8aa9309f67447acdf0594 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 8 Apr 2015 01:46:55 -0300 Subject: [PATCH] -Better Collada now keeps mesh names properly from blender, makes the "overwrite existing, keep materials" import mode work properly. --- io_scene_dae/export_dae.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/io_scene_dae/export_dae.py b/io_scene_dae/export_dae.py index 020ab6c..14db93c 100644 --- a/io_scene_dae/export_dae.py +++ b/io_scene_dae/export_dae.py @@ -482,6 +482,11 @@ class DaeExporter: apply_modifiers = len(node.modifiers) and self.config["use_mesh_modifiers"] + name_to_use = mesh.name + #print("name to use: "+mesh.name) + if (custom_name!=None and custom_name!=""): + name_to_use=custom_name + mesh=node.to_mesh(self.scene,apply_modifiers,"RENDER") #is this allright? triangulate=self.config["use_triangles"] @@ -635,10 +640,7 @@ class DaeExporter: meshid = self.new_id("mesh") - if (custom_name!=None): - self.writel(S_GEOM,1,'') - else: - self.writel(S_GEOM,1,'') + self.writel(S_GEOM,1,'') self.writel(S_GEOM,2,'')