Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-03 09:03:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-03 09:03:17 +0400
commit3aa3623920641eadec02f7a514694cf406b92e11 (patch)
tree07fdbe2a7ca2791660781c5651b6160ff8890c25 /io_scene_x3d
parent441323973644509b857b865a8ed509eb3bf90633 (diff)
dont export duplicate image URL's
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/export_x3d.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index 71df0e3d..f2cbc9f4 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -973,8 +973,11 @@ def export(file,
images.append(os.path.basename(filepath_full))
images.append(filepath_full)
+
+ images = [f.replace('\\', '/') for f in images]
+ images = [f for i, f in enumerate(images) if f not in images[:i]]
- fw(ident_step + "url='%s' " % ' '.join(['"%s"' % f.replace('\\', '/') for f in images]))
+ fw(ident_step + "url='%s' " % ' '.join(['"%s"' % f for f in images]))
fw(ident_step + '/>\n')
def writeBackground(ident, world):
@@ -1122,11 +1125,12 @@ def export(file,
ident = writeFooter(ident)
export_main()
- file.close()
# -------------------------------------------------------------------------
# global cleanup
# -------------------------------------------------------------------------
+ file.close()
+
if use_h3d:
bpy.data.materials.remove(gpu_shader_dummy_mat)