Blender V5.3
uvedit_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BKE_customdata.hh"
12
13namespace blender {
14
15struct BMVert;
16struct BMEdge;
17struct BMFace;
18struct BMLoop;
19struct Object;
20struct Scene;
21struct SpaceImage;
22struct ToolSettings;
23struct wmOperatorType;
24struct View2D;
25
26/* find nearest */
27
40 float dist_sq;
41
43 float scale[2];
44};
45
46UvNearestHit uv_nearest_hit_init_dist_px(const View2D *v2d, float dist_px);
49
58void uv_nearest_hit_elem_set_from_face(const float co[2], UvNearestHit *hit, short uv_selectmode);
59
61 Scene *scene, Object *obedit, const float co[2], float penalty_dist, UvNearestHit *hit);
63 Span<Object *> objects,
64 const float co[2],
65 float penalty_dist,
66 UvNearestHit *hit);
67
69 Scene *scene, Object *obedit, const float co[2], float penalty, UvNearestHit *hit);
71 Scene *scene, Span<Object *> objects, const float co[2], float penalty, UvNearestHit *hit);
72
83 Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, bool only_in_face);
84bool uv_find_nearest_face(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit);
86 Scene *scene, Span<Object *> objects, const float co[2], UvNearestHit *hit, bool only_in_face);
88 Span<Object *> objects,
89 const float co[2],
90 UvNearestHit *hit);
91
92BMLoop *uv_find_nearest_loop_from_vert(Scene *scene, Object *obedit, BMVert *v, const float co[2]);
93BMLoop *uv_find_nearest_loop_from_edge(Scene *scene, Object *obedit, BMEdge *e, const float co[2]);
94
96 const BMesh *bm,
97 const BMLoop *l,
98 const BMUVOffsets &offsets);
100 const BMesh *bm,
101 const BMLoop *l,
102 const BMUVOffsets &offsets);
104 const BMesh *bm,
105 const BMLoop *l,
106 const BMUVOffsets &offsets);
107
109 const BMesh *bm,
110 const BMLoop *l,
111 const BMUVOffsets &offsets);
112
113[[nodiscard]] bool uvedit_vert_select_get_no_sync(const ToolSettings *ts,
114 const BMesh *bm,
115 const BMLoop *l);
116[[nodiscard]] bool uvedit_edge_select_get_no_sync(const ToolSettings *ts,
117 const BMesh *bm,
118 const BMLoop *l);
119[[nodiscard]] bool uvedit_face_select_get_no_sync(const ToolSettings *ts,
120 const BMesh *bm,
121 const BMFace *f);
122
124 const BMesh *bm,
125 BMLoop *l,
126 bool select);
128 const BMesh *bm,
129 BMLoop *l,
130 bool select);
132 const BMesh *bm,
133 BMFace *f,
134 bool select);
135
136/* utility tool functions */
137
138void uvedit_live_unwrap_update(SpaceImage *sima, Scene *scene, Object *obedit);
139
140/* operators */
141
151void UV_OT_rip(wmOperatorType *ot);
155
156/* uvedit_copy_paste.cc */
157void UV_OT_copy(wmOperatorType *ot);
159
160/* `uvedit_path.cc` */
161
164
165/* `uvedit_select.cc` */
166
169
170void uvedit_select_prepare(const Scene *scene, BMesh *bm);
171
172bool uvedit_select_is_any_selected(const Scene *scene, BMesh *bm);
179 const BMesh *bm,
180 BMVert *eve,
181 const BMUVOffsets &offsets);
182
200
202
203/* Used only when UV sync select is disabled. */
205
214
215} // namespace blender
CustomData interface, see also DNA_customdata_types.h.
BMesh Iterators.
void UV_OT_paste(wmOperatorType *ot)
bool uv_find_nearest_vert(Scene *scene, Object *obedit, const float co[2], float penalty_dist, UvNearestHit *hit)
void uvedit_live_unwrap_update(SpaceImage *sima, Scene *scene, Object *obedit)
void UV_OT_minimize_stretch(wmOperatorType *ot)
void UV_OT_custom_region_set(wmOperatorType *ot)
bool uv_find_nearest_face_multi_ex(Scene *scene, Span< Object * > objects, const float co[2], UvNearestHit *hit, bool only_in_face)
void UV_OT_project_from_view(wmOperatorType *ot)
void UV_OT_copy(wmOperatorType *ot)
bool uvedit_vert_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
bool uv_stitch_selected_islands_for_original_bounds(const Scene *scene, Span< Object * > objects)
bool uv_find_nearest_face_multi(Scene *scene, Span< Object * > objects, const float co[2], UvNearestHit *hit)
void UV_OT_pack_islands(wmOperatorType *ot)
void UV_OT_select_linked(wmOperatorType *ot)
void UV_OT_shortest_path_select(wmOperatorType *ot)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
void uv_nearest_hit_elem_set_from_face(const float co[2], UvNearestHit *hit, short uv_selectmode)
void uvedit_select_prepare_custom_data(const Scene *scene, BMesh *bm)
void uvedit_vert_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
bool uvedit_select_is_any_selected_multi(const Scene *scene, Span< Object * > objects)
bool uvedit_edge_is_face_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void UV_OT_select_similar(wmOperatorType *ot)
void UV_OT_select_linked_pick(wmOperatorType *ot)
const float * uvedit_first_selected_uv_from_vertex(Scene *scene, const BMesh *bm, BMVert *eve, const BMUVOffsets &offsets)
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool uv_find_nearest_edge_multi(Scene *scene, Span< Object * > objects, const float co[2], float penalty, UvNearestHit *hit)
void UV_OT_rip(wmOperatorType *ot)
BMLoop * uv_find_nearest_loop_from_vert(Scene *scene, Object *obedit, BMVert *v, const float co[2])
void UV_OT_select_by_winding(wmOperatorType *ot)
void uvedit_select_prepare(const Scene *scene, BMesh *bm)
bool uv_find_nearest_vert_multi(Scene *scene, Span< Object * > objects, const float co[2], float penalty_dist, UvNearestHit *hit)
void UV_OT_sphere_project(wmOperatorType *ot)
bool uv_find_nearest_edge(Scene *scene, Object *obedit, const float co[2], float penalty, UvNearestHit *hit)
void UV_OT_select_circle(wmOperatorType *ot)
UvNearestHit uv_nearest_hit_init_dist_px(const View2D *v2d, float dist_px)
void uvedit_edge_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
bool uvedit_select_is_any_selected(const Scene *scene, BMesh *bm)
void UV_OT_select_mode(wmOperatorType *ot)
void UV_OT_select_loop(wmOperatorType *ot)
void UV_OT_select(wmOperatorType *ot)
BMLoop * uv_find_nearest_loop_from_edge(Scene *scene, Object *obedit, BMEdge *e, const float co[2])
void UV_OT_shortest_path_pick(wmOperatorType *ot)
bool uv_find_nearest_face_ex(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, bool only_in_face)
void UV_OT_unwrap(wmOperatorType *ot)
bool uvedit_vert_is_face_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void UV_OT_select_box(wmOperatorType *ot)
bool uvedit_vert_is_all_other_faces_selected(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
UvNearestHit uv_nearest_hit_init_max(const View2D *v2d)
bool uvedit_vert_is_edge_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
bool uv_find_nearest_face(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit)
void uvedit_face_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMFace *f, bool select)
void UV_OT_select_overlap(wmOperatorType *ot)
bool uvedit_edge_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
void UV_OT_select_edge_ring(wmOperatorType *ot)
void UV_OT_select_pinned(wmOperatorType *ot)
void UV_OT_select_tile(wmOperatorType *ot)
void UV_OT_cube_project(wmOperatorType *ot)
void UV_OT_average_islands_scale(wmOperatorType *ot)
void UV_OT_select_more(wmOperatorType *ot)
void UV_OT_cylinder_project(wmOperatorType *ot)
void UV_OT_select_all(wmOperatorType *ot)
UvNearestHit uv_nearest_hit_init_max_default()
void UV_OT_reset(wmOperatorType *ot)
void UV_OT_copy_mirrored_faces(wmOperatorType *ot)
void uvedit_select_prepare_sync_select(const Scene *scene, BMesh *bm)
void UV_OT_select_lasso(wmOperatorType *ot)
void UV_OT_select_split(wmOperatorType *ot)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
void UV_OT_smart_project(wmOperatorType *ot)
bool uvedit_face_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMFace *f)
void UV_OT_stitch(wmOperatorType *ot)
void UV_OT_select_less(wmOperatorType *ot)