38 "Natural cubic spline, smooth results"},
43 "Vertices are projected on existing edges"},
76 bool has_edges_selected =
false;
77 bool has_faces_selected =
false;
78 bool changed_multi =
false;
80 for (
Object *obedit : objects) {
83 has_edges_selected =
true;
86 has_faces_selected =
true;
101 "space_edge_loops_evenly geom=%he interpolation=%i factor=%f "
102 "lock_x=%b lock_y=%b lock_z=%b",
112 changed_multi =
true;
116 EDBM_update(id_cast<Mesh *>(obedit->data), ¶ms);
119 if (!changed_multi) {
120 if (has_faces_selected) {
122 op->
reports,
RPT_WARNING,
"Operator requires separate edge loops, selected faces found");
124 else if (!has_edges_selected) {
154 ot->
name =
"Space Edge Loops Evenly";
155 ot->
description =
"Space the vertices in a regular distribution on the loop";
156 ot->
idname =
"MESH_OT_space_edge_loops_evenly";
167 ot->
srna,
"factor", 1.0f, 0.0f, 1.0f,
"Factor",
"Spacing effect factor", 0.0f, 1.0f);
173 "Algorithm used for interpolation");
Object is a sort of wrapper for general info.
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
static const EnumPropertyItem prop_interpolation_items[]
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
int BM_iter_elem_count_flag(const char itype, void *data, const char hflag, const bool value)
Elem Iter Flag Count.
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)
@ SPACE_EDGE_LOOPS_EVENLY_INTERP_CUBIC
@ SPACE_EDGE_LOOPS_EVENLY_INTERP_LINEAR
PropertyRNA * RNA_def_boolean_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const bool *default_value, const char *ui_name, const char *ui_description)
void RNA_boolean_get_array(PointerRNA *ptr, const char *name, bool *values)
ViewLayer * CTX_data_view_layer(const bContext *C)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
bool ED_operator_editmesh(bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
static void edbm_space_edge_loops_evenly_ui(bContext *, wmOperator *op)
static wmOperatorStatus edbm_space_edge_loops_evenly_exec(bContext *C, wmOperator *op)
Main * CTX_data_main(const bContext *C)
static bool has_connected_selected_edges(BMesh *bm)
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)
void MESH_OT_space_edge_loops_evenly(wmOperatorType *ot)
Scene * CTX_data_scene(const bContext *C)
float RNA_float_get(PointerRNA *ptr, const char *name)
View3D * CTX_wm_view3d(const bContext *C)
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)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) ui(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports