diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-01-29 16:52:48 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-02-02 11:30:58 +0300 |
commit | d917d7cf948579f6aee58863f16225ed6e5ec2a0 (patch) | |
tree | 0945a1f5c87216e4d0c9ee3509dbb6a031db2baa | |
parent | 3ae74bcd29c6050c7261447c92737d85d4288bb7 (diff) |
Fix T85194: Smart UV does not respect "Correct Aspect" correctly
This lead to wrong, stretched UVs regardless of the ON/OFF state of
"Correct Aspect" option (some code in the operator respected this
setting properly, whereas it was hardcoded in another part).
Before rB9296ba867462, `uvedit_pack_islands_multi` was always called
with `correct_aspect` = false for the UnwrapOptions.
After rB9296ba867462, `ED_uvedit_pack_islands_multi` was always called
with `correct_aspect` = true for the UVPackIsland_Params.
Both seem wrong [in that they do not take the operator setting into
account]. Now respect that setting [same as the following
`uv_map_clip_correct_multi` does as well btw.]
Now results match 2.90 [where this was still python] perfectly.
Maniphest Tasks: T85194
Differential Revision: https://developer.blender.org/D10246
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 4bba3ef605e..be54df1ce9e 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -2165,6 +2165,7 @@ static int smart_project_exec(bContext *C, wmOperator *op) scene->toolsettings->uvcalc_margin = island_margin; /* Depsgraph refresh functions are called here. */ + const bool correct_aspect = RNA_boolean_get(op->ptr, "correct_aspect"); ED_uvedit_pack_islands_multi(scene, objects_changed, object_changed_len, @@ -2173,7 +2174,7 @@ static int smart_project_exec(bContext *C, wmOperator *op) /* We could make this optional. */ .rotate_align_axis = 1, .only_selected_faces = true, - .correct_aspect = true, + .correct_aspect = correct_aspect, .use_seams = true, }); |