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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-07-31 17:12:33 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-07-31 17:14:34 +0300
commitb0531227d40e2b4c147367fe87e311efd92de80d (patch)
treee3a2d72f3bf2479b598396ecbc5c4497c0698bf7
parent03be31e817a21ebd65875e3283475f5450acd5a3 (diff)
Fix T68001: Rotating vertices on the UV map by a fixed number immediately crashes Blender.
Spaghetti Transform code can use same code for different kind of data. The 'stepped rotation' process is actually only useful/doable in a few cases (when we do have some real place to store rotation value, and we are using Eulers).
-rw-r--r--source/blender/editors/transform/transform.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index d8dd6aa97b5..17cbc9b0551 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -4640,8 +4640,13 @@ static void applyRotationValue(TransInfo *t,
* Note that this is only needed when doing 'absolute' rotation
* (i.e. from initial rotation again, typically when using numinput).
* regular incremental rotation (from mouse/widget/...) will be called often enough,
- * hence steps are small enough to be properly handled without that complicated trick. */
- if (is_large_rotation) {
+ * hence steps are small enough to be properly handled without that complicated trick.
+ * Note that we can only do that kind of stepped rotation if we have initial rotation values
+ * (and access to some actual rotation value storage).
+ * Otherwise, just assume it's useless (e.g. in case of mesh/UV/etc. editing).
+ * Also need to be in Euler rotation mode, the others never allow more than one turn anyway.
+ */
+ if (is_large_rotation && td->ext != NULL && td->ext->rotOrder == ROT_MODE_EUL) {
copy_v3_v3(td->ext->rot, td->ext->irot);
for (float angle_progress = angle_step; fabsf(angle_progress) < fabsf(angle_final);
angle_progress += angle_step) {