UV: disable best fit rotation of all islands at end of UV packing
This has a tendency to place islands diagonally in the image which is not usually wanted, even if it's maximimizing the number of pixels for the island. Fix #109906: UV unwrap packs island diagonally instead of straight Pull Request: https://projects.blender.org/blender/blender/pulls/112295
This commit is contained in:
@@ -1919,8 +1919,10 @@ static float pack_islands_scale_margin(const Span<PackIsland *> islands,
|
||||
|
||||
/* At this stage, `extent` contains the fast/optimal/box_pack/xatlas UVs. */
|
||||
|
||||
if (all_can_rotate) {
|
||||
/* Attempt to improve the layout even further by finding the minimal-bounding-square. */
|
||||
/* If more islands remain to be packed, attempt to improve the layout further by finding the
|
||||
* minimal-bounding-square. Disabled for other cases as users often prefer to avoid diagonal
|
||||
* islands. */
|
||||
if (all_can_rotate && aabbs.size() > slow_aabbs.size()) {
|
||||
rotate_inside_square(slow_aabbs, islands, params, scale, margin, r_phis, &extent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user