Fix T57929: missing UI updates when changing active object

was caused by NC_SCENE notifier being skipped with a non-scene reference
showed e.g. in timeline not updating keyframes/cachelines

Maniphest Tasks: T57929

Differential Revision: https://developer.blender.org/D4000
This commit is contained in:
Philipp Oeser 2018-11-27 10:24:48 +01:00
parent 884638494d
commit 00d438639d
Notes: blender-bot 2023-02-14 06:00:49 +01:00
Referenced by issue #57929, Cache line in timeline is not updated when changing active object
1 changed files with 2 additions and 6 deletions

View File

@ -126,15 +126,11 @@ void ED_object_base_select(Base *base, eObjectSelect_Mode mode)
*/
void ED_object_base_activate(bContext *C, Base *base)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
view_layer->basact = base;
if (base) {
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, view_layer);
}
else {
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, NULL);
}
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
DEG_id_tag_update(&CTX_data_scene(C)->id, DEG_TAG_SELECT_UPDATE);
}