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
This commit is contained in:
parent
3ae74bcd29
commit
d917d7cf94
Notes:
blender-bot
2023-02-14 08:59:10 +01:00
Referenced by issue #85194, Smart UV project produces wrong, stretched UVs regardless of "Correct Aspect" option state
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue