Blender V5.0
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
13struct BMVert;
14struct BMEdge;
15struct BMFace;
16struct BMLoop;
17struct Object;
18struct Scene;
19struct SpaceImage;
20struct ToolSettings;
21struct wmOperatorType;
22struct View2D;
23
24/* find nearest */
25
38 float dist_sq;
39
41 float scale[2];
42};
43
44UvNearestHit uv_nearest_hit_init_dist_px(const View2D *v2d, float dist_px);
47
49 Scene *scene, Object *obedit, const float co[2], float penalty_dist, UvNearestHit *hit);
52 const float co[2],
53 float penalty_dist,
54 UvNearestHit *hit);
55
57 Scene *scene, Object *obedit, const float co[2], float penalty, UvNearestHit *hit);
60 const float co[2],
61 float penalty,
62 UvNearestHit *hit);
63
74 Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, bool only_in_face);
75bool uv_find_nearest_face(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit);
78 const float co[2],
79 UvNearestHit *hit,
80 bool only_in_face);
83 const float co[2],
84 UvNearestHit *hit);
85
86BMLoop *uv_find_nearest_loop_from_vert(Scene *scene, Object *obedit, BMVert *v, const float co[2]);
87BMLoop *uv_find_nearest_loop_from_edge(Scene *scene, Object *obedit, BMEdge *e, const float co[2]);
88
90 const BMesh *bm,
91 const BMLoop *l,
92 const BMUVOffsets &offsets);
94 const BMesh *bm,
95 const BMLoop *l,
96 const BMUVOffsets &offsets);
98 const BMesh *bm,
99 const BMLoop *l,
100 const BMUVOffsets &offsets);
101
103 const BMesh *bm,
104 const BMLoop *l,
105 const BMUVOffsets &offsets);
106
107[[nodiscard]] bool uvedit_vert_select_get_no_sync(const ToolSettings *ts,
108 const BMesh *bm,
109 const BMLoop *l);
110[[nodiscard]] bool uvedit_edge_select_get_no_sync(const ToolSettings *ts,
111 const BMesh *bm,
112 const BMLoop *l);
113[[nodiscard]] bool uvedit_face_select_get_no_sync(const ToolSettings *ts,
114 const BMesh *bm,
115 const BMFace *f);
116
118 const BMesh *bm,
119 BMLoop *l,
120 bool select);
122 const BMesh *bm,
123 BMLoop *l,
124 bool select);
126 const BMesh *bm,
127 BMFace *f,
128 bool select);
129
130/* utility tool functions */
131
132void uvedit_live_unwrap_update(SpaceImage *sima, Scene *scene, Object *obedit);
133
134/* operators */
135
149
150/* uvedit_copy_paste.cc */
153
154/* `uvedit_path.cc` */
155
158
159/* `uvedit_select.cc` */
160
163
164void uvedit_select_prepare_UNUSED(const Scene *scene, BMesh *bm);
165
166bool uvedit_select_is_any_selected(const Scene *scene, BMesh *bm);
173 const BMesh *bm,
174 BMVert *eve,
175 const BMUVOffsets &offsets);
176
193
194/* Used only when UV sync select is disabled. */
CustomData interface, see also DNA_customdata_types.h.
BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
#define select(A, B, C)
bool uv_find_nearest_vert_multi(Scene *scene, blender::Span< Object * > objects, const float co[2], float penalty_dist, UvNearestHit *hit)
void UV_OT_select_all(wmOperatorType *ot)
void UV_OT_select_edge_ring(wmOperatorType *ot)
bool uvedit_vert_is_edge_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void UV_OT_copy(wmOperatorType *ot)
void uvedit_face_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMFace *f, bool select)
bool uvedit_vert_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
void UV_OT_copy_mirrored_faces(wmOperatorType *ot)
void UV_OT_select(wmOperatorType *ot)
void uvedit_select_prepare_sync_select(const Scene *scene, BMesh *bm)
bool uv_find_nearest_face_multi(Scene *scene, blender::Span< Object * > objects, const float co[2], UvNearestHit *hit)
void UV_OT_select_split(wmOperatorType *ot)
void UV_OT_shortest_path_pick(wmOperatorType *ot)
void UV_OT_select_linked(wmOperatorType *ot)
void UV_OT_stitch(wmOperatorType *ot)
bool uvedit_select_is_any_selected_multi(const Scene *scene, blender::Span< Object * > objects)
const float * uvedit_first_selected_uv_from_vertex(Scene *scene, const BMesh *bm, BMVert *eve, const BMUVOffsets &offsets)
bool uvedit_vert_is_face_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void uvedit_select_prepare_UNUSED(const Scene *scene, BMesh *bm)
void UV_OT_cylinder_project(wmOperatorType *ot)
void UV_OT_project_from_view(wmOperatorType *ot)
void UV_OT_smart_project(wmOperatorType *ot)
void UV_OT_unwrap(wmOperatorType *ot)
void UV_OT_select_circle(wmOperatorType *ot)
bool uv_find_nearest_vert(Scene *scene, Object *obedit, const float co[2], float penalty_dist, UvNearestHit *hit)
UvNearestHit uv_nearest_hit_init_max_default()
void UV_OT_select_mode(wmOperatorType *ot)
UvNearestHit uv_nearest_hit_init_max(const View2D *v2d)
void UV_OT_select_similar(wmOperatorType *ot)
bool uvedit_face_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMFace *f)
void UV_OT_sphere_project(wmOperatorType *ot)
bool uvedit_edge_is_face_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void UV_OT_rip(wmOperatorType *ot)
void UV_OT_select_linked_pick(wmOperatorType *ot)
void UV_OT_custom_region_set(wmOperatorType *ot)
void UV_OT_select_more(wmOperatorType *ot)
BMLoop * uv_find_nearest_loop_from_edge(Scene *scene, Object *obedit, BMEdge *e, const float co[2])
void UV_OT_cube_project(wmOperatorType *ot)
void UV_OT_select_pinned(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_select_loop(wmOperatorType *ot)
bool uv_find_nearest_face(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit)
UvNearestHit uv_nearest_hit_init_dist_px(const View2D *v2d, float dist_px)
bool uvedit_vert_is_all_other_faces_selected(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void uvedit_live_unwrap_update(SpaceImage *sima, Scene *scene, Object *obedit)
void UV_OT_shortest_path_select(wmOperatorType *ot)
void uvedit_edge_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
void UV_OT_average_islands_scale(wmOperatorType *ot)
BMLoop * uv_find_nearest_loop_from_vert(Scene *scene, Object *obedit, BMVert *v, const float co[2])
void UV_OT_reset(wmOperatorType *ot)
void UV_OT_select_overlap(wmOperatorType *ot)
void UV_OT_minimize_stretch(wmOperatorType *ot)
bool uvedit_edge_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
void UV_OT_select_lasso(wmOperatorType *ot)
bool uvedit_select_is_any_selected(const Scene *scene, BMesh *bm)
void uvedit_select_prepare_custom_data(const Scene *scene, BMesh *bm)
bool uv_find_nearest_edge_multi(Scene *scene, blender::Span< Object * > objects, const float co[2], float penalty, UvNearestHit *hit)
void uvedit_vert_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
void UV_OT_paste(wmOperatorType *ot)
void UV_OT_pack_islands(wmOperatorType *ot)
void UV_OT_select_less(wmOperatorType *ot)
bool uv_find_nearest_edge(Scene *scene, Object *obedit, const float co[2], float penalty, UvNearestHit *hit)
void UV_OT_select_box(wmOperatorType *ot)
bool uv_find_nearest_face_multi_ex(Scene *scene, blender::Span< Object * > objects, const float co[2], UvNearestHit *hit, bool only_in_face)
wmOperatorType * ot
Definition wm_files.cc:4237