summaryrefslogtreecommitdiff
path: root/tools/export/blender25
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-04-08 01:46:55 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-04-08 01:46:55 -0300
commite18c6ef63bb57290b023fde01391f8bdcdfe5aed (patch)
tree66ce5152cc84c6b503c86cea2ddc7b4323bc8021 /tools/export/blender25
parentb016f3898b9b54a744b022c12d80ba9905477e86 (diff)
-Better Collada now keeps mesh names properly from blender, makes the "overwrite existing, keep materials" import mode work properly.
Diffstat (limited to 'tools/export/blender25')
-rw-r--r--tools/export/blender25/io_scene_dae/export_dae.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py
index 020ab6ca08..14db93c874 100644
--- a/tools/export/blender25/io_scene_dae/export_dae.py
+++ b/tools/export/blender25/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,'<geometry id="'+meshid+'" name="'+custom_name+'">')
- else:
- self.writel(S_GEOM,1,'<geometry id="'+meshid+'" name="'+mesh.name+'">')
+ self.writel(S_GEOM,1,'<geometry id="'+meshid+'" name="'+name_to_use+'">')
self.writel(S_GEOM,2,'<mesh>')