fix [#27414] no-material renders differently in View3D vs BGE
authorCampbell Barton <ideasman42@gmail.com>
Tue, 17 May 2011 02:44:52 +0000 (02:44 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 17 May 2011 02:44:52 +0000 (02:44 +0000)
when a texface layer exists this still overrides the default material.

build_files/cmake/cmake_netbeans_project.py
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Ketsji/BL_Material.h

index 2d04c6e5463cb0d003ef9c7f1f17a16d97a57a87..c8bedb551481b0fce9cd8ec572dce2e5297fea85 100755 (executable)
@@ -147,7 +147,7 @@ def create_nb_project_main():
         f.write('  </logicalFolder>\n')
         # default, but this dir is infact not in blender dir so we can ignore it
         # f.write('  <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>\n')
-        f.write('  <sourceFolderFilter>^(__pycache__|.*\.py)$</sourceFolderFilter>\n')
+        f.write('  <sourceFolderFilter>^(nbproject|__pycache__|.*\.py|.*\.html|.*\.blend)$</sourceFolderFilter>\n')
 
         f.write('  <sourceRootList>\n')
         f.write('    <Elem>%s</Elem>\n' % SOURCE_DIR)  # base_root_rel
index a4fa91469a185ba5275cd787762f2abad10df9db..82096db913101fd79a5052ceaaf9fbac01b7e3bf 100644 (file)
@@ -460,7 +460,9 @@ bool ConvertMaterial(
                                                        }
                                                }
                                        }
-                                       material->flag[i] |= (mat->ipo!=0)?HASIPO:0;
+#if 0                          /* this flag isnt used anymore */
+                                       material->flag[i] |= (BKE_animdata_from_id(mat->id) != NULL) ? HASIPO : 0;
+#endif
                                        /// --------------------------------
                                        // mapping methods
                                        material->mapping[i].mapping |= ( mttmp->texco  & TEXCO_REFL    )?USEREFL:0;
@@ -835,6 +837,12 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
                else
                        ma = mesh->mat ? mesh->mat[mface->mat_nr]:NULL;
 
+               /* ckeck for texface since texface _only_ is used as a fallback */
+               if(ma == NULL && tface == NULL) {
+                       extern Material defmaterial;    /* material.c */
+                       ma= &defmaterial;
+               }
+
                {
                        bool visible = true;
                        bool twoside = false;
index 126135f3d46d0ff8650165117d10f1ba399e4cc8..ef25c9218a3c7f391463f2dcbbb5bc3ec61a51ec 100644 (file)
@@ -144,7 +144,7 @@ enum BL_flag
        USEALPHA=4,             // use actual alpha channel
        TEXALPHA=8,             // use alpha combiner functions
        TEXNEG=16,              // negate blending
-       HASIPO=32,
+       /*HASIPO=32,*/  // unused, commeted for now.
        USENEGALPHA=64
 };