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-01-04 13:09:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-04 13:15:00 +0300
commitc7085be6c6ba2f7415b5b69f451287456296a3b6 (patch)
tree49b0422e88f655bf2b3e230056f8e72c16dd603c /source/blender/editors/transform/transform_convert.c
parentd11a87b88c4d76aff77912313752d23fffc8e65d (diff)
Fix T84345: Transforming the cursor fails with absolute grid-snap
Absolute grid snapping was using the pivot, which doesn't make sense when transforming the cursor.
Diffstat (limited to 'source/blender/editors/transform/transform_convert.c')
-rw-r--r--source/blender/editors/transform/transform_convert.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index c81c954bd0a..dd35d67e1fa 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -993,6 +993,10 @@ void createTransData(bContext *C, TransInfo *t)
else {
convert_type = TC_CURSOR_VIEW3D;
}
+
+ /* Since we're transforming the cursor, initialize this value before it's modified.
+ * Needed for #snap_grid_apply to access the cursor location. */
+ transformCenter_from_type(t, V3D_AROUND_CURSOR);
}
else if (!(t->options & CTX_PAINT_CURVE) && (t->spacetype == SPACE_VIEW3D) && ob &&
(ob->mode == OB_MODE_SCULPT) && ob->sculpt) {