40 for (
Object *
object : objects) {
41 Mesh &mesh = *
static_cast<Mesh *
>(
object->data);
42 BMEditMesh *em = mesh.runtime->edit_mesh.get();
52 if (extend && prev_sharp) {
60 const bool sharp = angle_cos <= angle_limit_cos;
62 changed = changed || sharp != prev_sharp;
77 ot->
name =
"Set Sharpness by Angle";
78 ot->
description =
"Set edge sharpness based on the angle between neighboring faces";
79 ot->
idname =
"MESH_OT_set_sharpness_by_angle";
102 "Add new sharp edges without clearing existing sharp edges");
Scene * CTX_data_scene(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_editmesh_lnorspace_update(BMEditMesh *em)
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
void DEG_id_tag_update(ID *id, unsigned int flags)
bool ED_operator_editmesh(bContext *C)
#define BM_elem_flag_set(ele, hflag, val)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
bool BM_edge_loop_pair(BMEdge *e, BMLoop **r_la, BMLoop **r_lb)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static int set_sharpness_by_angle_exec(bContext *C, wmOperator *op)
void MESH_OT_set_sharpness_by_angle(wmOperatorType *ot)
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
VecBase< float, 3 > float3
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
PropertyRNA * RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
static AngleRadianBase from_degree(const T °rees)
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)