diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-20 10:29:40 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-20 10:29:40 +0300 |
commit | e3052ecb0d246381558c75219962915140bbe4ca (patch) | |
tree | a05e59c7c0b94b18bb45fe884bee6af920e241c2 /source/blender/blenkernel/intern/blender.c | |
parent | 91c0f17a475793de7bc6016598ef13221392dbf5 (diff) |
Studiolight: removed raise condition
Happened when deleting many studiolights at the same time when the
previews were still beging calculated in the background.
Added a free function callback that is filled when the preview is being
generated. This free function will then kill the preview job
This patch also removes icons that are not valid anymore so the user
cannot accidentally render an icon where the studiolight is invalid.
In the end we should use a add/remove function in the studiolight as
currently icons are recalculated too much.
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 006cf8275a7..c366d822648 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -62,6 +62,7 @@ #include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_sequencer.h" +#include "BKE_studiolight.h" #include "DEG_depsgraph.h" @@ -82,6 +83,8 @@ char versionstr[48] = ""; void BKE_blender_free(void) { /* samples are in a global list..., also sets G_MAIN->sound->sample NULL */ + + BKE_studiolight_free(); /* needs to run before main free as wm is still referenced for icons preview jobs */ BKE_main_free(G_MAIN); G_MAIN = NULL; |