From 0116c95d4c9114bc9eae03401c0471fba265cd46 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 19 Jun 2018 16:33:47 +0200 Subject: Studiolight: Temp Mutex issue This is a temp fix for a better system. Currently the studiolights can be referenced by a WM_job and being freed via the API. This can happen when removing a studiolight via the interface. As the studiolight has no relation with the job, it is hard to detect if it is still being used. I tried with a Mutex and a Thread Queue but they were failing. So the current temp fix is to keep the studiolights in memory until you close blender. This Must be fixed ASAP! I added this fix so normal cases can workish. --- source/blender/blenkernel/BKE_studiolight.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/BKE_studiolight.h') diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h index 7ffb75820df..a1f43352d8b 100644 --- a/source/blender/blenkernel/BKE_studiolight.h +++ b/source/blender/blenkernel/BKE_studiolight.h @@ -79,6 +79,7 @@ enum StudioLightFlag { STUDIOLIGHT_EQUIRECTANGULAR_IRRADIANCE_GPUTEXTURE = (1 << 10), STUDIOLIGHT_RADIANCE_BUFFERS_CALCULATED = (1 << 11), STUDIOLIGHT_UI_EXPANDED = (1 << 13), + STUDIOLIGHT_DISABLED = (1 << 14), } StudioLightFlag; #define STUDIOLIGHT_FLAG_ALL (STUDIOLIGHT_INTERNAL | STUDIOLIGHT_EXTERNAL_FILE) @@ -107,6 +108,7 @@ typedef struct StudioLight { struct GPUTexture *equirectangular_radiance_gputexture; struct GPUTexture *equirectangular_irradiance_gputexture; float *gpu_matcap_3components; /* 3 channel buffer for GPU_R11F_G11F_B10F */ + } StudioLight; void BKE_studiolight_init(void); -- cgit v1.2.3