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/object/object_shapekey.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/object/object_shapekey.c')
-rw-r--r-- | source/blender/editors/object/object_shapekey.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index bd3bd8fd0a5..1f80cb5f0bc 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -49,7 +49,6 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" -#include "DNA_workspace_types.h" #include "BKE_context.h" #include "BKE_key.h" @@ -226,20 +225,18 @@ static bool object_shape_key_mirror(bContext *C, Object *ob, static int shape_key_mode_poll(bContext *C) { - const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = ED_object_context(C); ID *data = (ob) ? ob->data : NULL; - return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && (workspace->object_mode != OB_MODE_EDIT)); + return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && ob->mode != OB_MODE_EDIT); } static int shape_key_mode_exists_poll(bContext *C) { - const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = ED_object_context(C); ID *data = (ob) ? ob->data : NULL; /* same as shape_key_mode_poll */ - return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && (workspace->object_mode != OB_MODE_EDIT)) && + return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && ob->mode != OB_MODE_EDIT) && /* check a keyblock exists */ (BKE_keyblock_from_object(ob) != NULL); } @@ -247,13 +244,12 @@ static int shape_key_mode_exists_poll(bContext *C) static int shape_key_move_poll(bContext *C) { /* Same as shape_key_mode_exists_poll above, but ensure we have at least two shapes! */ - const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = ED_object_context(C); ID *data = (ob) ? ob->data : NULL; Key *key = BKE_key_from_object(ob); return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && - (workspace->object_mode != OB_MODE_EDIT) && key && key->totkey > 1); + ob->mode != OB_MODE_EDIT && key && key->totkey > 1); } static int shape_key_poll(bContext *C) |