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>2006-11-11 22:12:43 +0300
committerChris Want <cwant@ualberta.ca>2006-11-11 22:12:43 +0300
commit05c59da48fb5b242e2cf1bfc0e9e371ded70736b (patch)
tree81c6604a4363c0f1b8a4df948cb76fbccf533042 /release/scripts/vrml97_export.py
parentdddc04f0c46d6cc8943f1170cbc9d1d68eefe125 (diff)
Fix for bug #4922
The VRML97 exporter was rounding a lot of stuff to three decimal points. This is silly, since the spec says single-precision floats are used for most things, which gives about 7 decimal points precision.
Diffstat (limited to 'release/scripts/vrml97_export.py')
-rw-r--r--release/scripts/vrml97_export.py29
1 files changed, 10 insertions, 19 deletions
diff --git a/release/scripts/vrml97_export.py b/release/scripts/vrml97_export.py
index 3fa58339f04..ed9edc5032a 100644
--- a/release/scripts/vrml97_export.py
+++ b/release/scripts/vrml97_export.py
@@ -134,13 +134,11 @@ class VRML2Export:
self.verbose = 0
# decimals for material color values 0.000 - 1.000
- self.cp=3
+ self.cp=7
# decimals for vertex coordinate values 0.000 - n.000
- self.vp=3
+ self.vp=7
# decimals for texture coordinate values 0.000 - 1.000
- self.tp=3
-
- self.it=3
+ self.tp=7
#--- class private don't touch ---
self.texNames={} # dictionary of textureNames
@@ -1044,21 +1042,14 @@ class VRML2Export:
axis[0], axis[1], axis[2], angle)
self.writeIndented("DEF OB_%s Transform {\n" % (obname), 1)
- self.writeIndented("translation %s %s %s\n" % \
- (round(v.x,3), \
- round(v.y,3), \
- round(v.z,3)))
-
- self.writeIndented("rotation %s %s %s %s\n" % \
- (round(axis[0],3), \
- round(axis[1],3), \
- round(axis[2],3), \
- round(angle,3)))
+ self.writeIndented("translation %f %f %f\n" % \
+ (v.x, v.y, v.z) )
+
+ self.writeIndented("rotation %f %f %f %f\n" % \
+ (axis[0],axis[1],axis[2],angle) )
- self.writeIndented("scale %s %s %s\n" % \
- (round(sizeX,3), \
- round(sizeY,3), \
- round(sizeZ,3)))
+ self.writeIndented("scale %f %f %f\n" % \
+ (sizeX, sizeY, sizeZ) )
self.writeIndented("children [\n", 1)