Skip to content
Snippets Groups Projects
Commit 8b339cda authored by Campbell Barton's avatar Campbell Barton
Browse files

another small cleanup.

parent c8bbe3cc
No related branches found
No related tags found
No related merge requests found
......@@ -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")
##########################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment