35 "Relax edge loops using linear interpolation"},
50 bool changed_multi =
false;
51 bool has_edges_selected =
false;
52 bool has_faces_selected =
false;
54 for (
Object *obedit : objects) {
57 has_edges_selected =
true;
61 has_faces_selected =
true;
71 "relax_edge_loops geom=%he interpolation=%i iterations=%i even_spacing=%b",
84 EDBM_update(id_cast<Mesh *>(obedit->data), ¶ms);
88 if (has_faces_selected) {
90 op->
reports,
RPT_WARNING,
"Operator requires separate edge loops, selected faces found");
92 else if (!has_edges_selected) {
105 ot->
name =
"Relax Edge Loops";
106 ot->
description =
"Relax the loop, so it is smoother";
107 ot->
idname =
"MESH_OT_relax_edge_loops";
119 "Number of times the loop is relaxed",
126 "Distribute vertices at constant distances along the loop");
132 "Algorithm used for interpolation");
Object is a sort of wrapper for general info.
static const EnumPropertyItem prop_interpolation_items[]
int RNA_enum_get(PointerRNA *ptr, const char *name)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
static wmOperatorStatus edbm_relax_edge_loops_exec(bContext *C, wmOperator *op)
void EDBM_update(Mesh *mesh, const EDBMUpdate_Params *params)
bool EDBM_op_callf(BMesh *bm, wmOperator *op, const char *fmt,...)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
int RNA_int_get(PointerRNA *ptr, const char *name)
@ RELAX_EDGE_LOOPS_INTERP_LINEAR
@ RELAX_EDGE_LOOPS_INTERP_CUBIC
ViewLayer * CTX_data_view_layer(const bContext *C)
bool ED_operator_editmesh(bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
Main * CTX_data_main(const bContext *C)
Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
Scene * CTX_data_scene(const bContext *C)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void MESH_OT_relax_edge_loops(wmOperatorType *ot)
View3D * CTX_wm_view3d(const bContext *C)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports