diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-17 06:44:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-17 06:44:52 +0400 |
commit | 085890457106e36881b999d73cede9699a855e6c (patch) | |
tree | c21e1dafbef581f29c895ca81d34d03bb7145737 /source/gameengine | |
parent | c4dca3890bd8877acdcbff816c1595cf21af7b53 (diff) |
fix [#27414] no-material renders differently in View3D vs BGE
when a texface layer exists this still overrides the default material.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/BL_Material.h | 2 |
2 files changed, 10 insertions, 2 deletions
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 }; |