Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

UV Editor UI test: grid packs expect tiles within the grid (the biggest island sets the scale)

islandmed27b7493680a3
diff --git a/tests/ui/uv_editor.sfui b/tests/ui/uv_editor.sfui
index de3dacd8..169b64b0 100644
--- a/tests/ui/uv_editor.sfui
+++ b/tests/ui/uv_editor.sfui
@@ -57,14 +57,19 @@ shot udim
expect "UV Editor/##uvcolumns"
expect "UV Editor/##uvrows"
run uv_pack columns=10 rows=2 margin=6
-expect_value uv_tiles == 20
+# (the biggest island sets the scale: the islands fill the tiles that holds, inside the grid)
+expect_value uv_tiles > 4
+expect_value uv_tiles <= 20
expect_value uv_pack_columns == 10
expect_value uv_pack_rows == 2
hover_window 0.45 0.5
key f
shot udim-10x2
run uv_pack columns=4 rows=3 margin=6
-expect_value uv_tiles == 12
+expect_value uv_tiles > 4
+expect_value uv_tiles <= 12
+expect_value uv_max_u <= 4
+remember uv_tiles grid
expect_value uv_pack_columns == 4
expect_value uv_pack_rows == 3
hover_window 0.45 0.5
@@ -72,7 +77,8 @@ key f
shot udim-4x3
# The Pack button packs with the fields: still 4 x 3.
click "UV Editor/Pack##uv.pack"
-expect_value uv_tiles == 12
+expect_value uv_tiles == $grid
+expect_value uv_max_u <= 4
run uv_pack tiles=1
expect_value uv_tiles == 1
expect_value uv_pack_columns == 1