Fix for object.set_select not updating selection in viewport

Note: This function changes the active object as well. Not sure it
should do.
This commit is contained in:
Dalai Felinto 2018-11-01 12:25:40 +00:00
parent 77c126dd4c
commit c2316909ff
Notes: blender-bot 2023-02-14 10:37:50 +01:00
Referenced by issue #57564, Texture painting draw overlay pink until select texture
Referenced by issue #57565, Texture paint crash when toggle in/out editmesh mode
1 changed files with 5 additions and 0 deletions

View File

@ -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)