diff options
author | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-08-06 17:58:52 +0300 |
---|---|---|
committer | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-08-06 18:07:26 +0300 |
commit | 44384c698d394f6e7ed17b61e8406c867488aef9 (patch) | |
tree | f23e81deb3f31c0da22af0068727c26ae011b6f7 /source | |
parent | f5a333fe658fbf7bb4d07f79e289a194b28e515f (diff) |
BGe: Fix T45597 wrong object layer for linked object in blenderplayer.
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index b6bf96028d4..2de3ea0a87c 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1720,6 +1720,18 @@ static void UNUSED_FUNCTION(print_active_constraints2)(Object *ob) //not used, u } } +// Copy base layer to object layer like in BKE_scene_set_background +static void blenderSceneSetBackground(Scene *blenderscene) +{ + Scene *it; + Base *base; + + for (SETLOOPER(blenderscene, it, base)) { + base->object->lay = base->lay; + base->object->flag = base->flag; + } +} + static KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist) { @@ -1972,6 +1984,9 @@ void BL_ConvertBlenderObjects(struct Main* maggie, } SetDefaultLightMode(blenderscene); + + blenderSceneSetBackground(blenderscene); + // Let's support scene set. // Beware of name conflict in linked data, it will not crash but will create confusion // in Python scripting and in certain actuators (replace mesh). Linked scene *should* have |