diff options
author | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-04-26 17:29:43 +0300 |
---|---|---|
committer | Thomas Szepe <HG1_public@gmx.net> | 2015-04-26 17:29:58 +0300 |
commit | 5efbd2a4076af7de8d4c9256ff8f6aacbfa6b49f (patch) | |
tree | 34c74fbc52dc04eeedb4669f0224d0aa5d8ca90a /source/gameengine/Ketsji/KX_Light.cpp | |
parent | 3524676036c370822344f1c80b191d34644b3745 (diff) |
BGE : addObject in python without reference object.
Making the reference argument optional for the addObject function.
```
scene.addObject("Cube")
```
This allows to keep the rotation, scale and position of the original object.
To avoid layer problems with lights if the reference arguments is None, the new object have the same layer than the active layers in scene.
Reviewers: lordloki, moguri, hg1, sybren
Reviewed By: hg1, sybren
Subscribers: agoose77
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1222
Diffstat (limited to 'source/gameengine/Ketsji/KX_Light.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index d6b84e98aec..0dec5715588 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -108,6 +108,7 @@ void KX_LightObject::UpdateScene(KX_Scene *kxscene) void KX_LightObject::SetLayer(int layer) { + KX_GameObject::SetLayer(layer); m_lightobj->m_layer = layer; } |