set the visibility state based on the objects render option in the outliner.

- saves adding UV's to faces just to set the invisibility option or having an logic bricks to set the visibility state.
This commit is contained in:
Campbell Barton 2008-09-21 04:39:40 +00:00
parent deba5ab9a7
commit 2064f5542a

@ -1601,6 +1601,8 @@ static KX_GameObject *gameobject_from_blenderobject(
gameobj->SetPhysicsEnvironment(kxscene->GetPhysicsEnvironment()); gameobj->SetPhysicsEnvironment(kxscene->GetPhysicsEnvironment());
gameobj->SetLayer(ob->lay); gameobj->SetLayer(ob->lay);
gameobj->SetBlenderObject(ob); gameobj->SetBlenderObject(ob);
/* set the visibility state based on the objects render option in the outliner */
if(ob->restrictflag & OB_RESTRICT_RENDER) gameobj->SetVisible(0, 0);
} }
return gameobj; return gameobj;
} }