Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-07-11 08:17:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-07-11 08:22:20 +0300
commit0f201049b4b2011ab940a5689867e190930d561e (patch)
treed62d8c4f38960de32260ffcb03095371ed3bb911
parent49a363f0e0d837464503a934920033acf9a354ec (diff)
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.
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index dcd4ff8df36..2e203d06b12 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -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: