[Bf-blender-cvs] [d917d7cf948] blender-v2.92-release: Fix T85194: Smart UV does not respect "Correct Aspect" correctly
Philipp Oeser
noreply at git.blender.org
Tue Feb 2 09:32:17 CET 2021
Commit: d917d7cf948579f6aee58863f16225ed6e5ec2a0
Author: Philipp Oeser
Date: Fri Jan 29 14:52:48 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rBd917d7cf948579f6aee58863f16225ed6e5ec2a0
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
===================================================================
M source/blender/editors/uvedit/uvedit_unwrap_ops.c
===================================================================
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,
});
More information about the Bf-blender-cvs
mailing list