59#include "RNA_prototypes.hh"
136#define TRANSFORM_MEDIAN_ARRAY_LEN (sizeof(TransformMedian) / sizeof(float))
150 params->unique_retval_ids,
params->unique_retval_ids_len, &retval_test) == -1)
157 int verts_mask_count = 0;
168 verts_mask_count += 1;
175 *em->
bm, update_params, verts_mask, verts_mask_count);
186 if (bmpinfo ==
nullptr) {
198 if (bmpinfo ==
nullptr) {
223 if (ve_median <= 0.0f) {
226 if (ve_median >= 1.0f) {
231 float median_new = ve_median;
232 float median_orig = ve_median - median;
235 CLAMP(median_orig, 0.0f, 1.0f);
236 CLAMP(median_new, 0.0f, 1.0f);
238 if (median_new <= median_orig) {
240 return median_new / median_orig;
244 return -(1.0f - median_new) / (1.0f - median_orig);
253static void apply_raw_diff(
float *val,
const int tot,
const float ve_median,
const float median)
255 *val = (tot == 1) ? ve_median : (*val + median);
260 const float ve_median[3],
261 const float median[3])
272 float *val,
const int tot,
const float ve_median,
const float median,
const float sca)
274 if (tot == 1 || ve_median == median) {
284 const float ve_median,
289 CLAMP(*val, 0.0f, 1.0f);
291 else if (
ELEM(sca, 0.0f, 1.0f)) {
295 *val = (sca > 0.0f) ? (*val * sca) : (1.0f + ((1.0f - *val) * sca));
296 CLAMP(*val, 0.0f, 1.0f);
347 const std::optional<Span<float>> nurbs_weights = curves.
nurbs_weights();
353 const IndexMask selection = retrieve_selected_points(curves, memory);
362 for (
const int curve : range) {
363 const IndexRange points = points_by_curve[curve];
375 (nurbs_weights ? (*nurbs_weights)[point] : 1.0f) :
392 auto add_handles = [&](
StringRef selection_attribute, std::optional<Span<float3>> positions) {
396 const IndexMask selection = retrieve_selected_points(
397 curves, selection_attribute, bezier_points, memory);
405 [&](
const int point) {
add_v3_v3(
status.median.location, (*positions)[point]); });
424 bool changed =
false;
435 const IndexMask selection = retrieve_selected_points(curves, memory);
442 for (const int curve : range) {
443 const IndexRange points = points_by_curve[curve];
444 const CurveType curve_type = CurveType(curve_types[curve]);
445 const bool is_nurbs = curve_type == CURVE_TYPE_NURBS;
446 const IndexMask curve_selection = selection.slice_content(points);
448 if (!curve_selection.is_empty()) {
452 curve_selection.foreach_index([&](const int point) {
453 if (is_nurbs && median.nurbs_weight) {
454 apply_raw_diff(&nurbs_weights[point], tot, ve_median.nurbs_weight, median.nurbs_weight);
455 nurbs_weights[point] = math::clamp(nurbs_weights[point], 0.01f, 100.0f);
458 apply_raw_diff(&radius[point], tot, ve_median.radius, median.radius);
461 apply_raw_diff(&tilt[point], tot, ve_median.tilt, median.tilt);
463 if (update_location) {
464 apply_raw_diff_v3(positions[point], tot, ve_median.location, median.location);
478 auto apply_to_handles = [&](
StringRef selection_attribute,
StringRef handles_attribute) {
480 curves, selection_attribute, bezier_points, memory);
486 curves.attributes_for_write().lookup_for_write_span<
float3>(handles_attribute);
495 apply_to_handles(
".selection_handle_left",
"handle_left");
496 apply_to_handles(
".selection_handle_right",
"handle_right");
499 curves.calculate_bezier_auto_handles();
551 const IndexMask selection = retrieve_selected_curves(curves, memory);
573 const int order = is_nurbs ? orders[curve] : 0;
577 const int nurbs_knot_mode = is_nurbs ? nurbs_knot_modes[curve] : 0;
581 const int res = resolution[curve];
598 int tot, totedgedata, totcurvedata, totlattdata, totcurvebweight;
599 int total_curve_points_data = 0;
600 bool has_meshdata =
false;
601 bool has_skinradius =
false;
605 tot = totedgedata = totcurvedata = totlattdata = totcurvebweight = 0;
626 has_skinradius = (cd_vert_skin_offset != -1);
628 if (
bm->totvertsel) {
634 if (cd_vert_bweight_offset != -1) {
638 if (cd_vert_crease_offset != -1) {
642 if (has_skinradius) {
651 if ((cd_edge_bweight_offset != -1) || (cd_edge_crease_offset != -1)) {
652 if (
bm->totedgesel) {
655 if (cd_edge_bweight_offset != -1) {
659 if (cd_edge_crease_offset != -1) {
669 totedgedata =
bm->totedgesel;
672 has_meshdata = (tot || totedgedata);
682 void *selp =
nullptr;
697 seltype = &RNA_BezierSplinePoint;
716 a = nu->pntsu * nu->pntsv;
728 seltype = &RNA_SplinePoint;
737 if (totcurvedata == 1) {
747 void *selp =
nullptr;
758 seltype = &RNA_LatticePoint;
765 if (totlattdata == 1) {
785 for (
const int drawing : range) {
802 total_curve_points_data =
status.total_curve_points;
803 totcurvebweight =
status.total_nurbs_weights;
808 block,
ButType::Label, 0,
IFACE_(
"Nothing selected"), 0, 130, 200, 20,
nullptr, 0, 0,
"");
827 if (has_skinradius) {
833 else if (total_curve_points_data) {
835 if (totcurvebweight) {
838 median.
radius /= total_curve_points_data;
839 median.
tilt /= total_curve_points_data;
841 else if (totcurvedata) {
843 if (totcurvebweight) {
850 else if (totlattdata) {
859 const int butw = 200;
861 const int but_margin = 2;
870 c =
IFACE_(
"Control Point:");
883 uiDefBut(block,
ButType::Label, 0, c, 0, yi -= buth, butw, buth,
nullptr, 0, 0,
"");
934 if (totcurvebweight == tot) {
961 yi -= buth + but_margin,
967 TIP_(
"Displays global values"));
980 TIP_(
"Displays local values"));
990 tot == 1 ?
IFACE_(
"Vertex Data:") :
IFACE_(
"Vertices Data:"),
992 yi -= buth + but_margin,
1003 tot == 1 ?
IFACE_(
"Bevel Weight:") :
IFACE_(
"Mean Bevel Weight:"),
1005 yi -= buth + but_margin,
1011 TIP_(
"Vertex weight used by Bevel modifier"));
1018 tot == 1 ?
IFACE_(
"Vertex Crease:") :
IFACE_(
"Mean Vertex Crease:"),
1020 yi -= buth + but_margin,
1026 TIP_(
"Weight used by the Subdivision Surface modifier"));
1030 if (has_skinradius) {
1035 tot == 1 ?
IFACE_(
"Radius X:") :
IFACE_(
"Mean Radius X:"),
1037 yi -= buth + but_margin,
1040 &ve_median->
skin[0],
1043 TIP_(
"X radius used by Skin modifier"));
1049 tot == 1 ?
IFACE_(
"Radius Y:") :
IFACE_(
"Mean Radius Y:"),
1051 yi -= buth + but_margin,
1054 &ve_median->
skin[1],
1057 TIP_(
"Y radius used by Skin modifier"));
1066 totedgedata == 1 ?
IFACE_(
"Edge Data:") :
IFACE_(
"Edges Data:"),
1068 yi -= buth + but_margin,
1079 totedgedata == 1 ?
IFACE_(
"Bevel Weight:") :
IFACE_(
"Mean Bevel Weight:"),
1081 yi -= buth + but_margin,
1087 TIP_(
"Edge weight used by Bevel modifier"));
1094 totedgedata == 1 ?
IFACE_(
"Crease:") :
IFACE_(
"Mean Crease:"),
1096 yi -= buth + but_margin,
1102 TIP_(
"Weight used by the Subdivision Surface modifier"));
1108 else if (total_curve_points_data) {
1109 const bool is_single = total_curve_points_data == 1;
1115 is_single ?
IFACE_(
"Radius:") :
IFACE_(
"Mean Radius:"),
1117 yi -= buth + but_margin,
1125 std::optional<StringRef>{TIP_(
"Radius of curve control points")});
1133 yi -= buth + but_margin,
1139 is_single ? std::nullopt :
1140 std::optional<StringRef>{TIP_(
"Tilt of curve control points")});
1146 else if (totcurvedata) {
1148 if (totcurvedata == 1) {
1154 yi -= buth + but_margin,
1170 yi -= buth + but_margin,
1186 yi -= buth + but_margin,
1198 else if (totcurvedata > 1) {
1204 yi -= buth + but_margin,
1210 TIP_(
"Weight used for Soft Body Goal"));
1218 yi -= buth + but_margin,
1224 TIP_(
"Radius of curve control points"));
1232 yi -= buth + but_margin,
1238 TIP_(
"Tilt of curve control points"));
1245 else if (totlattdata) {
1247 if (totlattdata == 1) {
1253 yi -= buth + but_margin,
1265 else if (totlattdata > 1) {
1271 yi -= buth + but_margin,
1277 TIP_(
"Weight used for Soft Body Goal"));
1292 callback_data.
arg1 = em;
1306 (
float *)&ve_median_basis,
1307 (
float *)&median_basis,
1311 const bool apply_vcos = (tot == 1) || (
len_squared_v3(median_basis.generic.location) != 0.0f);
1314 (apply_vcos || median_basis.mesh.bv_weight || median_basis.mesh.v_crease ||
1315 median_basis.mesh.skin[0] || median_basis.mesh.skin[1] || median_basis.mesh.be_weight ||
1316 median_basis.mesh.e_crease))
1326 int cd_vert_bweight_offset = -1;
1327 int cd_vert_crease_offset = -1;
1328 int cd_vert_skin_offset = -1;
1329 int cd_edge_bweight_offset = -1;
1330 int cd_edge_crease_offset = -1;
1332 float scale_bv_weight = 1.0f;
1333 float scale_v_crease = 1.0f;
1334 float scale_skin[2] = {1.0f, 1.0f};
1335 float scale_be_weight = 1.0f;
1336 float scale_e_crease = 1.0f;
1365 for (
int i = 0;
i < 2;
i++) {
1366 if (median->
skin[
i]) {
1370 if (ve_median->skin[
i] != median->
skin[
i]) {
1371 scale_skin[
i] = ve_median->skin[
i] / (ve_median->skin[
i] - median->
skin[
i]);
1382 if (cd_vert_bweight_offset != -1) {
1383 float *b_weight =
static_cast<float *
>(
1388 if (cd_vert_crease_offset != -1) {
1389 float *crease =
static_cast<float *
>(
1394 if (cd_vert_skin_offset != -1) {
1399 for (
int i = 0;
i < 2;
i++) {
1400 if (median->
skin[
i] != 0.0f) {
1402 &vs->
radius[
i], tot, ve_median->skin[
i], median->
skin[
i], scale_skin[
i]);
1443 float *b_weight =
static_cast<float *
>(
1449 float *crease =
static_cast<float *
>(
1458 (apply_vcos || median_basis.curve.b_weight || median_basis.curve.weight ||
1459 median_basis.curve.radius || median_basis.curve.tilt))
1462 *ve_median = &ve_median_basis.curve;
1472 for (a = nu->pntsu, bezt = nu->bezt; a--; bezt++) {
1493 else if (apply_vcos) {
1505 for (a = nu->pntsu * nu->pntsv, bp = nu->bp; a--; bp++) {
1530 if ((nu->type ==
CU_BEZIER) && apply_vcos) {
1535 else if ((ob->
type ==
OB_LATTICE) && (apply_vcos || median_basis.lattice.weight)) {
1537 *ve_median = &ve_median_basis.lattice;
1558 (apply_vcos || median_basis.curves.nurbs_weight || median_basis.curves.radius ||
1559 median_basis.curves.tilt))
1570 tot, median_basis.curves, ve_median_basis.curves, curves))
1572 info.drawing.tag_positions_changed();
1576 else if (ob->
type ==
OB_CURVES && (apply_vcos || median_basis.curves.nurbs_weight ||
1577 median_basis.curves.radius || median_basis.curves.tilt))
1583 tot, median_basis.curves, ve_median_basis.curves, curves))
1593#undef TRANSFORM_MEDIAN_ARRAY_LEN
1605 const int butw = 200;
1613 if (!is_editable && sub_layout) {
1631 for (
int i = 0;
i < 3;
i++) {
1633 const char text[3] = {char(
'X' +
i),
':',
'\0'};
1650 UI_but_disable(but,
"Cannot edit this property from a linked data-block");
1657 for (
int i = 0;
i < 3;
i++) {
1659 axis_mask |= (1 <<
i);
1671#define B_VGRP_PNL_EDIT_SINGLE 8
1743 int subset_count, vgroup_tot;
1744 const bool *vgroup_validmap;
1752 row = &bcol->
row(
true);
1760 ob, subset_type, &vgroup_tot, &subset_count);
1767 if (vgroup_validmap[
i]) {
1773 row = &
split->row(
true);
1796 row = &
split->row(
true);
1802 vertex_weight = dw->
weight;
1825 icon = (locked) ? ICON_BLANK1 : ICON_PASTEDOWN;
1826 op_ptr = row->
op(
"OBJECT_OT_vertex_weight_paste",
1834 icon = (locked) ? ICON_LOCKED : ICON_X;
1835 op_ptr = row->
op(
"OBJECT_OT_vertex_weight_delete",
1851 row = &
col->row(
true);
1864 TIP_(
"Normalize weights of active vertex (if affected groups are unlocked)"));
1877 TIP_(
"Copy active vertex to other selected vertices (if affected groups are unlocked)"));
1890 if (
ptr->type == &RNA_PoseBone) {
1895 bone =
static_cast<Bone *
>(boneptr.
data);
1898 colsub = &
split->column(
true);
1900 colsub = &
split->column(
true);
1902 colsub->
label(
"", ICON_NONE);
1910 colsub = &
split->column(
true);
1912 colsub = &
split->column(
true);
1920 ICON_DECORATE_UNLOCKED);
1923 colsub->
label(
"", ICON_NONE);
1929 ICON_DECORATE_UNLOCKED);
1932 colsub = &
split->column(
true);
1934 colsub = &
split->column(
true);
1942 ICON_DECORATE_UNLOCKED);
1945 colsub->
label(
"", ICON_NONE);
1951 ICON_DECORATE_UNLOCKED);
1954 colsub = &
split->column(
true);
1956 colsub = &
split->column(
true);
1958 colsub->
label(
"", ICON_NONE);
1963 ICON_DECORATE_UNLOCKED);
1969 colsub = &
split->column(
true);
1971 colsub = &
split->column(
true);
1973 colsub->
label(
"", ICON_NONE);
1986 layout->
label(
IFACE_(
"No Bone Active"), ICON_NONE);
2009 layout->
label(
IFACE_(
"Nothing selected"), ICON_NONE);
2029 col->prop(&eboneptr,
"length",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
2038 if (!mball || !(mball->
lastelem)) {
2039 layout->
label(
IFACE_(
"Nothing selected"), ICON_NONE);
2203 curves_geometry_handler(modified, selection, curves);
2204 info.drawing.tag_topology_changed();
2214 curves_geometry_handler(modified, selection, curves);
2245 if (!custom_knot_curves.
is_empty()) {
2253 const IndexRange dst_knots = custom_knots_by_curve[curve];
2254 const IndexRange src_knots = src_custom_knots_by_curve[curve];
2256 const int points_num = points_by_curve[curve].
size();
2257 const int order = orders[curve];
2263 knots_buffer.
as_span().take_front(dst_knots.
size()));
2284 curves.
runtime->custom_knot_offsets_cache;
2287 if (knots_sharing_info !=
nullptr) {
2292 if (!src_custom_knots.
is_empty() ||
2309 if (knots_sharing_info !=
nullptr) {
2330 curves.
runtime->custom_knot_offsets_cache;
2333 if (knots_sharing_info !=
nullptr) {
2337 bool knot_modes_changed =
false;
2340 if (orders[curve] != modified_state.
order &&
2344 knot_modes_changed =
true;
2346 orders[curve] = modified_state.
order;
2352 if (knot_modes_changed) {
2356 if (knots_sharing_info !=
nullptr) {
2399 reinterpret_cast<int *
>(knot_mode_p),
2431 for (
const int drawing : range) {
2444 if (
status.curve_count == 0) {
2446 block,
ButType::Label, 0,
IFACE_(
"Nothing selected"), 0, 130, 200, 20,
nullptr, 0, 0,
"");
2466 auto add_labeled_field =
2472 col.label(label, ICON_NONE);
2473 split.column(
false);
2474 uiBut *but = add_button();
2490 uiBut *but = uiDefButC(
2491 block, ButType::Checkbox, 0,
"", 0, 0, butw, buth, &modified.cyclic, 0, 1,
"");
2492 UI_but_func_set(but, handle_curves_cyclic, nullptr, nullptr);
2501 uiBut *but = uiDefMenuBut(block,
2503 &modified.nurbs_knot_mode,
2504 enum_curve_knot_mode_items[modified.nurbs_knot_mode].name,
2510 UI_but_type_set_menu_from_pulldown(but);
2511 UI_but_func_set(but, handle_curves_knot_mode, nullptr, nullptr);
2517 uiBut *but = uiDefButI(
2518 block, ButType::Num, 0,
"", 0, 0, butw, buth, &modified.order, 2, 6,
"");
2519 UI_but_number_step_size_set(but, 1);
2520 UI_but_number_precision_set(but, -1);
2521 UI_but_func_set(but, handle_curves_order, nullptr, nullptr);
2526 if (
status.poly_count == 0) {
2531 uiBut *but = uiDefButI(
2532 block, ButType::Num, 0,
"", 0, 0, butw, buth, &modified.resolution, 1, 64,
"");
2533 UI_but_number_step_size_set(but, 1);
2534 UI_but_number_precision_set(but, -1);
2535 UI_but_func_set(but, handle_curves_resolution, nullptr, nullptr);
2557 N_(
"Vertex Weights"));
2577 if (ob ==
nullptr) {
2592 ot->name =
"Object Mode Menu";
2593 ot->idname =
"VIEW3D_OT_object_mode_pie_or_toggle";
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
bool ANIM_bonecoll_is_visible_editbone(const bArmature *armature, const EditBone *ebone)
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_active_if_bonecoll_visible(Object *ob) ATTR_WARN_UNUSED_RESULT
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_nurb_project_2d(Nurb *nu)
void BKE_nurb_handles_test(Nurb *nu, eNurbHandleTest_Mode handle_mode, bool use_around_local)
ListBase * BKE_curve_editNurbs_get(Curve *cu)
Low-level operations for curves.
Low-level operations for curves.
CustomData interface, see also DNA_customdata_types.h.
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
bool CustomData_has_layer_named(const CustomData *data, eCustomDataType type, blender::StringRef name)
int CustomData_get_offset_named(const CustomData *data, eCustomDataType type, blender::StringRef name)
void BKE_editmesh_looptris_and_normals_calc_with_partial(BMEditMesh *em, BMPartialUpdate *bmpinfo)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Base * BKE_view_layer_active_base_get(ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode(const Object *ob)
void BKE_object_dimensions_eval_cached_get(const Object *ob, float r_vec[3])
void BKE_object_dimensions_set_ex(Object *ob, const float value[3], int axis_mask, const float ob_scale_orig[3], const float ob_obmat_orig[4][4])
bool BKE_object_is_in_wpaint_select_vert(const Object *ob)
bool BKE_object_is_in_editmode_vgroup(const Object *ob)
void BKE_report(ReportList *reports, eReportType type, const char *message)
Generic array manipulation API.
#define BLI_array_findindex(arr, arr_len, p)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void mul_m4_v3(const float M[4][4], float r[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v3_fl(float r[3], float f)
void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, int size)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void copy_vn_fl(float *array_tar, int size, float val)
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
#define STRNCPY_UTF8(dst, src)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
void DEG_id_tag_update(ID *id, unsigned int flags)
#define ID_IS_EDITABLE(_id)
@ NURBS_KNOT_MODE_ENDPOINT
@ NURBS_KNOT_MODE_ENDPOINT_BEZIER
Object is a sort of wrapper for general info.
#define OB_TYPE_SUPPORT_EDITMODE(_type)
#define OBEDIT_FROM_OBACT(ob)
MDeformVert * ED_mesh_active_dvert_get_only(Object *ob)
void ED_area_tag_redraw(ScrArea *area)
bool ED_operator_view3d_active(bContext *C)
static void split(const char *text, const char *seps, char ***str, int *count)
Read Guarded memory(de)allocation.
#define RNA_TRANSLATION_PREC_DEFAULT
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
uiBut * uiDefButF(uiBlock *block, ButType type, int retval, blender::StringRef str, int x, int y, short width, short height, float *poin, float min, float max, std::optional< blender::StringRef > tip)
uiBut * uiDefButI(uiBlock *block, ButType type, int retval, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_disable(uiBut *but, const char *disabled_hint)
uiBut * uiDefButR(uiBlock *block, ButType type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_interaction_set(uiBlock *block, uiBlockInteraction_CallbackData *callbacks)
wmOperatorStatus UI_pie_menu_invoke(bContext *C, const char *idname, const wmEvent *event)
void UI_but_drawflag_enable(uiBut *but, int flag)
void UI_but_number_step_size_set(uiBut *but, float step_size)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
PointerRNA * UI_but_operator_ptr_ensure(uiBut *but)
void UI_but_drawflag_disable(uiBut *but, int flag)
uiBut * uiDefButBitS(uiBlock *block, ButType type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_align_begin(uiBlock *block)
void UI_but_number_precision_set(uiBut *but, float precision)
uiBut * uiDefButO_ptr(uiBlock *block, ButType type, wmOperatorType *ot, blender::wm::OpCallContext opcontext, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_but_unit_type_set(uiBut *but, int unit_type)
uiBut * uiDefBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_block_align_end(uiBlock *block)
#define BM_ELEM_CD_GET_FLOAT(ele, offset)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_elem_flag_test(ele, hflag)
void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const StringRef name)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
BMPartialUpdate * BM_mesh_partial_create_from_verts_group_single(BMesh &bm, const BMPartialUpdate_Params ¶ms, const BitSpan verts_mask, const int verts_mask_count)
void BM_mesh_partial_destroy(BMPartialUpdate *bmpinfo)
Span< T > as_span() const
void reinitialize(const int64_t new_size)
void remove_weak_user_and_delete_if_last() const
void add_weak_user() const
IndexMask slice_content(IndexRange range) const
void foreach_index(Fn &&fn) const
constexpr int64_t size() const
constexpr bool is_empty() const
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr bool is_empty() const
IndexRange index_range() const
void resize(const int64_t new_size)
constexpr void copy_from(Span< T > values) const
constexpr Span slice(int64_t start, int64_t size) const
void materialize(MutableSpan< T > r_span) const
MutableSpan< float3 > positions_for_write()
MutableSpan< float > nurbs_custom_knots_for_write()
OffsetIndices< int > points_by_curve() const
IndexRange curves_range() const
MutableSpan< int > resolution_for_write()
MutableSpan< int8_t > nurbs_knots_modes_for_write()
MutableSpan< float > tilt_for_write()
VArray< float > radius() const
VArray< float > tilt() const
std::optional< Span< float > > nurbs_weights() const
MutableSpan< int8_t > nurbs_orders_for_write()
void nurbs_custom_knots_update_size()
Span< float > nurbs_custom_knots() const
VArray< int > resolution() const
VArray< int8_t > nurbs_knots_modes() const
std::optional< Span< float3 > > handle_positions_left() const
Span< float3 > positions() const
MutableSpan< float > radius_for_write()
bool has_curve_with_type(CurveType type) const
std::optional< Span< float3 > > handle_positions_right() const
MutableSpan< float > nurbs_weights_for_write()
void tag_topology_changed()
void tag_positions_changed()
IndexMask nurbs_custom_knot_curves(IndexMaskMemory &memory) const
OffsetIndices< int > nurbs_custom_knots_by_curve() const
VArray< int8_t > curve_types() const
VArray< bool > cyclic() const
MutableSpan< bool > cyclic_for_write()
VArray< int8_t > nurbs_orders() const
void foreach_index(Fn &&fn) const
static bool is_cyclic(const Nurb *nu)
VecBase< float, 3 > float3
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void calculate_knots(int points_num, KnotsMode mode, int8_t order, bool cyclic, MutableSpan< float > knots)
int knots_num(int points_num, int8_t order, bool cyclic)
IndexMask curve_type_point_selection(const bke::CurvesGeometry &curves, CurveType curve_type, IndexMaskMemory &memory)
IndexMask retrieve_selected_curves(const bke::CurvesGeometry &curves, IndexMaskMemory &memory)
IndexMask retrieve_selected_points(const bke::CurvesGeometry &curves, IndexMaskMemory &memory)
bool mode_set(bContext *C, eObjectMode mode)
void vgroup_vert_active_mirror(Object *ob, int def_nr)
void masked_fill(MutableSpan< T > data, const T &value, const IndexMask &mask)
T safe_divide(const T &a, const T &b)
T length_manhattan(const VecBase< T, Size > &a)
void parallel_for_each(Range &&range, const Function &function)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
Value parallel_reduce(IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction)
void block_layout_set_current(uiBlock *block, uiLayout *layout)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
static const float tilt_limit
KnotsMode nurbs_knot_mode
CurvesGeometryRuntimeHandle * runtime
static CurvesPointSelectionStatus sum(const CurvesPointSelectionStatus &a, const CurvesPointSelectionStatus &b)
TransformMedian_Curves median
static CurvesSelectionStatus sum(const CurvesSelectionStatus &a, const CurvesSelectionStatus &b)
struct EditLatt * editlatt
MeshRuntimeHandle * runtime
ObjectRuntimeHandle * runtime
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char translation_context[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
struct ToolSettings * toolsettings
void * properties_storage
void(* properties_storage_free)(void *properties_storage)
struct EditBone * act_edbone
uiBlockInteractionBeginFn begin_fn
uiBlockInteractionEndFn end_fn
uiBlockInteractionUpdateFn update_fn
uiBlock * absolute_block()
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
void enabled_set(bool enabled)
uiLayout & row(bool align)
uiLayout & split(float percentage, bool align)
uiLayout & absolute(bool align)
void emboss_set(blender::ui::EmbossType emboss)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)