[Bf-blender-cvs] [b0531227d40] master: Fix T68001: Rotating vertices on the UV map by a fixed number immediately crashes Blender.

Bastien Montagne noreply at git.blender.org
Wed Jul 31 16:14:40 CEST 2019


Commit: b0531227d40e2b4c147367fe87e311efd92de80d
Author: Bastien Montagne
Date:   Wed Jul 31 16:12:33 2019 +0200
Branches: master
https://developer.blender.org/rBb0531227d40e2b4c147367fe87e311efd92de80d

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).

===================================================================

M	source/blender/editors/transform/transform.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list