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"
This commit is contained in:
Mitchell Stokes 2011-05-08 03:42:24 +00:00
parent 0b03268c17
commit 2aea765d6e

@ -1831,6 +1831,7 @@ static KX_GameObject *gameobject_from_blenderobject(
{ {
gameobj->SetLayer(ob->lay); gameobj->SetLayer(ob->lay);
gameobj->SetBlenderObject(ob); gameobj->SetBlenderObject(ob);
gameobj->SetObjectColor(ob->col);
/* set the visibility state based on the objects render option in the outliner */ /* set the visibility state based on the objects render option in the outliner */
if(ob->restrictflag & OB_RESTRICT_RENDER) gameobj->SetVisible(0, 0); if(ob->restrictflag & OB_RESTRICT_RENDER) gameobj->SetVisible(0, 0);
} }