Fix #115662: Outliner slows down many geometry operations in big scenes #115799

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:115662 into main 2023-12-06 10:23:07 +01:00
3 changed files with 16 additions and 5 deletions

View File

@ -477,8 +477,8 @@ static int armature_flip_names_exec(bContext *C, wmOperator *op)
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
/* copied from #rna_Bone_update_renamed */
/* redraw view */
WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
/* Redraw Outliner / Dopesheet. */
WM_event_add_notifier(C, NC_GEOM | ND_DATA | NA_RENAME, ob->data);
/* update animation channels */
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN, ob->data);

View File

@ -211,9 +211,13 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params)
case NC_GEOM:
switch (wmn->data) {
case ND_VERTEX_GROUP:
case ND_DATA:
ED_region_tag_redraw(region);
break;
case ND_DATA:
if (wmn->action == NA_RENAME) {
ED_region_tag_redraw(region);
}
break;
}
break;
case NC_ANIMATION:
@ -269,6 +273,13 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params)
ED_region_tag_redraw(region);
}
break;
case NC_IMAGE:
if (ELEM(wmn->action, NA_ADDED, NA_REMOVED) &&
ELEM(space_outliner->outlinevis, SO_LIBRARIES, SO_DATA_API))
{
ED_region_tag_redraw(region);
}
break;
}
}

View File

@ -517,8 +517,8 @@ static void rna_Bone_update_renamed(Main * /*bmain*/, Scene * /*scene*/, Pointer
{
ID *id = ptr->owner_id;
/* redraw view */
WM_main_add_notifier(NC_GEOM | ND_DATA, id);
/* Redraw Outliner / Dopesheet. */
WM_main_add_notifier(NC_GEOM | ND_DATA | NA_RENAME, id);
/* update animation channels */
WM_main_add_notifier(NC_ANIMATION | ND_ANIMCHAN, id);