Fix T38427: Sculpt mode dimension changes don't Undo

This commit is contained in:
Sergey Sharybin 2014-02-04 19:47:17 +06:00
parent 1d260d84ad
commit 30b5aef678
Notes: blender-bot 2023-02-14 11:15:44 +01:00
Referenced by issue #38427, Sculpt mode dimension changes don't Undo
3 changed files with 8 additions and 2 deletions

View File

@ -4376,7 +4376,7 @@ static void sculpt_restore_mesh(Sculpt *sd, Object *ob)
}
/* Copy the PBVH bounding box into the object's bounding box */
static void sculpt_update_object_bounding_box(Object *ob)
void sculpt_update_object_bounding_box(Object *ob)
{
if (ob->bb) {
float bb_min[3], bb_max[3];

View File

@ -132,4 +132,6 @@ void sculpt_undo_push_end(void);
void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]);
void sculpt_update_object_bounding_box(struct Object *ob);
#endif

View File

@ -487,8 +487,12 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
tag_update |= 1;
}
if (tag_update)
if (tag_update) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
sculpt_update_object_bounding_box(ob);
}
/* for non-PBVH drawing, need to recreate VBOs */
GPU_drawobject_free(ob->derivedFinal);