fix for r36723 - putting extern Material inside code like that results in wrong linki...
authorNathan Letwory <nathan@letworyinteractive.com>
Tue, 17 May 2011 16:20:07 +0000 (16:20 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Tue, 17 May 2011 16:20:07 +0000 (16:20 +0000)
source/gameengine/Converter/BL_BlenderDataConversion.cpp

index 82096db913101fd79a5052ceaaf9fbac01b7e3bf..1fb30925446cf8c2a6678602b03835ff1387f3ff 100644 (file)
@@ -143,9 +143,11 @@ extern "C" {
 #include "BKE_customdata.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_customdata.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_DerivedMesh.h"
+#include "BKE_material.h" /* give_current_material */
+
+extern Material defmaterial;   /* material.c */
 }
 
 }
 
-#include "BKE_material.h" /* give_current_material */
 /* end of blender include block */
 
 #include "KX_BlenderInputDevice.h"
 /* end of blender include block */
 
 #include "KX_BlenderInputDevice.h"
@@ -839,7 +841,6 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
 
                /* ckeck for texface since texface _only_ is used as a fallback */
                if(ma == NULL && tface == NULL) {
 
                /* ckeck for texface since texface _only_ is used as a fallback */
                if(ma == NULL && tface == NULL) {
-                       extern Material defmaterial;    /* material.c */
                        ma= &defmaterial;
                }
 
                        ma= &defmaterial;
                }