Edit Mesh: tag the object data for updating instead of the object
When editing vertices with number buttons, tag the mesh, not the object. This prevents the evaluated mesh being re-created for the object and is correct as the mesh is being edited not the object. Note that all tags for updating object geometry should be checked to see if this change should be applied there too. From a simple test on a high-poly mesh this gives around 1.3x overall speedup.
This commit is contained in:
parent
49a363f0e0
commit
0f201049b4
Notes:
blender-bot
2023-02-14 05:16:25 +01:00
Referenced by issue #88550, Mesh Optimization Project Progress
|
@ -1152,7 +1152,7 @@ static void do_view3d_vgroup_buttons(bContext *C, void *UNUSED(arg), int event)
|
|||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
Object *ob = view_layer->basact->object;
|
||||
ED_vgroup_vert_active_mirror(ob, event - B_VGRP_PNL_EDIT_SINGLE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
|
||||
}
|
||||
|
||||
|
@ -1568,7 +1568,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
|
|||
case B_TRANSFORM_PANEL_MEDIAN:
|
||||
if (ob) {
|
||||
v3d_editvertex_buts(NULL, v3d, ob, 1.0);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
break;
|
||||
case B_TRANSFORM_PANEL_DIMS:
|
||||
|
|
Loading…
Reference in New Issue