diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-10 20:55:15 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-11 14:07:19 +0300 |
commit | 309cd047ef46fcbd21b26b2509b40c55c5dab61e (patch) | |
tree | ec1873a13b391026bffc0110d84aafc855b648df /source/blender/editors/sculpt_paint/sculpt_undo.c | |
parent | ef18b672f5a57d86d264af0f875a37c6a9c6677a (diff) |
Sculpt: Transform tool
The sculpt mode transform tool applies the sculpt pivot transformation to all vertices, taking XYZ symmetry into account.
This commit also includes an operator to set the pivot point initial position.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5717
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index cb8afd5d7fa..3783eb17562 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -494,6 +494,9 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase bool partial_update = true; for (unode = lb->first; unode; unode = unode->next) { + /* restore pivot */ + copy_v3_v3(ss->pivot_pos, unode->pivot_pos); + copy_v3_v3(ss->pivot_rot, unode->pivot_rot); if (STREQ(unode->idname, ob->id.name)) { if (unode->type == SCULPT_UNDO_MASK) { /* is possible that we can't do the mask undo (below) @@ -1055,6 +1058,10 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType break; } + /* store sculpt pivot */ + copy_v3_v3(unode->pivot_pos, ss->pivot_pos); + copy_v3_v3(unode->pivot_rot, ss->pivot_rot); + /* store active shape key */ if (ss->kb) { BLI_strncpy(unode->shapeName, ss->kb->name, sizeof(ss->kb->name)); |