From 5940f6b3d9cfa99a1b893b6149d36ee0a8c51584 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Oct 2019 01:59:31 +1000 Subject: Fix T58683: Reload Scripts breaks toolbar button formatting Add a function which clears internal cached operator pointers, run before reloading scripts. --- source/blender/editors/space_script/script_edit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/space_script') diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 48248fe1dd2..2be05785d2b 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -106,6 +106,7 @@ static bool script_test_modal_operators(bContext *C) static int script_reload_exec(bContext *C, wmOperator *op) { + #ifdef WITH_PYTHON /* clear running operators */ @@ -114,6 +115,8 @@ static int script_reload_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } + WM_script_tag_reload(); + /* TODO, this crashes on netrender and keying sets, need to look into why * disable for now unless running in debug mode */ WM_cursor_wait(1); -- cgit v1.2.3