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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-05-16 17:42:30 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-05-16 17:43:10 +0300
commite862bcd6c8cb218c2213ac4a05a11dd13dbdecbf (patch)
tree317f98432815c99e5cffd52947b567fdc4a3c400 /source/blender/blenkernel/BKE_studiolight.h
parentdef1c3eb4b5c2926431a1c975839e7719f06b38e (diff)
Workbench: World based studio lighting
Disabled shadows for now as the calculation of the light direction is still to bogus.
Diffstat (limited to 'source/blender/blenkernel/BKE_studiolight.h')
-rw-r--r--source/blender/blenkernel/BKE_studiolight.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h
index c65e9050157..33c2af668b2 100644
--- a/source/blender/blenkernel/BKE_studiolight.h
+++ b/source/blender/blenkernel/BKE_studiolight.h
@@ -38,6 +38,11 @@
#include "DNA_space_types.h"
+/*
+ * These defines are the indexes in the StudioLight.diffuse_light
+ * X_POS means the light that is traveling towards the positive X
+ * So Light direction.
+ */
#define STUDIOLIGHT_X_POS 0
#define STUDIOLIGHT_X_NEG 1
#define STUDIOLIGHT_Y_POS 2
@@ -47,8 +52,11 @@
enum StudioLightFlag
{
- STUDIOLIGHT_DIFFUSE_LIGHT_CALCULATED = (1 << 0),
- STUDIOLIGHT_EXTERNAL_FILE = (1 << 1),
+ STUDIOLIGHT_DIFFUSE_LIGHT_CALCULATED = (1 << 0),
+ STUDIOLIGHT_LIGHT_DIRECTION_CALCULATED = (1 << 1),
+ STUDIOLIGHT_EXTERNAL_FILE = (1 << 2),
+ STUDIOLIGHT_ORIENTATION_CAMERA = (1 << 3),
+ STUDIOLIGHT_ORIENTATION_WORLD = (1 << 4),
} StudioLightFlag;
typedef struct StudioLight
@@ -60,6 +68,7 @@ typedef struct StudioLight
int icon_id;
int index;
float diffuse_light[6][3];
+ float light_direction[3];
} StudioLight;
void BKE_studiolight_init(void);