From 085890457106e36881b999d73cede9699a855e6c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 17 May 2011 02:44:52 +0000 Subject: [PATCH] fix [#27414] no-material renders differently in View3D vs BGE when a texface layer exists this still overrides the default material. --- build_files/cmake/cmake_netbeans_project.py | 2 +- .../gameengine/Converter/BL_BlenderDataConversion.cpp | 10 +++++++++- source/gameengine/Ketsji/BL_Material.h | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build_files/cmake/cmake_netbeans_project.py b/build_files/cmake/cmake_netbeans_project.py index 2d04c6e5463..c8bedb55148 100755 --- a/build_files/cmake/cmake_netbeans_project.py +++ b/build_files/cmake/cmake_netbeans_project.py @@ -147,7 +147,7 @@ def create_nb_project_main(): f.write(' \n') # default, but this dir is infact not in blender dir so we can ignore it # f.write(' ^(nbproject)$\n') - f.write(' ^(__pycache__|.*\.py)$\n') + f.write(' ^(nbproject|__pycache__|.*\.py|.*\.html|.*\.blend)$\n') f.write(' \n') f.write(' %s\n' % SOURCE_DIR) # base_root_rel diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index a4fa91469a1..82096db9131 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -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; diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index 126135f3d46..ef25c9218a3 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -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 };