From cd517c002f8293ed9a7a3f8c5877bba944c21a45 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Feb 2018 21:06:51 +1100 Subject: Object Mode: remove Scene.obedit for RNA --- source/blender/makesrna/intern/rna_object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_object.c') diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 270d9fe14ca..d3096bbb6bb 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -295,11 +295,11 @@ void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->id.data); } -static void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Object_active_shape_update(bContext *C, Main *bmain, Scene *scene, PointerRNA *ptr) { Object *ob = ptr->id.data; - if (scene->obedit == ob) { + if (CTX_data_edit_object(C) == ob) { /* exit/enter editmode to get new shape */ switch (ob->type) { case OB_MESH: @@ -3018,6 +3018,7 @@ static void rna_def_object(BlenderRNA *brna) prop = RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "shapenr"); + RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* XXX this is really unpredictable... */ RNA_def_property_int_funcs(prop, "rna_Object_active_shape_key_index_get", "rna_Object_active_shape_key_index_set", "rna_Object_active_shape_key_index_range"); -- cgit v1.2.3