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-11 17:55:14 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-05-11 18:02:13 +0300
commitd3c4248946f65d287f18b3d6488cd450dfb6d81d (patch)
tree47ed70266631c5e40cf221031d84315d85f27983 /source/blender/blenkernel/intern/icons.c
parent68b736ce248fbfc6eacfa2fed4f677523087accb (diff)
Workbench: StudioLight HDRI's
The Studio lights are now loaded from disk. The location is `datafiles/studiolights` they need to be JPG for now. JPG cannot store HDRI color range but they are clamped inside the Workbench engine for speed reason. I didn't select JP2K as it might not be enabled. Users can add upto 20 HDRI files. This limitation is inside the RNA_space.c Currently the icons are calculated when you first open the selection box for the HDRI's. We could add them to a background rendering later. I added 2 test files a sky texture rendered in Cycles and an HDRI from cloud.blender.org.
Diffstat (limited to 'source/blender/blenkernel/intern/icons.c')
-rw-r--r--source/blender/blenkernel/intern/icons.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index f1f343faac8..61c05c2500d 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -56,6 +56,7 @@
#include "BKE_icons.h"
#include "BKE_global.h" /* only for G.background test */
+#include "BKE_studiolight.h"
#include "BLI_sys_types.h" // for intptr_t support
@@ -802,3 +803,13 @@ struct Icon_Geom *BKE_icon_geom_from_file(const char *filename)
}
/** \} */
+
+/** \name Studio Light Icon
+ * \{ */
+int BKE_icon_ensure_studio_light(struct StudioLight *sl) {
+ int icon_id = get_next_free_id();
+ icon_create(icon_id, ICON_DATA_STUDIOLIGHT, sl);
+ return icon_id;
+}
+/** \} */
+