Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlysse Martin <you.le@live.fr>2016-01-17 20:41:37 +0300
committerThomas Szepe <HG1_public@gmx.net>2016-01-17 20:47:14 +0300
commitc4c2bd1350a52e18f973bba7e52e929f94ff6496 (patch)
treecb0bba24307411a8a601373806b781d49d2343c3 /source/gameengine/Converter
parenta5c419f4ccb19b0c01f3cbf5929f8a43bc503eff (diff)
BGE: Allow access to light shadow settings with python
This patch adds a new API which allow us to access light shadow settings from python. The new API can be used to write custom GLSL materials with shadows. Reviewers: brecht, kupoman, agoose77, panzergame, campbellbarton, moguri, hg1 Reviewed By: agoose77, panzergame, campbellbarton, moguri, hg1 Projects: #game_engine Differential Revision: https://developer.blender.org/D1690
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index f542525dd1e..0f55438ecf6 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1432,6 +1432,15 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
lightobj->m_color[2] = la->b;
lightobj->m_distance = la->dist;
lightobj->m_energy = la->energy;
+ lightobj->m_shadowclipstart = la->clipsta;
+ lightobj->m_shadowclipend = la->clipend;
+ lightobj->m_shadowbias = la->bias;
+ lightobj->m_shadowbleedbias = la->bleedbias;
+ lightobj->m_shadowmaptype = la->shadowmap_type;
+ lightobj->m_shadowfrustumsize = la->shadow_frustum_size;
+ lightobj->m_shadowcolor[0] = la->shdwr;
+ lightobj->m_shadowcolor[1] = la->shdwg;
+ lightobj->m_shadowcolor[2] = la->shdwb;
lightobj->m_layer = layerflag;
lightobj->m_spotblend = la->spotblend;
lightobj->m_spotsize = la->spotsize;