diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-01-13 11:22:00 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-01-13 11:22:00 +0300 |
commit | 1b86b3c0f4ab84e3b47c04a63a69ffb61dc8660e (patch) | |
tree | 98564ce7162d25cfaff854a862fe0b8ac39caf2d /source/blender/blenkernel/intern/studiolight.c | |
parent | 0ef881cc57829471c441367ada6bf88119eaf26a (diff) |
Fix T73069: Studiolights
Studiolights that were just created didn't had the
`STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS` flag. Without this flag the
studiolight the viewport didn't show the specular highlights and it
wasn't possible to switch the highlights on/off in the popover. After
reloading the studio lights this was possible.
This patch will always set the flag for any newly created, or being
edited studiolight, so the workbench render engine is fed with the right
data.
Diffstat (limited to 'source/blender/blenkernel/intern/studiolight.c')
-rw-r--r-- | source/blender/blenkernel/intern/studiolight.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c index a02ff98a38a..9008348ed3b 100644 --- a/source/blender/blenkernel/intern/studiolight.c +++ b/source/blender/blenkernel/intern/studiolight.c @@ -1668,7 +1668,8 @@ StudioLight *BKE_studiolight_create(const char *path, const float light_ambient[3]) { StudioLight *sl = studiolight_create(STUDIOLIGHT_EXTERNAL_FILE | STUDIOLIGHT_USER_DEFINED | - STUDIOLIGHT_TYPE_STUDIO); + STUDIOLIGHT_TYPE_STUDIO | + STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS); char filename[FILE_MAXFILE]; BLI_split_file_part(path, filename, FILE_MAXFILE); @@ -1688,7 +1689,7 @@ StudioLight *BKE_studiolight_create(const char *path, StudioLight *BKE_studiolight_studio_edit_get(void) { static StudioLight sl = {0}; - sl.flag = STUDIOLIGHT_TYPE_STUDIO; + sl.flag = STUDIOLIGHT_TYPE_STUDIO | STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS; memcpy(sl.light, U.light_param, sizeof(*sl.light) * 4); memcpy(sl.light_ambient, U.light_ambient, sizeof(*sl.light_ambient) * 3); |