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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-02-04 17:47:17 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-02-04 17:47:17 +0400
commit30b5aef6789a2cf39020151b00410bd1d8f1c3d7 (patch)
tree3fb822caf8b36caeda252e0f3086aa3c2c2fceea
parent1d260d84adf4dcabc9a3533030e926b26faba149 (diff)
Fix T38427: Sculpt mode dimension changes don't Undo
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c6
3 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c8645b1f3de..eb40cb00b41 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -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];
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index d904ec3bc96..a69271463cf 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -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
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 6fa5c8fbf5a..03321cd1a85 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -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);