diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-16 20:22:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-16 20:22:26 +0400 |
commit | 8b339cdad2a63d5f409e794357c939d2e9297763 (patch) | |
tree | a987d0dda5659e2676b9072bc9eb9af1fd5907e1 /io_scene_x3d | |
parent | c8bbe3cc89d2838195418695331e4995f2d04ccf (diff) |
another small cleanup.
Diffstat (limited to 'io_scene_x3d')
-rw-r--r-- | io_scene_x3d/export_x3d.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index 111814e3..d599db75 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -640,18 +640,11 @@ class x3d_class: 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 - - namemat = tex.name - # namemat = alltextures[i].name - - pic = tex.image + if tex.type == 'IMAGE' and tex.image: + namemat = tex.name + pic = tex.image + basename = os.path.basename(bpy.path.abspath(pic.filepath)) - # 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 @@ class x3d_class: self.write_indented("rightUrl=\"%s\" " % basename) elif namemat == "top": self.write_indented("topUrl=\"%s\" " % basename) + self.write_indented("/>\n\n") ########################################################## |