From d3c4248946f65d287f18b3d6488cd450dfb6d81d Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 11 May 2018 16:55:14 +0200 Subject: 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. --- source/blender/blenkernel/BKE_icons.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenkernel/BKE_icons.h') diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index 766704b8f9c..e54531bdb0e 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -43,6 +43,7 @@ enum { ICON_DATA_PREVIEW, /** 2D triangles: obj is #Icon_Geom */ ICON_DATA_GEOM, + ICON_DATA_STUDIOLIGHT, }; struct Icon { @@ -77,6 +78,7 @@ typedef struct Icon Icon; struct ImBuf; struct PreviewImage; struct ID; +struct StudioLight; enum eIconSizes; @@ -158,6 +160,8 @@ struct ImBuf *BKE_icon_geom_rasterize( const struct Icon_Geom *geom, const unsigned int size_x, const unsigned int size_y); +int BKE_icon_ensure_studio_light(struct StudioLight *sl); + #define ICON_RENDER_DEFAULT_HEIGHT 32 #endif /* __BKE_ICONS_H__ */ -- cgit v1.2.3