Blender V5.3
bmesh_operators.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
12
13namespace blender {
14
15/* See comments in `intern/bmesh_opdefines.cc` for documentation of specific operators. */
16
17/*--------defines/enumerations for specific operators-------*/
18
19/* Quad `innervert` values. */
20
21enum {
26};
27
28/* aligned with PROP_SMOOTH and friends */
29enum {
35 SUBD_FALLOFF_INVSQUARE = 7, /* matching PROP_INVSQUARE */
36};
37
38enum {
43};
44
45/* subdivide_edgering */
46enum {
47 /* just subdiv */
49
50 /* single bezier spline - curve follows bezier rotation */
52
53 /* beziers based on adjacent faces (fallback to tangent) */
55};
56
57/* similar face selection slot values */
58enum {
67};
68
69/* similar edge selection slot values */
70enum {
80};
81
82/* similar vertex selection slot values */
83enum {
89};
90
91/* Poke face center calculation */
92enum {
96};
97
98/* Bevel offset_type slot values */
99enum {
105};
106
107/* Bevel profile type */
108enum {
111};
112
113/* Bevel face_strength_mode values: should match face_str mode enum in DNA_modifier_types.h */
114enum {
119};
120
121/* Bevel miter slot values */
122enum {
126};
127
128/* Bevel vertex mesh creation methods */
129enum {
132};
133
134/* Bevel affect option. */
135enum {
138};
139
140/* Normal Face Strength values */
141enum {
145};
146
152
158
167
168/* Interpolation method for fitting edge loops to a curve. */
173
174/* Curve elevation option. */
180
181/* Methods for determining the way to stretch vertices to an annotation. */
187
218
219extern const BMOpDefine *bmo_opdefines[];
220extern const int bmo_opdefines_total;
221
222/*------specific operator helper functions-------*/
223
224void BM_mesh_esubdivide(BMesh *bm,
225 char edge_hflag,
226 float smooth,
227 short smooth_falloff,
228 bool use_smooth_even,
229 float fractal,
230 float along_normal,
231 int numcuts,
232 int seltype,
233 int cornertype,
234 short use_single_edge,
235 short use_grid_fill,
236 short use_only_quads,
237 int seed);
238
248 BMesh *bm, uint x_segments, uint y_segments, short oflag, int cd_loop_uv_offset);
255void BM_mesh_calc_uvs_sphere(BMesh *bm, short oflag, int cd_loop_uv_offset);
265 BMesh *bm, float mat[4][4], float radius, short oflag, int cd_loop_uv_offset);
277void BM_mesh_calc_uvs_cone(BMesh *bm,
278 float mat[4][4],
279 float radius_top,
280 float radius_bottom,
281 int segments,
282 bool cap_ends,
283 short oflag,
284 int cd_loop_uv_offset);
294void BM_mesh_calc_uvs_cube(BMesh *bm, short oflag);
295
296} // namespace blender
297
298#include "intern/bmesh_operator_api_inline.hh" /* IWYU pragma: export */
#define smooth
BMesh Iterators.
@ BEVEL_FACE_STRENGTH_ALL
@ BEVEL_FACE_STRENGTH_NEW
@ BEVEL_FACE_STRENGTH_NONE
@ BEVEL_FACE_STRENGTH_AFFECTED
void BM_mesh_calc_uvs_cone(BMesh *bm, float mat[4][4], float radius_top, float radius_bottom, int segments, bool cap_ends, short oflag, int cd_loop_uv_offset)
unsigned int uint
Definition BKE_text.h:55
void BM_mesh_calc_uvs_grid(BMesh *bm, uint x_segments, uint y_segments, short oflag, int cd_loop_uv_offset)
@ SPACE_EDGE_LOOPS_EVENLY_INTERP_CUBIC
@ SPACE_EDGE_LOOPS_EVENLY_INTERP_LINEAR
@ RELAX_EDGE_LOOPS_INTERP_LINEAR
@ RELAX_EDGE_LOOPS_INTERP_CUBIC
@ SUBD_CORNER_STRAIGHT_CUT
@ SUBD_CORNER_INNERVERT
void BM_mesh_esubdivide(BMesh *bm, char edge_hflag, float smooth, short smooth_falloff, bool use_smooth_even, float fractal, float along_normal, int numcuts, int seltype, int cornertype, short use_single_edge, short use_grid_fill, short use_only_quads, int seed)
const int bmo_opdefines_total
@ SUBD_FALLOFF_INVSQUARE
@ CURVE_CLAMP_ELEVATION_RAISE
@ CURVE_CLAMP_ELEVATION_LOWER
@ CURVE_CLAMP_ELEVATION_NONE
void BM_mesh_calc_uvs_circle(BMesh *bm, float mat[4][4], float radius, short oflag, int cd_loop_uv_offset)
const BMOpDefine * bmo_opdefines[]
@ TO_ANNOTATION_SPREAD_EVENLY
@ SUBD_RING_INTERP_SURF
@ SUBD_RING_INTERP_PATH
@ SUBD_RING_INTERP_LINEAR
@ BEVEL_PROFILE_SUPERELLIPSE
@ QUADSPHERE_METHOD_EQUI_ANGULAR
@ QUADSPHERE_METHOD_EQUI_ANGULAR_EVEN_AREA
ATTR_WARN_UNUSED_RESULT const BMFlagLayer const short oflag
void BM_mesh_calc_uvs_sphere(BMesh *bm, short oflag, int cd_loop_uv_offset)
void BM_mesh_calc_uvs_cube(BMesh *bm, short oflag)
@ SUBDIV_SELECT_LOOPCUT
@ BMOP_POKE_MEDIAN_WEIGHTED