Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-08 08:22:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-08 08:22:52 +0300
commit469d43b1dbc54d2afcbfe104a2d8ca9c03df9b81 (patch)
tree380520b1c0566a8f2687b42156c0cd82ff9a4e97 /source/blender/editors/sculpt_paint/sculpt.c
parentbf593a8631e84a258d1c8e5e7b198b458811c11b (diff)
WM: publish Object.mode changes on mode switching
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 5f5fa044f1e..048555d3fcc 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -76,6 +76,7 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "WM_message.h"
#include "ED_sculpt.h"
#include "ED_object.h"
@@ -5795,6 +5796,7 @@ void ED_object_sculptmode_exit(bContext *C)
static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
{
+ struct wmMsgBus *mbus = CTX_wm_message_bus(C);
Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C);
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
@@ -5816,6 +5818,8 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene);
+ WM_msg_publish_rna_prop(mbus, &ob->id, ob, Object, mode);
+
return OPERATOR_FINISHED;
}