From 2da9a39418379ffd286a195188bcfba78eb4bf38 Mon Sep 17 00:00:00 2001 From: Porteries Tristan Date: Sat, 23 May 2015 12:12:43 +0200 Subject: BGE : Fix black material on meshes without materials in blenderplayer. Blenderplayer forgot to initialize the default material (defmaterail) with function init_def_material(). This reverts also the plumber commit 2fa4a48bcef05671890fafc3fe50a8fa619f0259. Reviewers: campbellbarton --- source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/gameengine/GamePlayer') diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 9e5b1464ac0..faa29e15b65 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -74,6 +74,7 @@ extern "C" #include "BKE_report.h" #include "BKE_library.h" #include "BKE_modifier.h" +#include "BKE_material.h" #include "BKE_text.h" #include "BKE_sound.h" @@ -519,6 +520,9 @@ int main(int argc, char** argv) BKE_sound_init_once(); + // Initialize a default material for meshes without materials. + init_def_material(); + BKE_library_callback_free_window_manager_set(wm_free); /* if running blenderplayer the last argument can't be parsed since it has to be the filename. else it is bundled */ -- cgit v1.2.3