From 96a7ed8a159fec97ab19a6d19ffe6201a4ee2b35 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 22 May 2018 14:00:44 +0200 Subject: Tool System: store operator properties in the tool This replaces last-used property use which wasn't reliable since properties were not considered 'set' - causing them to be ignored. --- source/blender/blenkernel/intern/workspace.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/intern/workspace.c') diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c index fd316cb9d82..7fc0d814089 100644 --- a/source/blender/blenkernel/intern/workspace.c +++ b/source/blender/blenkernel/intern/workspace.c @@ -34,6 +34,7 @@ #include "BLI_listbase.h" #include "BKE_global.h" +#include "BKE_idprop.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_scene.h" @@ -176,6 +177,10 @@ void BKE_workspace_free(WorkSpace *workspace) tref_next = tref->next; if (tref->runtime) { MEM_freeN(tref->runtime); + if (tref->properties) { + IDP_FreeProperty(tref->properties); + MEM_freeN(tref->properties); + } } } BLI_freelistN(&workspace->tools); -- cgit v1.2.3