From 345c6298e995ea618c34282ba6d7ab5af032f191 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 8 Feb 2018 21:14:26 +1100 Subject: Object Mode: move to workspace struct - Read-only access can often use EvaluationContext.object_mode - Write access to go to WorkSpace.object_mode. - Some TODO's remain (marked as "TODO/OBMODE") - Add-ons will need updating (context.active_object.mode -> context.workspace.object_mode) - There will be small/medium issues that still need resolving this does work on a basic level though. See D3037 --- source/blender/blenkernel/BKE_workspace.h | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'source/blender/blenkernel/BKE_workspace.h') diff --git a/source/blender/blenkernel/BKE_workspace.h b/source/blender/blenkernel/BKE_workspace.h index 1c1f15ec99a..f839d4cdf76 100644 --- a/source/blender/blenkernel/BKE_workspace.h +++ b/source/blender/blenkernel/BKE_workspace.h @@ -34,17 +34,6 @@ struct Scene; struct TransformOrientation; struct ViewLayer; -/** - * Plan is to store the object-mode per workspace, not per object anymore. - * However, there's quite some work to be done for that, so for now, there is just a basic - * implementation of an object <-> workspace object-mode syncing for testing, with some known - * problems. Main problem being that the modes can get out of sync when changing object selection. - * Would require a pile of temporary changes to always sync modes when changing selection. So just - * leaving this here for some testing until object-mode is really a workspace level setting. - */ -#define USE_WORKSPACE_MODE - - /* -------------------------------------------------------------------- */ /* Create, delete, init */ @@ -106,15 +95,6 @@ void BKE_workspace_active_layout_set(struct WorkSpaceInstanceHook *h struct bScreen *BKE_workspace_active_screen_get(const struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; void BKE_workspace_active_screen_set( struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace, struct bScreen *screen) SETTER_ATTRS; -#ifdef USE_WORKSPACE_MODE -enum eObjectMode BKE_workspace_object_mode_get( - const struct WorkSpace *workspace, - const struct Scene *scene) GETTER_ATTRS; -void BKE_workspace_object_mode_set( - struct WorkSpace *workspace, - struct Scene *scene, - const enum eObjectMode mode) SETTER_ATTRS; -#endif struct Base *BKE_workspace_active_base_get(const struct WorkSpace *workspace, const struct Scene *scene); struct ListBase *BKE_workspace_transform_orientations_get(struct WorkSpace *workspace) GETTER_ATTRS; struct ViewLayer *BKE_workspace_view_layer_get( @@ -151,8 +131,7 @@ void BKE_workspace_update_tagged(struct EvaluationContext *eval_ctx, void BKE_workspace_update_object_mode( struct EvaluationContext *eval_ctx, - struct WorkSpace *workspace, - struct Scene *scene); + struct WorkSpace *workspace); #undef GETTER_ATTRS #undef SETTER_ATTRS -- cgit v1.2.3