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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Want <cwant@ualberta.ca>2008-10-06 21:11:10 +0400
committerChris Want <cwant@ualberta.ca>2008-10-06 21:11:10 +0400
commitde6a9d0194abacb1bd2de5283e72440b4916325c (patch)
tree01f5c6345c2e57fb6a68e34b7700275e0e318291
parentd5f647a2211f10b872979963226c66780c1efa92 (diff)
Use xrange() rather than range() for loop iterations.
-rw-r--r--release/scripts/vrml97_export.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/release/scripts/vrml97_export.py b/release/scripts/vrml97_export.py
index 6ec05495327..db21cabe14f 100644
--- a/release/scripts/vrml97_export.py
+++ b/release/scripts/vrml97_export.py
@@ -206,7 +206,7 @@ class VRML2Export:
if scene != inlines[0]:
return
else:
- for i in range(allinlines):
+ for i in xrange(allinlines):
nameinline=inlines[i].getName()
if (nameinline not in self.namesStandard) and (i > 0):
self.writeIndented("DEF %s Inline {\n" % \
@@ -219,7 +219,7 @@ class VRML2Export:
def writeScript(self):
textEditor = Blender.Text.Get()
alltext = len(textEditor)
- for i in range(alltext):
+ for i in xrange(alltext):
nametext = textEditor[i].getName()
nlines = textEditor[i].getNLines()
if (self.proto == 1):
@@ -227,14 +227,14 @@ class VRML2Export:
nametext == "proto.txt") and (nlines != None):
nalllines = len(textEditor[i].asLines())
alllines = textEditor[i].asLines()
- for j in range(nalllines):
+ for j in xrange(nalllines):
self.writeIndented(alllines[j] + "\n")
elif (self.proto == 0):
if (nametext == "route" or nametext == "route.js" or \
nametext == "route.txt") and (nlines != None):
nalllines = len(textEditor[i].asLines())
alllines = textEditor[i].asLines()
- for j in range(nalllines):
+ for j in xrange(nalllines):
self.writeIndented(alllines[j] + "\n")
self.writeIndented("\n")
@@ -567,7 +567,7 @@ class VRML2Export:
# Do meshes with materials, possibly with image textures
elif nummats > 0:
- for matnum in range(len(maters)):
+ for matnum in xrange(len(maters)):
images = []
if me.faceUV:
images = self.getImages(me, matnum)
@@ -736,7 +736,7 @@ class VRML2Export:
indexStr = ""
if (matnum == -1) or (face.mat == matnum):
if (face.image == image):
- for i in range(len(face.verts)):
+ for i in xrange(len(face.verts)):
uv = face.uv[i]
indexStr += "%s " % (j)
coordStr += "%s %s, " % \
@@ -783,13 +783,13 @@ class VRML2Export:
cols = [None] * len(me.verts)
for face in me.faces:
- for vind in range(len(face.v)):
+ for vind in xrange(len(face.v)):
vertex = face.v[vind]
i = vertex.index
if cols[i] == None:
cols[i] = face.col[vind]
- for i in range(len(me.verts)):
+ for i in xrange(len(me.verts)):
aColor = self.rgbToFS(cols[i])
self.writeUnindented("%s\n" % aColor)