Blender V4.3
MOD_bevel.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2005 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include <algorithm>
10
11#include "MEM_guardedalloc.h"
12
13#include "BLI_math_vector.h"
14#include "BLI_string.h"
15#include "BLI_utildefines.h"
16
17#include "BLT_translation.hh"
18
20#include "DNA_defaults.h"
21#include "DNA_object_types.h"
22#include "DNA_screen_types.h"
23
24#include "BKE_attribute.hh"
25#include "BKE_curveprofile.h"
26#include "BKE_deform.hh"
27#include "BKE_mesh.hh"
28#include "BKE_modifier.hh"
29
30#include "UI_interface.hh"
31#include "UI_resources.hh"
32
33#include "RNA_access.hh"
34#include "RNA_define.hh"
35#include "RNA_prototypes.hh"
36
37#include "MOD_ui_common.hh"
38#include "MOD_util.hh"
39
40#include "BLO_read_write.hh"
41
42#include "GEO_randomize.hh"
43
44#include "bmesh.hh"
45#include "bmesh_tools.hh"
46
57
58static void copy_data(const ModifierData *md_src, ModifierData *md_dst, const int flag)
59{
60 const BevelModifierData *bmd_src = (const BevelModifierData *)md_src;
61 BevelModifierData *bmd_dst = (BevelModifierData *)md_dst;
62
63 BKE_modifier_copydata_generic(md_src, md_dst, flag);
65}
66
67static void required_data_mask(ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
68{
70
71 /* Ask for vertex-groups if we need them. */
72 if (bmd->defgrp_name[0] != '\0') {
73 r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
74 }
75}
76
77static std::string ensure_weight_attribute_meta_data(Mesh &mesh,
78 const blender::StringRef name,
79 const blender::bke::AttrDomain domain,
80 bool &r_attr_converted)
81{
82 using namespace blender;
84 return "";
85 }
86 bke::MutableAttributeAccessor attributes = mesh.attributes_for_write();
87 const std::optional<bke::AttributeMetaData> meta_data = attributes.lookup_meta_data(name);
88 if (!meta_data) {
89 r_attr_converted = false;
90 return name;
91 }
92 if (meta_data->domain == domain && meta_data->data_type == CD_PROP_FLOAT) {
93 r_attr_converted = false;
94 return name;
95 }
96
97 Array<float> weight(attributes.domain_size(domain));
98 attributes.lookup<float>(name, domain).varray.materialize(weight);
99 const std::string new_name = BKE_attribute_calc_unique_name(AttributeOwner::from_id(&mesh.id),
100 name);
101 attributes.add<float>(
102 new_name, domain, bke::AttributeInitVArray(VArray<float>::ForSpan(weight)));
103 r_attr_converted = true;
104 return new_name;
105}
106
107/*
108 * This calls the new bevel code (added since 2.64)
109 */
110static Mesh *modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh)
111{
112 using namespace blender;
113 Mesh *result;
114 BMesh *bm;
115 BMIter iter;
116 BMEdge *e;
117 BMVert *v;
118 float weight, weight2;
119 int vgroup = -1;
120 const MDeformVert *dvert = nullptr;
122 const float threshold = cosf(bmd->bevel_angle + 0.000000175f);
123 const bool do_clamp = !(bmd->flags & MOD_BEVEL_OVERLAP_OK);
124 const int offset_type = bmd->val_flags;
125 const int profile_type = bmd->profile_type;
126 const float value = bmd->value;
127 const int mat = std::clamp(int(bmd->mat), -1, ctx->object->totcol - 1);
128 const bool loop_slide = (bmd->flags & MOD_BEVEL_EVEN_WIDTHS) == 0;
129 const bool mark_seam = (bmd->edge_flags & MOD_BEVEL_MARK_SEAM);
130 const bool mark_sharp = (bmd->edge_flags & MOD_BEVEL_MARK_SHARP);
131 bool harden_normals = (bmd->flags & MOD_BEVEL_HARDEN_NORMALS);
132 const int face_strength_mode = bmd->face_str_mode;
133 const int miter_outer = bmd->miter_outer;
134 const int miter_inner = bmd->miter_inner;
135 const float spread = bmd->spread;
136 const bool invert_vgroup = (bmd->flags & MOD_BEVEL_INVERT_VGROUP) != 0;
137
138 BMeshCreateParams create_params{};
139 BMeshFromMeshParams convert_params{};
140 convert_params.calc_face_normal = true;
141 convert_params.calc_vert_normal = true;
142 convert_params.add_key_index = false;
143 convert_params.use_shapekey = false;
144 convert_params.active_shapekey = 0;
145 convert_params.cd_mask_extra.vmask = CD_MASK_ORIGINDEX;
146 convert_params.cd_mask_extra.emask = CD_MASK_ORIGINDEX;
147 convert_params.cd_mask_extra.pmask = CD_MASK_ORIGINDEX;
148
149 bool vert_weight_converted;
150 const std::string vert_weight_name = ensure_weight_attribute_meta_data(
151 *mesh, bmd->vertex_weight_name, bke::AttrDomain::Point, vert_weight_converted);
152 bool edge_weight_converted;
153 const std::string edge_weight_name = ensure_weight_attribute_meta_data(
154 *mesh, bmd->edge_weight_name, bke::AttrDomain::Edge, edge_weight_converted);
155
156 bm = BKE_mesh_to_bmesh_ex(mesh, &create_params, &convert_params);
157
158 if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) {
159 MOD_get_vgroup(ctx->object, mesh, bmd->defgrp_name, &dvert, &vgroup);
160 }
161
162 const int bweight_offset_vert = CustomData_get_offset_named(
163 &bm->vdata, CD_PROP_FLOAT, vert_weight_name);
164 const int bweight_offset_edge = CustomData_get_offset_named(
165 &bm->edata, CD_PROP_FLOAT, edge_weight_name);
166
168 BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
169 if (bmd->lim_flags & MOD_BEVEL_WEIGHT) {
170 weight = bweight_offset_vert == -1 ? 0.0f : BM_ELEM_CD_GET_FLOAT(v, bweight_offset_vert);
171 if (weight == 0.0f) {
172 continue;
173 }
174 }
175 else if (vgroup != -1) {
176 weight = invert_vgroup ?
177 1.0f -
180 /* Check is against 0.5 rather than != 0.0 because cascaded bevel modifiers will
181 * interpolate weights for newly created vertices, and may cause unexpected "selection" */
182 if (weight < 0.5f) {
183 continue;
184 }
185 }
187 }
188 }
189 else if (bmd->lim_flags & MOD_BEVEL_ANGLE) {
190 BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
191 /* check for 1 edge having 2 face users */
192 BMLoop *l_a, *l_b;
193 if (BM_edge_loop_pair(e, &l_a, &l_b)) {
194 if (dot_v3v3(l_a->f->no, l_b->f->no) < threshold) {
198 }
199 }
200 }
201 }
202 else {
203 /* crummy, is there a way just to operator on all? - campbell */
204 BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
205 if (BM_edge_is_manifold(e)) {
206 if (bmd->lim_flags & MOD_BEVEL_WEIGHT) {
207 weight = bweight_offset_edge == -1 ? 0.0f : BM_ELEM_CD_GET_FLOAT(e, bweight_offset_edge);
208 if (weight == 0.0f) {
209 continue;
210 }
211 }
212 else if (vgroup != -1) {
213 weight = invert_vgroup ?
215 dvert, BM_elem_index_get(e->v1), vgroup) :
217 weight2 = invert_vgroup ? 1.0f - BKE_defvert_array_find_weight_safe(
218 dvert, BM_elem_index_get(e->v2), vgroup) :
220 dvert, BM_elem_index_get(e->v2), vgroup);
221 if (weight < 0.5f || weight2 < 0.5f) {
222 continue;
223 }
224 }
228 }
229 }
230 }
231
233 value,
234 offset_type,
235 profile_type,
236 bmd->res,
237 bmd->profile,
238 bmd->affect_type,
240 do_clamp,
241 dvert,
242 vgroup,
243 mat,
244 loop_slide,
245 mark_seam,
246 mark_sharp,
247 harden_normals,
248 face_strength_mode,
249 miter_outer,
250 miter_inner,
251 spread,
252 bmd->custom_profile,
253 bmd->vmesh_method,
254 bweight_offset_vert,
255 bweight_offset_edge);
256
257 result = BKE_mesh_from_bmesh_for_eval_nomain(bm, nullptr, mesh);
258
259 /* Make sure we never allocated these. */
260 BLI_assert(bm->vtoolflagpool == nullptr && bm->etoolflagpool == nullptr &&
261 bm->ftoolflagpool == nullptr);
262
264
265 if (vert_weight_converted) {
266 result->attributes_for_write().remove(vert_weight_name);
267 }
268 if (edge_weight_converted) {
269 result->attributes_for_write().remove(edge_weight_name);
270 }
271
273
274 return result;
275}
276
282
283static bool is_disabled(const Scene * /*scene*/, ModifierData *md, bool /*use_render_params*/)
284{
286 return (bmd->value == 0.0f);
287}
288
289static void panel_draw(const bContext * /*C*/, Panel *panel)
290{
291 uiLayout *col, *sub;
292 uiLayout *layout = panel->layout;
293
294 PointerRNA ob_ptr;
296
297 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
298
299 uiItemR(layout, ptr, "affect", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
300
301 uiLayoutSetPropSep(layout, true);
302
303 col = uiLayoutColumn(layout, false);
304 uiItemR(col, ptr, "offset_type", UI_ITEM_NONE, nullptr, ICON_NONE);
305 if (RNA_enum_get(ptr, "offset_type") == BEVEL_AMT_PERCENT) {
306 uiItemR(col, ptr, "width_pct", UI_ITEM_NONE, nullptr, ICON_NONE);
307 }
308 else {
309 uiItemR(col, ptr, "width", UI_ITEM_NONE, IFACE_("Amount"), ICON_NONE);
310 }
311
312 uiItemR(layout, ptr, "segments", UI_ITEM_NONE, nullptr, ICON_NONE);
313
314 uiItemS(layout);
315
316 col = uiLayoutColumn(layout, false);
317 uiItemR(col, ptr, "limit_method", UI_ITEM_NONE, nullptr, ICON_NONE);
318 int limit_method = RNA_enum_get(ptr, "limit_method");
319 if (limit_method == MOD_BEVEL_ANGLE) {
320 sub = uiLayoutColumn(col, false);
321 uiLayoutSetActive(sub, edge_bevel);
322 uiItemR(col, ptr, "angle_limit", UI_ITEM_NONE, nullptr, ICON_NONE);
323 }
324 else if (limit_method == MOD_BEVEL_WEIGHT) {
325 const char *prop_name = edge_bevel ? "edge_weight" : "vertex_weight";
326 uiItemR(col, ptr, prop_name, UI_ITEM_NONE, nullptr, ICON_NONE);
327 }
328 else if (limit_method == MOD_BEVEL_VGROUP) {
329 modifier_vgroup_ui(col, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", nullptr);
330 }
331
332 modifier_panel_end(layout, ptr);
333}
334
335static void profile_panel_draw(const bContext * /*C*/, Panel *panel)
336{
337 uiLayout *row;
338 uiLayout *layout = panel->layout;
339
341
342 int profile_type = RNA_enum_get(ptr, "profile_type");
343 int miter_inner = RNA_enum_get(ptr, "miter_inner");
344 int miter_outer = RNA_enum_get(ptr, "miter_outer");
345 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
346
347 uiItemR(layout, ptr, "profile_type", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
348
349 uiLayoutSetPropSep(layout, true);
350
352 row = uiLayoutRow(layout, false);
354 row,
355 profile_type == MOD_BEVEL_PROFILE_SUPERELLIPSE ||
356 (profile_type == MOD_BEVEL_PROFILE_CUSTOM && edge_bevel &&
357 !((miter_inner == MOD_BEVEL_MITER_SHARP) && (miter_outer == MOD_BEVEL_MITER_SHARP))));
358 uiItemR(row,
359 ptr,
360 "profile",
362 (profile_type == MOD_BEVEL_PROFILE_SUPERELLIPSE) ? IFACE_("Shape") :
363 IFACE_("Miter Shape"),
364 ICON_NONE);
365
366 if (profile_type == MOD_BEVEL_PROFILE_CUSTOM) {
367 uiLayout *sub = uiLayoutColumn(layout, false);
368 uiLayoutSetPropDecorate(sub, false);
369 uiTemplateCurveProfile(sub, ptr, "custom_profile");
370 }
371 }
372}
373
374static void geometry_panel_draw(const bContext * /*C*/, Panel *panel)
375{
376 uiLayout *row;
377 uiLayout *layout = panel->layout;
378
380
381 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
382
383 uiLayoutSetPropSep(layout, true);
384
385 row = uiLayoutRow(layout, false);
386 uiLayoutSetActive(row, edge_bevel);
387 uiItemR(row, ptr, "miter_outer", UI_ITEM_NONE, IFACE_("Miter Outer"), ICON_NONE);
388 row = uiLayoutRow(layout, false);
389 uiLayoutSetActive(row, edge_bevel);
390 uiItemR(row, ptr, "miter_inner", UI_ITEM_NONE, IFACE_("Inner"), ICON_NONE);
391 if (RNA_enum_get(ptr, "miter_inner") == BEVEL_MITER_ARC) {
392 row = uiLayoutRow(layout, false);
393 uiLayoutSetActive(row, edge_bevel);
394 uiItemR(row, ptr, "spread", UI_ITEM_NONE, nullptr, ICON_NONE);
395 }
396 uiItemS(layout);
397
398 row = uiLayoutRow(layout, false);
399 uiLayoutSetActive(row, edge_bevel);
400 uiItemR(row, ptr, "vmesh_method", UI_ITEM_NONE, IFACE_("Intersections"), ICON_NONE);
401 uiItemR(layout, ptr, "use_clamp_overlap", UI_ITEM_NONE, nullptr, ICON_NONE);
402 row = uiLayoutRow(layout, false);
403 uiLayoutSetActive(row, edge_bevel);
404 uiItemR(row, ptr, "loop_slide", UI_ITEM_NONE, nullptr, ICON_NONE);
405}
406
407static void shading_panel_draw(const bContext * /*C*/, Panel *panel)
408{
409 uiLayout *col;
410 uiLayout *layout = panel->layout;
411
413
414 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
415
416 uiLayoutSetPropSep(layout, true);
417
418 uiItemR(layout, ptr, "harden_normals", UI_ITEM_NONE, nullptr, ICON_NONE);
419
420 col = uiLayoutColumnWithHeading(layout, true, IFACE_("Mark"));
421 uiLayoutSetActive(col, edge_bevel);
422 uiItemR(col, ptr, "mark_seam", UI_ITEM_NONE, IFACE_("Seam"), ICON_NONE);
423 uiItemR(col, ptr, "mark_sharp", UI_ITEM_NONE, IFACE_("Sharp"), ICON_NONE);
424
425 uiItemR(layout, ptr, "material", UI_ITEM_NONE, nullptr, ICON_NONE);
426 uiItemR(layout, ptr, "face_strength_mode", UI_ITEM_NONE, nullptr, ICON_NONE);
427}
428
429static void panel_register(ARegionType *region_type)
430{
433 region_type, "profile", "Profile", nullptr, profile_panel_draw, panel_type);
435 region_type, "geometry", "Geometry", nullptr, geometry_panel_draw, panel_type);
437 region_type, "shading", "Shading", nullptr, shading_panel_draw, panel_type);
438}
439
440static void blend_write(BlendWriter *writer, const ID * /*id_owner*/, const ModifierData *md)
441{
442 const BevelModifierData *bmd = (const BevelModifierData *)md;
443
445
446 if (bmd->custom_profile) {
448 }
449}
450
451static void blend_read(BlendDataReader *reader, ModifierData *md)
452{
454
456 if (bmd->custom_profile) {
458 }
459}
460
462 /*idname*/ "Bevel",
463 /*name*/ N_("Bevel"),
464 /*struct_name*/ "BevelModifierData",
465 /*struct_size*/ sizeof(BevelModifierData),
466 /*srna*/ &RNA_BevelModifier,
470 /*icon*/ ICON_MOD_BEVEL,
471 /*copy_data*/ copy_data,
472 /*deform_verts*/ nullptr,
473 /*deform_matrices*/ nullptr,
474 /*deform_verts_EM*/ nullptr,
475 /*deform_matrices_EM*/ nullptr,
476 /*modify_mesh*/ modify_mesh,
477 /*modify_geometry_set*/ nullptr,
478 /*init_data*/ init_data,
479 /*required_data_mask*/ required_data_mask,
480 /*free_data*/ free_data,
481 /*is_disabled*/ is_disabled,
482 /*update_depsgraph*/ nullptr,
483 /*depends_on_time*/ nullptr,
484 /*depends_on_normals*/ nullptr,
485 /*foreach_ID_link*/ nullptr,
486 /*foreach_tex_link*/ nullptr,
487 /*free_runtime_data*/ nullptr,
488 /*panel_register*/ panel_register,
489 /*blend_write*/ blend_write,
490 /*blend_read*/ blend_read,
491 /*foreach_cache*/ nullptr,
492};
std::string BKE_attribute_calc_unique_name(const AttributeOwner &owner, const blender::StringRef name)
Definition attribute.cc:359
struct CurveProfile * BKE_curveprofile_copy(const struct CurveProfile *profile)
void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile)
struct CurveProfile * BKE_curveprofile_add(eCurveProfilePresets preset)
void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile)
void BKE_curveprofile_free(struct CurveProfile *profile)
int CustomData_get_offset_named(const CustomData *data, eCustomDataType type, blender::StringRef name)
support for deformation groups and hooks.
float BKE_defvert_array_find_weight_safe(const MDeformVert *dvert, int index, int defgroup)
Definition deform.cc:776
Mesh * BKE_mesh_from_bmesh_for_eval_nomain(BMesh *bm, const CustomData_MeshMasks *cd_mask_extra, const Mesh *me_settings)
BMesh * BKE_mesh_to_bmesh_ex(const Mesh *mesh, const BMeshCreateParams *create_params, const BMeshFromMeshParams *convert_params)
void BKE_modifier_copydata_generic(const ModifierData *md, ModifierData *md_dst, int flag)
@ eModifierTypeFlag_AcceptsCVs
@ eModifierTypeFlag_EnableInEditmode
@ eModifierTypeFlag_SupportsEditmode
@ eModifierTypeFlag_AcceptsMesh
#define BLI_assert(a)
Definition BLI_assert.h:50
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
#define ELEM(...)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_read_struct(reader, struct_name, ptr_p)
#define IFACE_(msgid)
@ PROF_PRESET_LINE
#define CD_MASK_ORIGINDEX
#define CD_MASK_MDEFORMVERT
@ CD_PROP_FLOAT
#define DNA_struct_default_get(struct_name)
@ MOD_BEVEL_HARDEN_NORMALS
@ MOD_BEVEL_INVERT_VGROUP
@ MOD_BEVEL_WEIGHT
@ MOD_BEVEL_OVERLAP_OK
@ MOD_BEVEL_VGROUP
@ MOD_BEVEL_EVEN_WIDTHS
@ MOD_BEVEL_ANGLE
@ MOD_BEVEL_MITER_SHARP
struct BevelModifierData BevelModifierData
@ MOD_BEVEL_MARK_SHARP
@ MOD_BEVEL_MARK_SEAM
@ MOD_BEVEL_AFFECT_VERTICES
@ eModifierType_Bevel
@ MOD_BEVEL_PROFILE_CUSTOM
@ MOD_BEVEL_PROFILE_SUPERELLIPSE
Object is a sort of wrapper for general info.
static bool is_disabled
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
Definition MOD_bevel.cc:47
static void panel_register(ARegionType *region_type)
Definition MOD_bevel.cc:429
static void geometry_panel_draw(const bContext *, Panel *panel)
Definition MOD_bevel.cc:374
static std::string ensure_weight_attribute_meta_data(Mesh &mesh, const blender::StringRef name, const blender::bke::AttrDomain domain, bool &r_attr_converted)
Definition MOD_bevel.cc:77
static void shading_panel_draw(const bContext *, Panel *panel)
Definition MOD_bevel.cc:407
static void copy_data(const ModifierData *md_src, ModifierData *md_dst, const int flag)
Definition MOD_bevel.cc:58
static Mesh * modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh)
Definition MOD_bevel.cc:110
static void free_data(ModifierData *md)
Definition MOD_bevel.cc:277
static void blend_read(BlendDataReader *reader, ModifierData *md)
Definition MOD_bevel.cc:451
static void profile_panel_draw(const bContext *, Panel *panel)
Definition MOD_bevel.cc:335
static void panel_draw(const bContext *, Panel *panel)
Definition MOD_bevel.cc:289
static void required_data_mask(ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
Definition MOD_bevel.cc:67
static void blend_write(BlendWriter *writer, const ID *, const ModifierData *md)
Definition MOD_bevel.cc:440
ModifierTypeInfo modifierType_Bevel
Definition MOD_bevel.cc:461
PanelType * modifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
void modifier_panel_end(uiLayout *layout, PointerRNA *ptr)
PanelType * modifier_panel_register(ARegionType *region_type, ModifierType type, PanelDrawFn draw)
PointerRNA * modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr)
void modifier_vgroup_ui(uiLayout *layout, PointerRNA *ptr, PointerRNA *ob_ptr, const char *vgroup_prop, const char *invert_vgroup_prop, const char *text)
void MOD_get_vgroup(const Object *ob, const Mesh *mesh, const char *name, const MDeformVert **dvert, int *defgrp_index)
Definition MOD_util.cc:159
void uiLayoutSetActive(uiLayout *layout, bool active)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiItemS(uiLayout *layout)
#define UI_ITEM_NONE
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiTemplateCurveProfile(uiLayout *layout, PointerRNA *ptr, const char *propname)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
@ UI_ITEM_R_EXPAND
@ UI_ITEM_R_SLIDER
void BM_mesh_bevel(BMesh *bm, const float offset, const int offset_type, const int profile_type, const int segments, const float profile, const bool affect_type, const bool use_weights, const bool limit_offset, const MDeformVert *dvert, const int vertex_group, const int mat, const bool loop_slide, const bool mark_seam, const bool mark_sharp, const bool harden_normals, const int face_strength_mode, const int miter_outer, const int miter_inner, const float spread, const CurveProfile *custom_profile, const int vmesh_method, const int bweight_offset_vert, const int bweight_offset_edge)
#define BM_ELEM_CD_GET_FLOAT(ele, offset)
@ BM_ELEM_TAG
#define BM_elem_index_get(ele)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
@ BM_EDGES_OF_MESH
@ BM_VERTS_OF_MESH
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
@ BEVEL_AMT_PERCENT
@ BEVEL_MITER_ARC
bool BM_edge_loop_pair(BMEdge *e, BMLoop **r_la, BMLoop **r_lb)
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMLoop * l_b
ATTR_WARN_UNUSED_RESULT const BMVert * v
static AttributeOwner from_id(ID *id)
Definition attribute.cc:43
std::optional< AttributeMetaData > lookup_meta_data(const StringRef attribute_id) const
#define cosf(x)
uint col
bool allow_procedural_attribute_access(StringRef attribute_name)
void debug_randomize_mesh_order(Mesh *mesh)
Definition randomize.cc:220
int RNA_enum_get(PointerRNA *ptr, const char *name)
float no[3]
struct BMFace * f
CustomData vdata
struct BLI_mempool * vtoolflagpool
CustomData edata
struct BLI_mempool * etoolflagpool
struct BLI_mempool * ftoolflagpool
struct CurveProfile * custom_profile
Definition DNA_ID.h:413
struct uiLayout * layout
#define N_(msgid)
PointerRNA * ptr
Definition wm_files.cc:4126
uint8_t flag
Definition wm_window.cc:138