[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1713] trunk/py/scripts/addons/ io_scene_x3d/export_x3d.py: fix [#26481] Export to X3D of IndexedFaceSet should use X3D 's DEF USE mechanism

Campbell Barton ideasman42 at gmail.com
Wed Mar 16 10:04:09 CET 2011


Revision: 1713
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1713
Author:   campbellbarton
Date:     2011-03-16 09:04:09 +0000 (Wed, 16 Mar 2011)
Log Message:
-----------
fix [#26481] Export to X3D of IndexedFaceSet should use X3D 's DEF USE mechanism

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-03-16 01:10:06 UTC (rev 1712)
+++ trunk/py/scripts/addons/io_scene_x3d/export_x3d.py	2011-03-16 09:04:09 UTC (rev 1713)
@@ -88,7 +88,7 @@
 
         self.bNav = 0
         self.nodeID = 0
-        self.namesReserved = ("Anchor", "Appearance", "Arc2D", "ArcClose2D", "AudioClip", "Background", "Billboard",
+        self.namesReserved = {"Anchor", "Appearance", "Arc2D", "ArcClose2D", "AudioClip", "Background", "Billboard",
                              "BooleanFilter", "BooleanSequencer", "BooleanToggle", "BooleanTrigger", "Box", "Circle2D",
                              "Collision", "Color", "ColorInterpolator", "ColorRGBA", "component", "Cone", "connect",
                              "Contour2D", "ContourPolyline2D", "Coordinate", "CoordinateDouble", "CoordinateInterpolator",
@@ -113,7 +113,7 @@
                              "StringSensor", "Switch", "Text", "TextureBackground", "TextureCoordinate", "TextureCoordinateGenerator",
                              "TextureTransform", "TimeSensor", "TimeTrigger", "TouchSensor", "Transform", "TransmitterPdu",
                              "TriangleFanSet", "TriangleSet", "TriangleSet2D", "TriangleStripSet", "Viewpoint", "VisibilitySensor",
-                             "WorldInfo", "X3D", "XvlShell", "VertexShader", "FragmentShader", "MultiShaderAppearance", "ShaderAppearance")
+                             "WorldInfo", "X3D", "XvlShell", "VertexShader", "FragmentShader", "MultiShaderAppearance", "ShaderAppearance"}
 
         self.namesFog = ("", "LINEAR", "EXPONENTIAL", "")
 
@@ -723,7 +723,7 @@
                 if objType == 'CAMERA':
                     self.writeViewpoint(ob, ob_mat, scene)
                 elif objType in ('MESH', 'CURVE', 'SURF', 'FONT'):
-                    if use_apply_modifiers or objType != 'MESH':
+                    if (objType != 'MESH') or (use_apply_modifiers and ob.is_modified(scene, 'PREVIEW')):
                         try:
                             me = ob.to_mesh(scene, use_apply_modifiers, 'PREVIEW')
                         except:



More information about the Bf-extensions-cvs mailing list