From f24ccedc188dc59aa27d90358b3f3c8e6b114aa3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 18 Jul 2020 15:37:33 +1000 Subject: UV: utility functions for sticky select setting Support setting vert/edge/face selection, using the sticky option without performing a second loop over all faces to flush selection. Existing selection code didn't take advantage of BMesh connectivity since the logic is from before BMesh was included. --- source/blender/editors/include/ED_uvedit.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 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 1b87fae1bb4..b9b8d162d85 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -115,6 +115,14 @@ bool uvedit_uv_select_test(const struct Scene *scene, struct BMLoop *l, const int cd_loop_uv_offset); /* uv face */ +void uvedit_face_select_set_with_sticky(const struct SpaceImage *sima, + const struct Scene *scene, + struct BMEditMesh *em, + struct BMFace *efa, + const bool select, + const bool do_history, + const float limit[2], + const int cd_loop_uv_offset); void uvedit_face_select_set(const struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa, @@ -131,6 +139,14 @@ void uvedit_face_select_disable(const struct Scene *scene, struct BMFace *efa, const int cd_loop_uv_offset); /* uv edge */ +void uvedit_edge_select_set_with_sticky(const struct SpaceImage *sima, + const struct Scene *scene, + struct BMEditMesh *em, + struct BMLoop *l, + const bool select, + const bool do_history, + const float limit[2], + const uint cd_loop_uv_offset); void uvedit_edge_select_set(const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, @@ -147,6 +163,14 @@ void uvedit_edge_select_disable(const struct Scene *scene, struct BMLoop *l, const int cd_loop_uv_offset); /* uv vert */ +void uvedit_uv_select_set_with_sticky(const struct SpaceImage *sima, + const struct Scene *scene, + struct BMEditMesh *em, + struct BMLoop *l, + const bool select, + const bool do_history, + const float limit[2], + const uint cd_loop_uv_offset); void uvedit_uv_select_set(const struct Scene *scene, struct BMEditMesh *em, struct BMLoop *l, -- cgit v1.2.3