← Back to team overview

kicad-developers team mailing list archive

PATCH: fix swapped VRML material colors

 

The attached patch fixes a bug in the VRML2 parser
which had exchanged the Blue and Green components
of the ambient lighting.

- Cirilo
=== modified file 'plugins/3d/vrml/v2/vrml2_material.cpp'
--- plugins/3d/vrml/v2/vrml2_material.cpp	2016-02-23 02:31:51 +0000
+++ plugins/3d/vrml/v2/vrml2_material.cpp	2016-06-12 22:09:11 +0000
@@ -405,7 +405,7 @@
     float ambr = ambientIntensity * diffuseColor.x;
     float ambg = ambientIntensity * diffuseColor.y;
     float ambb = ambientIntensity * diffuseColor.z;
-    matNode.SetAmbient( ambr, ambb, ambg );
+    matNode.SetAmbient( ambr, ambg, ambb );
     matNode.SetShininess( shininess );
     matNode.SetTransparency( transparency );
     m_sgNode = matNode.GetRawPtr();

=== modified file 'plugins/3d/vrml/vrml.cpp'
--- plugins/3d/vrml/vrml.cpp	2016-05-16 07:32:15 +0000
+++ plugins/3d/vrml/vrml.cpp	2016-06-12 22:09:42 +0000
@@ -46,7 +46,7 @@
 #define PLUGIN_VRML_MAJOR 1
 #define PLUGIN_VRML_MINOR 3
 #define PLUGIN_VRML_PATCH 2
-#define PLUGIN_VRML_REVNO 1
+#define PLUGIN_VRML_REVNO 2
 
 
 const char* GetKicadPluginName( void )


Follow ups