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/makesrna/intern/rna_material.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/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 6f23b0fd281..bf6e13e587c 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -207,16 +207,23 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, Scene *s if (win == NULL) { continue; } - Object *obedit = OBEDIT_FROM_WINDOW(win); + + Object *obedit = NULL; + { + WorkSpace *workspace = WM_window_get_active_workspace(win); + ViewLayer *view_layer = BKE_workspace_view_layer_get(workspace, scene); + obedit = OBEDIT_FROM_VIEW_LAYER(view_layer); + } + ScrArea *sa; for (sa = sc->areabase.first; sa; sa = sa->next) { SpaceLink *sl; for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)sl; - - if (!sima->pin) + if (!sima->pin) { ED_space_image_set(sima, scene, obedit, image); + } } } } |