From 2aea765d6eebd0dccf355c83ed9cb0eac5965072 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sun, 8 May 2011 03:42:24 +0000 Subject: [PATCH] Committing patch [#27133] "Fix for for Object Color in BGE" by Kupoman The tracker description: "This patch fixes this bug: http://projects.blender.org/tracker/index.php?func=detail&aid=25487&group_id=9&atid=306 This was accomplished by making sure the KX_GameObject's object color gets set during the conversion process in the method gameobject_from_blenderobject. Otherwise all the values for object color default to 0. The reason adding an IPO worked as a work around is because it set the object color." The bug report mentioned is bug [#25487] "BGE: Object Color only works when it has a keyed frame" --- source/gameengine/Converter/BL_BlenderDataConversion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 51ab4e4c399..a4fa91469a1 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1831,6 +1831,7 @@ static KX_GameObject *gameobject_from_blenderobject( { gameobj->SetLayer(ob->lay); gameobj->SetBlenderObject(ob); + gameobj->SetObjectColor(ob->col); /* set the visibility state based on the objects render option in the outliner */ if(ob->restrictflag & OB_RESTRICT_RENDER) gameobj->SetVisible(0, 0); }