Fix T59009: UV unwrapp correct aspect fails on some shapes.
authorDaniel <bestdani>
Tue, 18 Dec 2018 12:52:39 +0000 (13:52 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 18 Dec 2018 14:07:04 +0000 (15:07 +0100)
Differential Revision: https://developer.blender.org/D4095

source/blender/editors/uvedit/uvedit_parametrizer.c

index 412d68a5d4ddf16174572fd037ebd0f39c7ff552..c2775014519761cc0c8049bbd3a4ac5cc72ef39f 100644 (file)
@@ -4506,14 +4506,14 @@ void param_pack(ParamHandle *handle, float margin, bool do_rotate)
        if (phandle->ncharts == 0)
                return;
 
-       if (phandle->aspx != phandle->aspy)
-               param_scale(handle, 1.0f / phandle->aspx, 1.0f / phandle->aspy);
-
        /* this could be its own function */
        if (do_rotate) {
                param_pack_rotate(handle);
        }
 
+       if (phandle->aspx != phandle->aspy)
+               param_scale(handle, 1.0f / phandle->aspx, 1.0f / phandle->aspy);
+
        /* we may not use all these boxes */
        boxarray = MEM_mallocN(phandle->ncharts * sizeof(BoxPack), "BoxPack box");