diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 08:22:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 08:22:52 +0300 |
commit | 469d43b1dbc54d2afcbfe104a2d8ca9c03df9b81 (patch) | |
tree | 380520b1c0566a8f2687b42156c0cd82ff9a4e97 /source/blender/editors/sculpt_paint/paint_image.c | |
parent | bf593a8631e84a258d1c8e5e7b198b458811c11b (diff) |
WM: publish Object.mode changes on mode switching
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 3207b4f6a0a..cbf755d26b5 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -73,6 +73,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "WM_message.h" #include "RNA_access.h" #include "RNA_define.h" @@ -1057,6 +1058,7 @@ static int texture_paint_toggle_poll(bContext *C) static int texture_paint_toggle_exec(bContext *C, wmOperator *op) { + struct wmMsgBus *mbus = CTX_wm_message_bus(C); Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); const int mode_flag = OB_MODE_TEXTURE_PAINT; @@ -1130,10 +1132,10 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) toggle_paint_cursor(C, 1); } - // ED_workspace_object_mode_sync_from_object(wm, workspace, ob); - WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); + WM_msg_publish_rna_prop(mbus, &ob->id, ob, Object, mode); + return OPERATOR_FINISHED; } |