[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1938] trunk/py/scripts/addons/ io_scene_x3d/export_x3d.py: another small cleanup.
Campbell Barton
ideasman42 at gmail.com
Mon May 16 18:22:26 CEST 2011
Revision: 1938
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1938
Author: campbellbarton
Date: 2011-05-16 16:22:26 +0000 (Mon, 16 May 2011)
Log Message:
-----------
another small cleanup.
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-05-16 16:03:11 UTC (rev 1937)
+++ trunk/py/scripts/addons/io_scene_x3d/export_x3d.py 2011-05-16 16:22:26 UTC (rev 1938)
@@ -640,18 +640,11 @@
self.file.write("skyColor=\"%.3f %.3f %.3f\" " % sky_triple)
for tex in bpy.data.textures:
- if tex.type != 'IMAGE' or tex.image is None:
- continue
+ if tex.type == 'IMAGE' and tex.image:
+ namemat = tex.name
+ pic = tex.image
+ basename = os.path.basename(bpy.path.abspath(pic.filepath))
- namemat = tex.name
- # namemat = alltextures[i].name
-
- pic = tex.image
-
- # using .expandpath just in case, os.path may not expect //
- basename = os.path.basename(bpy.path.abspath(pic.filepath))
-
- if pic:
if namemat == "back":
self.file.write("\n\tbackUrl=\"%s\" " % basename)
elif namemat == "bottom":
@@ -664,6 +657,7 @@
self.write_indented("rightUrl=\"%s\" " % basename)
elif namemat == "top":
self.write_indented("topUrl=\"%s\" " % basename)
+
self.write_indented("/>\n\n")
##########################################################
More information about the Bf-extensions-cvs
mailing list