Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-11-01 15:25:40 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-11-01 15:43:48 +0300
commitc2316909ff4f56094a0da88d0ad20edeff9327b8 (patch)
tree33effb39eb76d267a6d1fa55e5bd0801d3e29d80 /source/blender
parent77c126dd4c819a4ad92bb7895af4593831cb2daf (diff)
Fix for object.set_select not updating selection in viewport
Note: This function changes the active object as well. Not sure it should do.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 458c26f7026..bba6918044a 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -120,6 +120,11 @@ static void rna_Object_select_set(Object *ob, bContext *C, ReportList *reports,
BKE_view_layer_base_select(view_layer, base);
break;
}
+
+ Scene *scene = CTX_data_scene(C);
+ DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+ WM_main_add_notifier(NC_SCENE | ND_OB_SELECT, scene);
+ WM_main_add_notifier(NC_SCENE | ND_OB_ACTIVE, scene);
}
static bool rna_Object_select_get(Object *ob, bContext *C, ReportList *reports)