[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1983] trunk/py/scripts/addons/ io_scene_x3d/export_x3d.py: fix for exporting fog names

Campbell Barton ideasman42 at gmail.com
Mon May 30 02:15:32 CEST 2011


Revision: 1983
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1983
Author:   campbellbarton
Date:     2011-05-30 00:15:29 +0000 (Mon, 30 May 2011)
Log Message:
-----------
fix for exporting fog names

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-28 09:35:49 UTC (rev 1982)
+++ trunk/py/scripts/addons/io_scene_x3d/export_x3d.py	2011-05-30 00:15:29 UTC (rev 1983)
@@ -92,7 +92,6 @@
         newName = newName.replace(bad, "_")
     return newName
 
-namesFog = ("", "LINEAR", "EXPONENTIAL", "")
 
 ##########################################################
 # Functions for writing output file
@@ -156,8 +155,7 @@
             return
 
         if mparam.use_mist:
-            mtype = 1 if mtype == 'LINEAR' else 2
-            fw("%s<Fog fogType=\"%s\" " % (ident, __class__.namesFog[mtype]))
+            fw("%s<Fog fogType=\"%s\" " % (ident, "LINEAR" if (mtype == 'LINEAR') else "EXPONENTIAL"))
             fw("color=\"%.3g %.3g %.3g\" " % clamp_color(world.horizon_color))
             fw("visibilityRange=\"%.3g\" />\n" % mparam.depth)
         else:



More information about the Bf-extensions-cvs mailing list