[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2000] trunk/py/scripts/addons/ io_scene_x3d/export_x3d.py: dont export duplicate image URL's
Campbell Barton
ideasman42 at gmail.com
Fri Jun 3 07:03:18 CEST 2011
Revision: 2000
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2000
Author: campbellbarton
Date: 2011-06-03 05:03:17 +0000 (Fri, 03 Jun 2011)
Log Message:
-----------
dont export duplicate image URL's
Modified Paths:
--------------
trunk/py/scripts/addons/io_scene_x3d/export_x3d.py
Modified: trunk/py/scripts/addons/io_scene_x3d/export_x3d.py
===================================================================
--- trunk/py/scripts/addons/io_scene_x3d/export_x3d.py 2011-06-03 01:43:04 UTC (rev 1999)
+++ trunk/py/scripts/addons/io_scene_x3d/export_x3d.py 2011-06-03 05:03:17 UTC (rev 2000)
@@ -973,8 +973,11 @@
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 @@
ident = writeFooter(ident)
export_main()
- file.close()
# -------------------------------------------------------------------------
# global cleanup
# -------------------------------------------------------------------------
+ file.close()
+
if use_h3d:
bpy.data.materials.remove(gpu_shader_dummy_mat)
More information about the Bf-extensions-cvs
mailing list