Blender V5.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
8
9#include <algorithm>
10
11#include "BLI_math_vector_c.hh"
12#include "BLI_utildefines.hh"
13
14#include "BLT_translation.hh"
15
17#include "DNA_object_types.h"
18#include "DNA_screen_types.h"
19
20#include "BKE_attribute.h"
21#include "BKE_attribute.hh"
22#include "BKE_curveprofile.h"
23#include "BKE_deform.hh"
24#include "BKE_mesh.hh"
25#include "BKE_modifier.hh"
26
27#include "UI_interface.hh"
29#include "UI_resources.hh"
30
31#include "RNA_access.hh"
32#include "RNA_define.hh"
33#include "RNA_prototypes.hh"
34
35#include "MOD_ui_common.hh"
36#include "MOD_util.hh"
37
38#include "BLO_read_write.hh"
39
40#include "GEO_randomize.hh"
41
42#include "bmesh.hh"
43#include "bmesh_tools.hh"
44
45// #define DEBUG_TIME
46#ifdef DEBUG_TIME
47# include "BLI_timeit.hh"
48#endif
49
50namespace blender {
51
52static void init_data(ModifierData *md)
53{
54 BevelModifierData *bmd = reinterpret_cast<BevelModifierData *>(md);
56
58}
59
60static void copy_data(const ModifierData *md_src, ModifierData *md_dst, const int flag)
61{
62 const BevelModifierData *bmd_src = reinterpret_cast<const BevelModifierData *>(md_src);
63 BevelModifierData *bmd_dst = reinterpret_cast<BevelModifierData *>(md_dst);
64
65 BKE_modifier_copydata_generic(md_src, md_dst, flag);
67}
68
69static void required_data_mask(ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
70{
71 BevelModifierData *bmd = reinterpret_cast<BevelModifierData *>(md);
72
73 /* Ask for vertex-groups if we need them. */
74 if (bmd->defgrp_name[0] != '\0') {
75 r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
76 }
77}
78
80 const StringRef name,
81 const bke::AttrDomain domain,
82 bool &r_attr_converted)
83{
85 return "";
86 }
87 bke::MutableAttributeAccessor attributes = mesh.attributes_for_write();
88 const std::optional<bke::AttributeMetaData> meta_data = attributes.lookup_meta_data(name);
89 if (!meta_data) {
90 r_attr_converted = false;
91 return name;
92 }
93 if (meta_data->domain == domain && meta_data->data_type == bke::AttrType::Float) {
94 r_attr_converted = false;
95 return name;
96 }
97
98 Array<float> weight(attributes.domain_size(domain));
99 attributes.lookup<float>(name, domain).varray.materialize(weight);
100 const std::string new_name = BKE_attribute_calc_unique_name(AttributeOwner::from_id(&mesh.id),
101 name);
102 attributes.add<float>(
103 new_name, domain, bke::AttributeInitVArray(VArray<float>::from_span(weight)));
104 r_attr_converted = true;
105 return new_name;
106}
107
108/*
109 * This calls the new bevel code (added since 2.64)
110 */
112{
113 if (mesh->verts_num == 0) {
114 return mesh;
115 }
116#ifdef DEBUG_TIME
117 printf("BEVEL MODIFIER starts\n");
118 const timeit::TimePoint start_time = timeit::Clock::now();
119#endif
120 Mesh *result;
121 BMesh *bm;
122 BMIter iter;
123 BMEdge *e;
124 BMVert *v;
125 float weight, weight2;
126 int vgroup = -1;
127 const MDeformVert *dvert = nullptr;
128 BevelModifierData *bmd = reinterpret_cast<BevelModifierData *>(md);
129 const float threshold = cosf(bmd->bevel_angle + 0.000000175f);
130 const bool do_clamp = !(bmd->flags & MOD_BEVEL_OVERLAP_OK);
131 const int offset_type = bmd->val_flags;
132 const int profile_type = bmd->profile_type;
133 const float value = bmd->value;
134 const int mat = std::clamp(int(bmd->mat), -1, ctx->object->totcol - 1);
135 const bool loop_slide = (bmd->flags & MOD_BEVEL_EVEN_WIDTHS) == 0;
136 const bool mark_seam = (bmd->edge_flags & MOD_BEVEL_MARK_SEAM);
137 const bool mark_sharp = (bmd->edge_flags & MOD_BEVEL_MARK_SHARP);
138 bool harden_normals = (bmd->flags & MOD_BEVEL_HARDEN_NORMALS);
139 const int face_strength_mode = bmd->face_str_mode;
140 const int miter_outer = bmd->miter_outer;
141 const int miter_inner = bmd->miter_inner;
142 const float spread = bmd->spread;
143 const bool invert_vgroup = (bmd->flags & MOD_BEVEL_INVERT_VGROUP) != 0;
144
145 BMeshCreateParams create_params{};
146 BMeshFromMeshParams convert_params{};
147 convert_params.calc_face_normal = true;
148 convert_params.calc_vert_normal = true;
149 convert_params.add_key_index = false;
150 convert_params.use_shapekey = false;
151 convert_params.active_shapekey = 0;
152 convert_params.cd_mask_extra.vmask = CD_MASK_ORIGINDEX;
153 convert_params.cd_mask_extra.emask = CD_MASK_ORIGINDEX;
154 convert_params.cd_mask_extra.pmask = CD_MASK_ORIGINDEX;
155
156 bool vert_weight_converted;
157 const std::string vert_weight_name = ensure_weight_attribute_meta_data(
158 *mesh, bmd->vertex_weight_name, bke::AttrDomain::Point, vert_weight_converted);
159 bool edge_weight_converted;
160 const std::string edge_weight_name = ensure_weight_attribute_meta_data(
161 *mesh, bmd->edge_weight_name, bke::AttrDomain::Edge, edge_weight_converted);
162
163 bm = BKE_mesh_to_bmesh_ex(mesh, &create_params, &convert_params);
164
165 if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) {
166 MOD_get_vgroup(ctx->object, mesh, bmd->defgrp_name, &dvert, &vgroup);
167 }
168
169 const int bweight_offset_vert = CustomData_get_offset_named(
170 &bm->vdata, CD_PROP_FLOAT, vert_weight_name);
171 const int bweight_offset_edge = CustomData_get_offset_named(
172 &bm->edata, CD_PROP_FLOAT, edge_weight_name);
173
175 BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
176 if (bmd->lim_flags & MOD_BEVEL_WEIGHT) {
177 weight = bweight_offset_vert == -1 ? 0.0f : BM_ELEM_CD_GET_FLOAT(v, bweight_offset_vert);
178 if (weight == 0.0f) {
179 continue;
180 }
181 }
182 else {
184 dvert, BM_elem_index_get(v), vgroup, invert_vgroup);
185 /* Check is against 0.5 rather than != 0.0 because cascaded bevel modifiers will
186 * interpolate weights for newly created vertices, and may cause unexpected "selection" */
187 if (weight < 0.5f) {
188 continue;
189 }
190 }
192 }
193 }
194 else if (bmd->lim_flags & MOD_BEVEL_ANGLE) {
195 BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
196 /* check for 1 edge having 2 face users */
197 BMLoop *l_a, *l_b;
198 if (BM_edge_loop_pair(e, &l_a, &l_b)) {
199 if (dot_v3v3(l_a->f->no, l_b->f->no) < threshold) {
203 }
204 }
205 }
206 }
207 else {
208 /* crummy, is there a way just to operator on all? - campbell */
209 BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
210 if (BM_edge_is_manifold(e)) {
211 if (bmd->lim_flags & MOD_BEVEL_WEIGHT) {
212 weight = bweight_offset_edge == -1 ? 0.0f : BM_ELEM_CD_GET_FLOAT(e, bweight_offset_edge);
213 if (weight == 0.0f) {
214 continue;
215 }
216 }
217 else {
219 dvert, BM_elem_index_get(e->v1), vgroup, invert_vgroup);
221 dvert, BM_elem_index_get(e->v2), vgroup, invert_vgroup);
222 if (weight < 0.5f || weight2 < 0.5f) {
223 continue;
224 }
225 }
229 }
230 }
231 }
232
233#ifdef DEBUG_TIME
234 const timeit::TimePoint bmeshes_made_time = timeit::Clock::now();
235 const float t1_ms = (bmeshes_made_time - start_time).count() / 1.0e6f;
236 printf("BEVEL MODIFIER bmeshes made, %.1f ms\n", t1_ms);
237#endif
239 value,
240 offset_type,
241 profile_type,
242 bmd->res,
243 bmd->profile,
244 bmd->affect_type,
246 do_clamp,
247 dvert,
248 vgroup,
249 mat,
250 loop_slide,
251 mark_seam,
252 mark_sharp,
253 harden_normals,
254 face_strength_mode,
255 miter_outer,
256 miter_inner,
257 spread,
258 bmd->custom_profile,
259 bmd->vmesh_method,
260 bweight_offset_vert,
261 bweight_offset_edge);
262
263#ifdef DEBUG_TIME
264 const timeit::TimePoint bevel_time = timeit::Clock::now();
265 const float t2_ms = (bevel_time - bmeshes_made_time).count() / 1.0e6f;
266 printf("BEVEL MODIFIER bevel, %.1f ms\n", t2_ms);
267#endif
268
270
271 /* Make sure we never allocated these. */
272 BLI_assert(bm->vtoolflagpool == nullptr && bm->etoolflagpool == nullptr &&
273 bm->ftoolflagpool == nullptr);
274
276
277 if (vert_weight_converted) {
278 result->attributes_for_write().remove(vert_weight_name);
279 }
280 if (edge_weight_converted) {
281 result->attributes_for_write().remove(edge_weight_name);
282 }
283
284#ifdef DEBUG_TIME
285 const timeit::TimePoint end_time = timeit::Clock::now();
286 const float t3_ms = (end_time - bevel_time).count() / 1.0e6f;
287 const float t4_ms = (end_time - start_time).count() / 1.0e6f;
288 printf("BEVEL MODIFIER back to mesh, %.1f ms\n", t3_ms);
289 printf("BEVEL MODIFIER total, %.1f ms\n", t4_ms);
290#endif
291
293
294 return result;
295}
296
297static void free_data(ModifierData *md)
298{
299 BevelModifierData *bmd = reinterpret_cast<BevelModifierData *>(md);
301}
302
303static bool is_disabled(const Scene * /*scene*/, ModifierData *md, bool /*use_render_params*/)
304{
305 BevelModifierData *bmd = reinterpret_cast<BevelModifierData *>(md);
306 return (bmd->value == 0.0f);
307}
308
309static void panel_draw(const bContext * /*C*/, Panel *panel)
310{
311 ui::Layout &layout = *panel->layout;
312
313 PointerRNA ob_ptr;
315
316 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
317
318 layout.prop(ptr, "affect", ui::ITEM_R_EXPAND, std::nullopt, ICON_NONE);
319
320 layout.use_property_split_set(true);
321
322 ui::Layout *col = &layout.column(false);
323 col->prop(ptr, "offset_type", UI_ITEM_NONE, std::nullopt, ICON_NONE);
324 if (RNA_enum_get(ptr, "offset_type") == BEVEL_AMT_PERCENT) {
325 col->prop(ptr, "width_pct", UI_ITEM_NONE, std::nullopt, ICON_NONE);
326 }
327 else {
328 col->prop(ptr, "width", UI_ITEM_NONE, IFACE_("Amount"), ICON_NONE);
329 }
330
331 layout.prop(ptr, "segments", UI_ITEM_NONE, std::nullopt, ICON_NONE);
332
333 layout.separator();
334
335 col = &layout.column(false);
336 col->prop(ptr, "limit_method", UI_ITEM_NONE, std::nullopt, ICON_NONE);
337 int limit_method = RNA_enum_get(ptr, "limit_method");
338 if (limit_method == MOD_BEVEL_ANGLE) {
339 ui::Layout &sub = col->column(false);
340 sub.active_set(edge_bevel);
341 sub.prop(ptr, "angle_limit", UI_ITEM_NONE, std::nullopt, ICON_NONE);
342 }
343 else if (limit_method == MOD_BEVEL_WEIGHT) {
344 const char *prop_name = edge_bevel ? "edge_weight" : "vertex_weight";
345 col->prop(ptr, prop_name, UI_ITEM_NONE, std::nullopt, ICON_NONE);
346 }
347 else if (limit_method == MOD_BEVEL_VGROUP) {
348 modifier_vgroup_ui(*col, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", std::nullopt);
349 }
350
351 modifier_error_message_draw(layout, ptr);
352}
353
354static void profile_panel_draw(const bContext * /*C*/, Panel *panel)
355{
356 ui::Layout &layout = *panel->layout;
357
359
360 int profile_type = RNA_enum_get(ptr, "profile_type");
361 int miter_inner = RNA_enum_get(ptr, "miter_inner");
362 int miter_outer = RNA_enum_get(ptr, "miter_outer");
363 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
364
365 layout.prop(ptr, "profile_type", ui::ITEM_R_EXPAND, std::nullopt, ICON_NONE);
366
367 layout.use_property_split_set(true);
368
370 ui::Layout &row = layout.row(false);
371 row.active_set(
372 profile_type == MOD_BEVEL_PROFILE_SUPERELLIPSE ||
373 (profile_type == MOD_BEVEL_PROFILE_CUSTOM && edge_bevel &&
374 !((miter_inner == MOD_BEVEL_MITER_SHARP) && (miter_outer == MOD_BEVEL_MITER_SHARP))));
375 row.prop(ptr,
376 "profile",
378 (profile_type == MOD_BEVEL_PROFILE_SUPERELLIPSE) ? IFACE_("Shape") :
379 IFACE_("Miter Shape"),
380 ICON_NONE);
381
382 if (profile_type == MOD_BEVEL_PROFILE_CUSTOM) {
383 ui::Layout &sub = layout.column(false);
384 sub.use_property_decorate_set(false);
385 template_curve_profile(&sub, ptr, "custom_profile");
386 }
387 }
388}
389
390static void geometry_panel_draw(const bContext * /*C*/, Panel *panel)
391{
392 ui::Layout &layout = *panel->layout;
393
395
396 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
397
398 layout.use_property_split_set(true);
399
400 ui::Layout *row = &layout.row(false);
401 row->active_set(edge_bevel);
402 row->prop(ptr, "miter_outer", UI_ITEM_NONE, IFACE_("Miter Outer"), ICON_NONE);
403 row = &layout.row(false);
404 row->active_set(edge_bevel);
405 row->prop(ptr, "miter_inner", UI_ITEM_NONE, IFACE_("Inner"), ICON_NONE);
406 if (RNA_enum_get(ptr, "miter_inner") == BEVEL_MITER_ARC) {
407 row = &layout.row(false);
408 row->active_set(edge_bevel);
409 row->prop(ptr, "spread", UI_ITEM_NONE, std::nullopt, ICON_NONE);
410 }
411 layout.separator();
412
413 row = &layout.row(false);
414 row->active_set(edge_bevel);
415 row->prop(ptr, "vmesh_method", UI_ITEM_NONE, IFACE_("Intersections"), ICON_NONE);
416 layout.prop(ptr, "use_clamp_overlap", UI_ITEM_NONE, std::nullopt, ICON_NONE);
417 row = &layout.row(false);
418 row->active_set(edge_bevel);
419 row->prop(ptr, "loop_slide", UI_ITEM_NONE, std::nullopt, ICON_NONE);
420}
421
422static void shading_panel_draw(const bContext * /*C*/, Panel *panel)
423{
424 ui::Layout &layout = *panel->layout;
425
427
428 bool edge_bevel = RNA_enum_get(ptr, "affect") != MOD_BEVEL_AFFECT_VERTICES;
429
430 layout.use_property_split_set(true);
431
432 layout.prop(ptr, "harden_normals", UI_ITEM_NONE, std::nullopt, ICON_NONE);
433
434 ui::Layout &col = layout.column(true, IFACE_("Mark"));
435 col.active_set(edge_bevel);
436 col.prop(ptr, "mark_seam", UI_ITEM_NONE, IFACE_("Seam"), ICON_NONE);
437 col.prop(ptr, "mark_sharp", UI_ITEM_NONE, IFACE_("Sharp"), ICON_NONE);
438
439 layout.prop(ptr, "material", UI_ITEM_NONE, std::nullopt, ICON_NONE);
440 layout.prop(ptr, "face_strength_mode", UI_ITEM_NONE, std::nullopt, ICON_NONE);
441}
442
443static void panel_register(ARegionType *region_type)
444{
447 region_type, "profile", "Profile", nullptr, profile_panel_draw, panel_type);
449 region_type, "geometry", "Geometry", nullptr, geometry_panel_draw, panel_type);
451 region_type, "shading", "Shading", nullptr, shading_panel_draw, panel_type);
452}
453
454static void blend_write(BlendWriter *writer, const ID * /*id_owner*/, const ModifierData *md)
455{
456 const BevelModifierData *bmd = reinterpret_cast<const BevelModifierData *>(md);
457
458 writer->write_struct(bmd);
459
460 if (bmd->custom_profile) {
462 }
463}
464
465static void blend_read(BlendDataReader *reader, ModifierData *md)
466{
467 BevelModifierData *bmd = reinterpret_cast<BevelModifierData *>(md);
468
470 if (bmd->custom_profile) {
472 }
473}
474
476 /*idname*/ "Bevel",
477 /*name*/ N_("Bevel"),
478 /*struct_name*/ "BevelModifierData",
479 /*struct_size*/ sizeof(BevelModifierData),
480 /*srna*/ &RNA_BevelModifier,
484 /*icon*/ ICON_MOD_BEVEL,
485 /*copy_data*/ copy_data,
486 /*deform_verts*/ nullptr,
487 /*deform_matrices*/ nullptr,
488 /*deform_verts_EM*/ nullptr,
489 /*deform_matrices_EM*/ nullptr,
490 /*modify_mesh*/ modify_mesh,
491 /*modify_geometry_set*/ nullptr,
492 /*init_data*/ init_data,
493 /*required_data_mask*/ required_data_mask,
494 /*free_data*/ free_data,
495 /*is_disabled*/ is_disabled,
496 /*update_depsgraph*/ nullptr,
497 /*depends_on_time*/ nullptr,
498 /*depends_on_normals*/ nullptr,
499 /*foreach_ID_link*/ nullptr,
500 /*foreach_tex_link*/ nullptr,
501 /*free_runtime_data*/ nullptr,
502 /*panel_register*/ panel_register,
503 /*blend_write*/ blend_write,
504 /*blend_read*/ blend_read,
505 /*foreach_cache*/ nullptr,
506 /*foreach_working_space_color*/ nullptr,
507};
508
509} // namespace blender
Generic geometry attributes built on CustomData.
support for deformation groups and hooks.
#define BLO_read_struct(reader, struct_name, ptr_p)
#define IFACE_(msgid)
Object is a sort of wrapper for general info.
#define UI_ITEM_NONE
#define INIT_DEFAULT_STRUCT_AFTER(struct_dst, member)
#define ELEM(...)
#define BM_ELEM_CD_GET_FLOAT(ele, offset)
#define BM_elem_index_get(ele)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define CD_MASK_ORIGINDEX
#define CD_MASK_MDEFORMVERT
static AttributeOwner from_id(ID *id)
static VArray from_span(Span< T > values)
std::optional< AttributeMetaData > lookup_meta_data(StringRef name) const
GAttributeReader lookup(const StringRef name) const
int domain_size(const AttrDomain domain) const
bool add(const StringRef name, const AttrDomain domain, const AttrType data_type, const AttributeInit &initializer)
bool allow_procedural_attribute_access(StringRef attribute_name)
void debug_randomize_mesh_order(Mesh *mesh)
Definition randomize.cc:305
Clock::time_point TimePoint
Definition BLI_timeit.hh:20
BMesh Iterators.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static void copy_data(const ModifierData *md, ModifierData *target, const int flag)
int RNA_enum_get(PointerRNA *ptr, const char *name)
static void blend_write(BlendWriter *writer, const ID *, const ModifierData *md)
Definition MOD_bevel.cc:454
PointerRNA * modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr)
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
static void geometry_panel_draw(const bContext *, Panel *panel)
Definition MOD_bevel.cc:390
void MOD_get_vgroup(const Object *ob, const Mesh *mesh, const char *name, const MDeformVert **dvert, int *defgrp_index)
Definition MOD_util.cc:158
static void init_data(ModifierData *md)
ATTR_WARN_UNUSED_RESULT const BMVert * v
std::string BKE_attribute_calc_unique_name(const AttributeOwner &owner, StringRef name)
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
static void required_data_mask(ModifierData *, CustomData_MeshMasks *r_cddata_masks)
void modifier_error_message_draw(ui::Layout &layout, PointerRNA *ptr)
void modifier_vgroup_ui(ui::Layout &layout, PointerRNA *ptr, PointerRNA *ob_ptr, const StringRefNull vgroup_prop, const std::optional< StringRefNull > invert_vgroup_prop, const std::optional< StringRefNull > text)
BMesh * BKE_mesh_to_bmesh_ex(const Mesh *mesh, const BMeshCreateParams *create_params, const BMeshFromMeshParams *convert_params)
static void free_data(ModifierData *md)
Definition MOD_bevel.cc:297
static void panel_register(ARegionType *region_type)
int CustomData_get_offset_named(const CustomData *data, eCustomDataType type, StringRef name)
ATTR_WARN_UNUSED_RESULT const BMLoop * l_b
ModifierTypeInfo modifierType_Bevel
Definition MOD_bevel.cc:475
float BKE_defvert_array_find_weight_safe(const MDeformVert *dvert, int index, int defgroup, bool invert)
Definition deform.cc:785
static void profile_panel_draw(const bContext *, Panel *panel)
Definition MOD_bevel.cc:354
static Mesh * modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh)
Definition MOD_array.cc:873
@ eModifierTypeFlag_AcceptsCVs
@ eModifierTypeFlag_EnableInEditmode
@ eModifierTypeFlag_SupportsEditmode
@ eModifierTypeFlag_AcceptsMesh
void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile)
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)
static void blend_read(BlendDataReader *, ModifierData *md)
void BKE_curveprofile_free(struct CurveProfile *profile)
bool BM_edge_loop_pair(BMEdge *e, BMLoop **r_la, BMLoop **r_lb)
@ MOD_BEVEL_PROFILE_SUPERELLIPSE
Mesh * BKE_mesh_from_bmesh_for_eval_nomain(BMesh *bm, const CustomData_MeshMasks *cd_mask_extra, const Mesh *me_settings)
struct CurveProfile * BKE_curveprofile_add(eCurveProfilePresets preset)
PanelType * modifier_panel_register(ARegionType *region_type, ModifierType type, PanelDrawFn draw)
static void panel_draw(const bContext *, Panel *panel)
PanelType * modifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
struct CurveProfile * BKE_curveprofile_copy(const struct CurveProfile *profile)
static void shading_panel_draw(const bContext *, Panel *panel)
Definition MOD_bevel.cc:422
static bool is_disabled(const Scene *, ModifierData *md, bool)
void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile)
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
static std::string ensure_weight_attribute_meta_data(Mesh &mesh, const StringRef name, const bke::AttrDomain domain, bool &r_attr_converted)
Definition MOD_bevel.cc:79
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
void BKE_modifier_copydata_generic(const ModifierData *md, ModifierData *md_dst, int flag)
#define cosf
struct BMFace * f
struct CustomData_MeshMasks cd_mask_extra
BevelModifierFaceStrengthMode face_str_mode
BevelModifierAffectType affect_type
BevelModifierValFlag val_flags
BevelModifierVMeshMethod vmesh_method
struct CurveProfile * custom_profile
BevelModifierEdgeFlag edge_flags
BevelModifierProfileType profile_type
void write_struct(const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
ui::Layout * layout
void use_property_decorate_set(bool is_decorate)
void use_property_split_set(bool is_sep)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void active_set(bool active)
Layout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
Layout & row(bool align)
#define N_(msgid)