diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 19:20:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 19:21:14 +0300 |
commit | 1c24c04e6023f2d2a328dfcdc9f86cd381d029a3 (patch) | |
tree | 7a5af59ce078cb66fb17ec33cf111ffc8d5fb328 /source/blender/editors/render/render_shading.c | |
parent | 57329304b061efe756e3a4ce1b828e9a7c7f7030 (diff) |
Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 222e0e20dff..270ba2a7947 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -99,7 +99,6 @@ static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op)) { - const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = ED_object_context(C); if (!ob) @@ -107,7 +106,7 @@ static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op)) BKE_object_material_slot_add(ob); - if (workspace->object_mode & OB_MODE_TEXTURE_PAINT) { + if (ob->mode & OB_MODE_TEXTURE_PAINT) { Scene *scene = CTX_data_scene(C); BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL); WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL); @@ -137,7 +136,6 @@ void OBJECT_OT_material_slot_add(wmOperatorType *ot) static int material_slot_remove_exec(bContext *C, wmOperator *op) { - const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = ED_object_context(C); if (!ob) @@ -151,7 +149,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op) BKE_object_material_slot_remove(ob); - if (workspace->object_mode & OB_MODE_TEXTURE_PAINT) { + if (ob->mode & OB_MODE_TEXTURE_PAINT) { Scene *scene = CTX_data_scene(C); BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL); WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL); |