From 9296ba867462f7ff3c55bc0c9129af4121243bed Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Nov 2020 00:06:04 +1100 Subject: Fix T82637: pack UV islands fails with some non-manifold meshes Edges with 3 or more connected UV's caused UV pack to fail. Instead of using functions from uvedit_parametrizer.c which are intended specifically for ABF/LSCM unwrapping, use a simpler method for packing which stores arrays of BMesh faces. --- source/blender/editors/include/ED_uvedit.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 629e77bd4f2..a55e97fff72 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -27,6 +27,7 @@ extern "C" { #endif +struct ARegion; struct ARegionType; struct BMEditMesh; struct BMFace; @@ -233,6 +234,20 @@ void ED_image_draw_cursor(struct ARegion *region, const float cursor[2]); /* uvedit_buttons.c */ void ED_uvedit_buttons_register(struct ARegionType *art); +/* uvedit_islands.c */ +struct UVPackIsland_Params { + uint rotate : 1; + /** -1 not to align to axis, otherwise 0,1 for X,Y. */ + int rotate_align_axis : 2; + uint only_selected_uvs : 1; + uint only_selected_faces : 1; + uint correct_aspect : 1; +}; +void ED_uvedit_pack_islands_multi(const Scene *scene, + Object **objects, + const uint objects_len, + const struct UVPackIsland_Params *params); + #ifdef __cplusplus } #endif -- cgit v1.2.3