From 1c24c04e6023f2d2a328dfcdc9f86cd381d029a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Apr 2018 18:20:27 +0200 Subject: 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. --- source/blender/makesrna/intern/rna_layer.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'source/blender/makesrna/intern/rna_layer.c') diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index 9992ab06211..7d09f30ed6a 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -64,7 +64,6 @@ const EnumPropertyItem rna_enum_collection_type_items[] = { #include "DNA_group_types.h" #include "DNA_object_types.h" -#include "DNA_workspace_types.h" #include "RNA_access.h" @@ -73,8 +72,6 @@ const EnumPropertyItem rna_enum_collection_type_items[] = { #include "BKE_node.h" #include "BKE_scene.h" #include "BKE_mesh.h" -#include "BKE_object.h" -#include "BKE_workspace.h" #include "DEG_depsgraph_build.h" #include "DEG_depsgraph_query.h" @@ -838,18 +835,6 @@ static void rna_LayerObjects_active_object_set(PointerRNA *ptr, PointerRNA value view_layer->basact = NULL; } -static void rna_LayerObjects_active_object_update(struct bContext *C, PointerRNA *ptr) -{ - wmWindow *win = CTX_wm_window(C); - Scene *scene = WM_window_get_active_scene(win); - - if (scene != ptr->id.data) { - return; - } - ViewLayer *view_layer = (ViewLayer *)ptr->data; - ED_object_base_activate(C, view_layer->basact); -} - static IDProperty *rna_ViewLayer_idprops(PointerRNA *ptr, bool create) { ViewLayer *view_layer = (ViewLayer *)ptr->data; @@ -2145,11 +2130,11 @@ static void rna_def_layer_objects(BlenderRNA *brna, PropertyRNA *cprop) prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Object"); RNA_def_property_pointer_funcs(prop, "rna_LayerObjects_active_object_get", "rna_LayerObjects_active_object_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK | PROP_CONTEXT_UPDATE); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Active Object", "Active object for this layer"); /* Could call: ED_object_base_activate(C, rl->basact); * but would be a bad level call and it seems the notifier is enough */ - RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, "rna_LayerObjects_active_object_update"); + RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL); prop = RNA_def_property(srna, "selected", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "object_bases", NULL); -- cgit v1.2.3