[Bf-blender-cvs] [c2316909ff4] blender2.8: Fix for object.set_select not updating selection in viewport

Dalai Felinto noreply at git.blender.org
Thu Nov 1 13:45:11 CET 2018


Commit: c2316909ff4f56094a0da88d0ad20edeff9327b8
Author: Dalai Felinto
Date:   Thu Nov 1 12:25:40 2018 +0000
Branches: blender2.8
https://developer.blender.org/rBc2316909ff4f56094a0da88d0ad20edeff9327b8

Fix for object.set_select not updating selection in viewport

Note: This function changes the active object as well. Not sure it
should do.

===================================================================

M	source/blender/makesrna/intern/rna_object_api.c

===================================================================

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)



More information about the Bf-blender-cvs mailing list