68#include "curve_fit_nd.h"
113void printknots(
Object *obedit)
119 for (nu = editnurb->
first; nu; nu = nu->
next) {
123 for (a = 0; a <
num; a++) {
129 for (a = 0; a <
num; a++) {
145 void *cv,
int key_index,
int nu_index,
int pt_index,
int vertex_index)
167 int a, key_index = 0, nu_index = 0, pt_index = 0, vertex_index = 0;
179 origbezt = orignu->
bezt;
188 *origbezt_cpy = *origbezt;
189 keyIndex =
init_cvKeyIndex(origbezt_cpy, key_index, nu_index, pt_index, vertex_index);
209 *origbp_cpy = *origbp;
210 keyIndex =
init_cvKeyIndex(origbp_cpy, key_index, nu_index, pt_index, vertex_index);
221 orignu = orignu->
next;
329 if (editnurb->
keyindex ==
nullptr) {
390 bezt2 = bezt1 + (a - 1);
406 if (bezt1 != bezt2) {
421 if (nu->
pntsv == 1) {
426 while (bp1 != bp2 && a > 0) {
457 while (bp1 != bp2 && a > 0) {
490 fp =
static_cast<float *
>(currkey->data);
500 *(fp + 9) = -*(fp + 9);
516 *(fp + 3) = -*(fp + 3);
568 memcpy(bezt, basebezt,
sizeof(
BezTriple));
569 memcpy(bezt->
vec, key,
sizeof(
float[9]));
576 memcpy(key, bezt->
vec,
sizeof(
float[9]));
591 float *startfp, *prevfp, *nextfp;
598 prevp = bezt + (a - 1);
654 if (cu->
key ==
nullptr) {
666 float(*ofs)[3] =
nullptr;
667 std::optional<blender::Array<bool>> dependent;
668 const float *oldkey, *ofp;
683 totvec += nu->
pntsu * 4;
701 for (j = 0; j < 3; j++) {
734 const bool apply_offset = (ofs && (currkey != actkey) && (*dependent)[currkey_i]);
736 float *fp = newkey =
static_cast<float *
>(
738 ofp = oldkey =
static_cast<float *
>(currkey->data);
744 newnu =
static_cast<Nurb *
>(newnurbs->
first);
747 if (currkey == actkey) {
748 const bool restore = actkey != cu->
key->
refkey;
758 for (j = 0; j < 3; j++,
i++) {
761 if (restore && oldbezt) {
768 if (restore && oldbezt) {
791 if (restore && oldbp) {
817 curofp = ofp + index;
819 for (j = 0; j < 3; j++,
i++) {
839 for (j = 0; j < 3; j++,
i++) {
857 curofp = ofp + index;
890 currkey->totelem = totvert;
894 currkey->data = newkey;
917 const char *rna_path,
921 const int len = strlen(orig_rna_path);
923 for (
FCurve *fcu : orig_curves) {
924 if (processed_fcurves.
contains(fcu)) {
927 if (!
STREQLEN(fcu->rna_path, orig_rna_path,
len)) {
931 processed_fcurves.
add(fcu);
933 const char *suffix = fcu->rna_path +
len;
934 char *new_rna_path =
BLI_sprintfN(
"%s%s", rna_path, suffix);
936 fcu->rna_path = new_rna_path;
957 char rna_path[64], orig_rna_path[64];
970 SNPRINTF(rna_path,
"splines[%d].bezier_points[%d]", nu_index, pt_index);
975 "splines[%d].bezier_points[%d]",
980 char handle_path[64], orig_handle_path[64];
981 SNPRINTF(orig_handle_path,
"%s.handle_left", orig_rna_path);
982 SNPRINTF(handle_path,
"%s.handle_right", rna_path);
985 SNPRINTF(orig_handle_path,
"%s.handle_right", orig_rna_path);
986 SNPRINTF(handle_path,
"%s.handle_left", rna_path);
1016 SNPRINTF(rna_path,
"splines[%d].points[%d]", nu_index, pt_index);
1021 orig_rna_path,
"splines[%d].points[%d]", keyIndex->
nu_index, keyIndex->
pt_index);
1047 for (
FCurve *fcu : orig_curves) {
1048 if (processed_fcurves.
contains(fcu)) {
1052 if (
STRPREFIX(fcu->rna_path,
"splines")) {
1053 const char *ch = strchr(fcu->rna_path,
'.');
1056 fcurves_to_remove.
append(fcu);
1074 SNPRINTF(rna_path,
"splines[%d]", nu_index);
1082 for (
FCurve *fcu : orig_curves) {
1083 if (processed_fcurves.
contains(fcu)) {
1086 if (
STRPREFIX(fcu->rna_path,
"splines")) {
1087 fcurves_to_remove.
append(fcu);
1091 return fcurves_to_remove;
1107 if (adt->
action !=
nullptr) {
1115 for (
FCurve *fcurve : fcurves_to_remove) {
1116 if (is_action_legacy) {
1134 for (
FCurve *driver : fcurves_to_remove) {
1158 int *old_to_new_map;
1160 int old_totvert = 0;
1163 old_totvert += nu->
pntsu * 3;
1171 for (
int i = 0;
i < old_totvert;
i++) {
1172 old_to_new_map[
i] = -1;
1175 int vertex_index = 0;
1183 if (keyIndex && keyIndex->
vertex_index + 2 < old_totvert) {
1185 old_to_new_map[keyIndex->
vertex_index] = vertex_index + 2;
1186 old_to_new_map[keyIndex->
vertex_index + 1] = vertex_index + 1;
1187 old_to_new_map[keyIndex->
vertex_index + 2] = vertex_index;
1191 old_to_new_map[keyIndex->
vertex_index + 1] = vertex_index + 1;
1192 old_to_new_map[keyIndex->
vertex_index + 2] = vertex_index + 2;
1214 *r_old_totvert = old_totvert;
1215 return old_to_new_map;
1222 int *old_to_new_map =
nullptr;
1225 if (editnurb->
keyindex ==
nullptr) {
1235 if ((object->parent) && (object->parent->data == curve) &&
1238 if (old_to_new_map ==
nullptr) {
1242 if (object->par1 < old_totvert) {
1243 index = old_to_new_map[
object->par1];
1245 object->par1 = index;
1248 if (object->par2 < old_totvert) {
1249 index = old_to_new_map[
object->par2];
1251 object->par2 = index;
1254 if (object->par3 < old_totvert) {
1255 index = old_to_new_map[
object->par3];
1257 object->par3 = index;
1261 if (object->data == curve) {
1267 if (old_to_new_map ==
nullptr) {
1272 if (hmd->
indexar[
i] < old_totvert) {
1273 index = old_to_new_map[hmd->
indexar[
i]];
1288 if (old_to_new_map !=
nullptr) {
1297 if (obedit ==
nullptr) {
1303 ListBase newnurb = {
nullptr,
nullptr}, oldnurb = cu->
nurb;
1342 undo_editmode_clear();
1397 int error_vertex_keys;
1405 for (
Base *oldbase : bases) {
1408 Curve *oldcu, *newcu;
1410 ListBase newnurb = {
nullptr,
nullptr};
1412 oldob = oldbase->object;
1413 oldcu =
static_cast<Curve *
>(oldob->
data);
1416 status.error_vertex_keys++;
1421 status.unselected++;
1429 status.error_generic++;
1467 if (status.unselected == bases.
size()) {
1472 const int tot_errors = status.error_vertex_keys + status.error_generic;
1473 if (tot_errors > 0) {
1476 if (status.changed) {
1482 if (((status.error_vertex_keys ? 1 : 0) + (status.error_generic ? 1 : 0)) > 1) {
1487 if (status.error_vertex_keys) {
1505 ot->name =
"Separate";
1506 ot->idname =
"CURVE_OT_separate";
1507 ot->description =
"Separate selected points from connected unselected points into a new object";
1529 bool changed =
false;
1530 int count_failed = 0;
1534 for (
Object *obedit : objects) {
1541 ListBase newnurb = {
nullptr,
nullptr};
1566 if (changed ==
false) {
1567 if (count_failed != 0) {
1579 ot->idname =
"CURVE_OT_split";
1580 ot->description =
"Split off selected points from connected unselected points";
1606 for (a = 0; a < nu->
pntsu; a++, bp++) {
1611 if (sel == nu->
pntsu) {
1614 else if (sel >= 1) {
1631 for (a = 0; a < nu->
pntsu; a++) {
1635 if (bp->f1 &
flag) {
1639 if (sel == nu->
pntsv) {
1642 else if (sel >= 1) {
1653 const float cent[3],
1654 const float rotmat[3][3])
1742 BPoint *bp, *bpn, *newbp;
1743 int a,
b, newu, newv;
1774 newv = nu->
pntsv - newv;
1775 if (newv != nu->
pntsv) {
1800 newu = nu->
pntsu - newu;
1801 if (newu != nu->
pntsu) {
1806 for (a = 0; a < nu->
pntsu; a++, bp++) {
1819 if (newu == 1 && nu->
pntsv > 1) {
1844 int a, type, nuindex = 0;
1863 if (cu->
actnu == nuindex) {
1889 if (cu->
actnu == nuindex) {
1905 clamp_nurb_order_u(nu);
1915 for (a = 0; a < nu->
pntsu; a++) {
1917 memmove(bezt, bezt + 1, (nu->
pntsu - a - 1) *
sizeof(
BezTriple));
1937 else if (nu->
pntsv == 1) {
1940 for (a = 0; a < nu->
pntsu; a++) {
1942 memmove(bp, bp + 1, (nu->
pntsu - a - 1) *
sizeof(
BPoint));
1964 clamp_nurb_order_u(nu);
1977 const bool selstatus,
2000 int copy_intervals[],
2001 int *interval_count,
2002 bool *out_is_first_sel)
2006 int selected_leg_count = 0;
2008 int selected_in_prev_leg = -1;
2011 bool is_first_sel =
false;
2012 bool is_last_sel =
false;
2014 for (
int j = 0; j < max_j; j++, bp_j += next_j) {
2015 const BPoint *bp_j_i = bp_j;
2016 int selected_in_curr_leg = 0;
2017 for (
int i = 0;
i <
max_i;
i++, bp_j_i += next_i) {
2019 selected_in_curr_leg++;
2022 if (selected_in_curr_leg ==
max_i) {
2023 selected_leg_count++;
2025 is_first_sel =
true;
2027 else if (j + 1 == max_j) {
2031 else if (not_full == -1) {
2032 not_full = selected_in_curr_leg;
2035 else if (not_full != selected_in_curr_leg) {
2039 if (selected_in_prev_leg != selected_in_curr_leg) {
2040 copy_intervals[ins] = selected_in_curr_leg ==
max_i || j == 0 ? j : j - 1;
2042 selected_in_prev_leg = selected_in_curr_leg;
2044 copy_intervals[ins] = j;
2046 if (selected_leg_count &&
2049 (selected_leg_count < max_j || max_j == 1))
2053 if (is_first_sel && (copy_intervals[0] < copy_intervals[1] || max_j == 1)) {
2054 memmove(copy_intervals + 1, copy_intervals, (ins + 1) *
sizeof(copy_intervals[0]));
2055 copy_intervals[0] = 0;
2057 is_first_sel =
false;
2060 if (is_last_sel && copy_intervals[ins - 1] < copy_intervals[ins]) {
2061 copy_intervals[ins + 1] = copy_intervals[ins];
2065 *interval_count = ins;
2066 *out_is_first_sel = ins > 1 ? is_first_sel :
false;
2067 return selected_leg_count;
2096 bool is_first_sel_u;
2101 if (selected_us == -1) {
2105 bool is_first_sel_v;
2107 const bool is_point = nu->
pntsu == 1;
2108 const bool is_curve = nu->
pntsv == 1;
2109 const bool extrude_every_u_point = selected_us == nu->
pntsu;
2110 if (is_point || (is_curve && !extrude_every_u_point)) {
2111 intvls_v[0] = intvls_v[1] = 0;
2113 is_first_sel_v =
false;
2127 const int new_pntsu = nu->
pntsu + intvl_cnt_u - 1;
2128 const int new_pntsv = nu->
pntsv + intvl_cnt_v - 1;
2130 BPoint *new_bp_v = new_bp;
2132 bool selected_v = is_first_sel_v;
2133 for (
int j = 1; j <= intvl_cnt_v; j++, selected_v = !selected_v) {
2135 for (
int v_j = intvls_v[j - 1]; v_j <= intvls_v[j];
2136 v_j++, new_bp_v += new_pntsu, old_bp_v += nu->
pntsu)
2138 BPoint *new_bp_u_v = new_bp_v;
2139 bool selected_u = is_first_sel_u;
2140 for (
int i = 1;
i <= intvl_cnt_u;
i++, selected_u = !selected_u) {
2141 const int copy_from = intvls_u[
i - 1];
2142 const int copy_to = intvls_u[
i];
2143 const int copy_count = copy_to - copy_from + 1;
2144 const bool sel_status = selected_u || selected_v ?
true :
false;
2145 ED_curve_bpcpy(editnurb, new_bp_u_v, old_bp_v + copy_from, copy_count);
2147 new_bp_u_v += copy_count;
2154 nu->
pntsu = new_pntsu;
2155 if (nu->
pntsv == 1 && new_pntsv > 1) {
2158 nu->
pntsv = new_pntsv;
2182 if ((start <= cu->actvert) && (end > cu->
actvert)) {
2196 BPoint *bp, *bp1, *bp2, *bp3;
2198 int a,
b, c, starta, enda, diffa, cyclicu, cyclicv, newu, newv;
2203 cyclicu = cyclicv = 0;
2205 for (a = 0, bezt = nu->
bezt; a < nu->pntsu; a++, bezt++) {
2213 if (a >= nu->
pntsu - 1) {
2219 if (enda >= starta) {
2220 newu = diffa = enda - starta + 1;
2226 if (enda == nu->
pntsu - 1) {
2231 editnurb, newnurb, cu, starta, starta + diffa, cu->
actvert - starta);
2236 if (newu != diffa) {
2240 editnurb, newnurb, cu, 0, cyclicu, newu - cyclicu + cu->
actvert);
2245 if (newu != nu->
pntsu) {
2274 else if (nu->
pntsv == 1) {
2275 for (a = 0, bp = nu->
bp; a < nu->pntsu; a++, bp++) {
2283 if (a >= nu->
pntsu - 1) {
2289 if (enda >= starta) {
2290 newu = diffa = enda - starta + 1;
2296 if (enda == nu->
pntsu - 1) {
2301 editnurb, newnurb, cu, starta, starta + diffa, cu->
actvert - starta);
2305 memcpy(newnu->
bp, &nu->
bp[starta], diffa *
sizeof(
BPoint));
2306 if (newu != diffa) {
2307 memcpy(&newnu->
bp[diffa], nu->
bp, cyclicu *
sizeof(
BPoint));
2310 editnurb, newnurb, cu, 0, cyclicu, newu - cyclicu + cu->
actvert);
2315 if (newu != nu->
pntsu) {
2334 memcpy(newnu->
bp, nu->
bp, cyclicu *
sizeof(
BPoint));
2350 for (a = 0; a < nu->
pntsv; a++) {
2351 for (
b = 0;
b < nu->
pntsu;
b++, bp++) {
2359 for (a = 0; a < nu->
pntsu; a++) {
2361 if (
ELEM(newv, 0, usel[a])) {
2373 if ((newu == 0 || newv == 0) ||
2377 printf(
"Can't duplicate Nurb\n");
2381 for (a = 0, bp1 = nu->
bp; a < nu->pntsu * nu->
pntsv; a++, bp1++) {
2389 for (c = a / nu->
pntsu, bp3 = bp2; c < nu->pntsv; c++, bp3 += nu->
pntsu) {
2408 if ((newu + newv) > 2) {
2418 if (cyclicu != 0 || cyclicv != 0) {
2423 if (a + newu == nu->
pntsu && cyclicu != 0) {
2426 for (
b = 0;
b < newv;
b++) {
2427 memcpy(&newnu->
bp[
b * newnu->
pntsu],
2430 memcpy(&newnu->
bp[
b * newnu->
pntsu + newu],
2432 cyclicu *
sizeof(
BPoint));
2440 for (
b = 0, diffa = 0;
b < newv;
b++, diffa += nu->
pntsu - newu) {
2441 starta =
b * nu->
pntsu + a;
2466 cyclicu = cyclicv = 0;
2468 else if ((a / nu->
pntsu) + newv == nu->
pntsv && cyclicv != 0) {
2471 memcpy(newnu->
bp, &nu->
bp[a], newu * newv *
sizeof(
BPoint));
2472 memcpy(&newnu->
bp[newu * newv], nu->
bp, newu * cyclicv *
sizeof(
BPoint));
2477 editnurb, newnurb, cu, cu->
actvert, a, (newu * newv) + cu->
actvert);
2479 cyclicu = cyclicv = 0;
2483 for (
b = 0;
b < newv;
b++) {
2484 memcpy(&newnu->
bp[
b * newu], &nu->
bp[
b * nu->
pntsu + a], newu *
sizeof(
BPoint));
2494 for (
b = 0, diffa = 0;
b < newv;
b++, diffa += nu->
pntsu - newu) {
2495 starta =
b * nu->
pntsu + a;
2502 (starta % nu->
pntsu))))
2511 if (newu != nu->
pntsu) {
2514 if (newv != nu->
pntsv) {
2520 if (cyclicu != 0 || cyclicv != 0) {
2522 newu = cyclicu == 0 ? nu->
pntsu : cyclicu;
2523 newv = cyclicv == 0 ? nu->
pntsv : cyclicv;
2526 for (
b = 0;
b < newv;
b++) {
2536 for (
b = 0, diffa = 0;
b < newv;
b++, diffa += nu->
pntsu - newu) {
2552 if (newu != nu->
pntsu) {
2555 if (newv != nu->
pntsv) {
2586 for (a = 0, bp = nu->
bp; a < nu->pntsu * nu->
pntsv; a++, bp++) {
2613 for (
Object *obedit : objects) {
2646 ot->name =
"Switch Direction";
2647 ot->description =
"Switch direction of selected splines";
2648 ot->idname =
"CURVE_OT_switch_direction";
2671 for (
Object *obedit : objects) {
2680 for (bezt = nu->
bezt, a = 0; a < nu->pntsu; a++, bezt++) {
2687 for (bp = nu->
bp, a = 0; a < nu->pntsu * nu->
pntsv; a++, bp++) {
2705 ot->name =
"Set Goal Weight";
2706 ot->description =
"Set softbody goal weight for selected points";
2707 ot->idname =
"CURVE_OT_spline_weight_set";
2736 for (
Object *obedit : objects) {
2752 for (bezt = nu->
bezt, a = 0; a < nu->pntsu; a++, bezt++) {
2759 for (bp = nu->
bp, a = 0; a < nu->pntsu * nu->
pntsv; a++, bp++) {
2777 ot->name =
"Set Curve Radius";
2778 ot->description =
"Set per-point radius which is used for bevel tapering";
2779 ot->idname =
"CURVE_OT_radius_set";
2807 for (
int i = 0;
i < 3;
i++) {
2809 float val_old = bezt->
vec[1][
i];
2812 float val_new = (bezt_orig_prev->
vec[1][
i] * 0.5f) + (bezt_orig_next->
vec[1][
i] * 0.5f);
2813 float offset = (val_old * (1.0f - factor)) + (val_new * factor) - val_old;
2816 bezt->
vec[1][
i] += offset;
2817 bezt->
vec[0][
i] += offset;
2818 bezt->
vec[2][
i] += offset;
2826 const BPoint *bp_orig_prev,
2827 const BPoint *bp_orig_next,
2832 for (
int i = 0;
i < 3;
i++) {
2833 float val_old, val_new, offset;
2835 val_old = bp->
vec[
i];
2836 val_new = (bp_orig_prev->
vec[
i] * 0.5f) + (bp_orig_next->
vec[
i] * 0.5f);
2837 offset = (val_old * (1.0f - factor)) + (val_new * factor) - val_old;
2839 bp->
vec[
i] += offset;
2845 const float factor = 1.0f / 6.0f;
2853 for (
Object *obedit : objects) {
2870 bool changed =
false;
2879 a_end = nu->
pntsu - 1;
2883 for (; a < a_end; a++) {
2885 bezt = &nu->
bezt[a];
2887 const BezTriple *bezt_orig_prev, *bezt_orig_next;
2889 bezt_orig_prev = &bezt_orig[
mod_i(a - 1, nu->
pntsu)];
2890 bezt_orig_next = &bezt_orig[
mod_i(a + 1, nu->
pntsu)];
2913 a_end = nu->
pntsu - 1;
2916 for (; a < a_end; a++) {
2919 const BPoint *bp_orig_prev, *bp_orig_next;
2921 bp_orig_prev = &bp_orig[
mod_i(a - 1, nu->
pntsu)];
2922 bp_orig_next = &bp_orig[
mod_i(a + 1, nu->
pntsu)];
2941 ot->name =
"Smooth";
2942 ot->description =
"Flatten angles of selected points";
2943 ot->idname =
"CURVE_OT_smooth";
2971 int start_sel, end_sel;
2972 float start_rad, end_rad, fac, range;
2976#define BEZT_VALUE(bezt) (*((float *)((char *)(bezt) + bezt_offsetof)))
2978 for (last_sel = 0; last_sel < nu->
pntsu; last_sel++) {
2984 for (bezt = &nu->
bezt[last_sel], a = last_sel; a < nu->pntsu; a++, bezt++) {
2991 end_sel = start_sel;
2992 for (bezt = &nu->
bezt[start_sel + 1], a = start_sel + 1; a < nu->pntsu; a++, bezt++) {
2999 if (start_sel == -1) {
3000 last_sel = nu->
pntsu;
3006 start_rad = end_rad =
FLT_MAX;
3008 if (start_sel == end_sel) {
3010 if (start_sel > 0) {
3013 if (end_sel != -1 && end_sel < nu->pntsu) {
3020 else if (start_rad !=
FLT_MAX) {
3023 else if (end_rad !=
FLT_MAX) {
3029 if (start_sel == 0) {
3036 if (end_sel == nu->
pntsu - 1) {
3045 range = float(end_sel - start_sel) + 2.0f;
3046 for (bezt = &nu->
bezt[start_sel], a = start_sel; a <= end_sel; a++, bezt++) {
3047 fac = float(1 + a - start_sel) / range;
3048 BEZT_VALUE(bezt) = start_rad * (1.0f - fac) + end_rad * fac;
3056#define BP_VALUE(bp) (*((float *)((char *)(bp) + bp_offset)))
3059 for (last_sel = 0; last_sel < nu->
pntsu; last_sel++) {
3065 for (bp = &nu->
bp[last_sel], a = last_sel; a < nu->pntsu; a++, bp++) {
3072 end_sel = start_sel;
3073 for (bp = &nu->
bp[start_sel + 1], a = start_sel + 1; a < nu->pntsu; a++, bp++) {
3080 if (start_sel == -1) {
3081 last_sel = nu->
pntsu;
3087 start_rad = end_rad =
FLT_MAX;
3089 if (start_sel == end_sel) {
3091 if (start_sel > 0) {
3092 start_rad =
BP_VALUE(&nu->
bp[start_sel - 1]);
3094 if (end_sel != -1 && end_sel < nu->pntsu) {
3099 BP_VALUE(&nu->
bp[start_sel]) = (start_rad + end_rad) / 2;
3101 else if (start_rad !=
FLT_MAX) {
3104 else if (end_rad !=
FLT_MAX) {
3110 if (start_sel == 0) {
3115 start_rad =
BP_VALUE(&nu->
bp[start_sel - 1]);
3117 if (end_sel == nu->
pntsu - 1) {
3126 range = float(end_sel - start_sel) + 2.0f;
3127 for (bp = &nu->
bp[start_sel], a = start_sel; a <= end_sel; a++, bp++) {
3128 fac = float(1 + a - start_sel) / range;
3129 BP_VALUE(bp) = start_rad * (1.0f - fac) + end_rad * fac;
3152 for (
Object *obedit : objects) {
3167 ot->name =
"Smooth Curve Weight";
3168 ot->description =
"Interpolate weight of selected points";
3169 ot->idname =
"CURVE_OT_smooth_weight";
3195 for (
Object *obedit : objects) {
3217 ot->name =
"Smooth Curve Radius";
3218 ot->description =
"Interpolate radii of selected points";
3219 ot->idname =
"CURVE_OT_smooth_radius";
3244 for (
Object *obedit : objects) {
3266 ot->name =
"Smooth Curve Tilt";
3267 ot->description =
"Interpolate tilt of selected points";
3268 ot->idname =
"CURVE_OT_smooth_tilt";
3294 for (
Object *obedit : objects) {
3325 if (sel == nu->
pntsu) {
3363 ot->name =
"Hide Selected";
3364 ot->idname =
"CURVE_OT_hide";
3365 ot->description =
"Hide (un)selected control points";
3376 ot->srna,
"unselected",
false,
"Unselected",
"Hide unselected rather than selected");
3390 bool changed_multi =
false;
3394 for (
Object *obedit : objects) {
3399 bool changed =
false;
3433 changed_multi =
true;
3442 ot->name =
"Reveal Hidden";
3443 ot->idname =
"CURVE_OT_reveal";
3444 ot->description =
"Reveal hidden control points";
3483 BPoint *bp, *prevbp, *bpnew, *bpn;
3485 int a,
b, sel, amount, *usel, *vsel;
3505 if (nextbezt ==
nullptr) {
3511 amount += number_cuts;
3528 if (nextbezt ==
nullptr) {
3535 float prevvec[3][3];
3536 float prev_tilt = bezt->
tilt;
3537 float prev_radius = bezt->
radius;
3538 float prev_weight = bezt->
weight;
3540 memcpy(prevvec, bezt->
vec,
sizeof(
float[9]));
3542 for (
int i = 0;
i < number_cuts;
i++) {
3543 factor = 1.0f / (number_cuts + 1 -
i);
3545 memcpy(beztn, nextbezt,
sizeof(
BezTriple));
3573 memcpy(prevvec, beztn->
vec,
sizeof(
float[9]));
3584 nu->
pntsu += amount;
3589 else if (nu->
pntsv == 1) {
3601 if (nextbp ==
nullptr) {
3606 amount += number_cuts;
3621 memcpy(bpn, bp,
sizeof(
BPoint));
3626 if (nextbp ==
nullptr) {
3632 for (
int i = 0;
i < number_cuts;
i++) {
3633 factor = float(
i + 1) / (number_cuts + 1);
3635 memcpy(bpn, nextbp,
sizeof(
BPoint));
3645 nu->
pntsu += amount;
3701 for (a = 0; a < nu->
pntsv; a++) {
3716 int countu = nu->
pntsu + (nu->
pntsu - 1) * number_cuts;
3719 int tot = ((number_cuts + 1) * nu->
pntsu - number_cuts) *
3720 ((number_cuts + 1) * nu->
pntsv - number_cuts);
3725 for (a = 0; a < nu->
pntsv; a++) {
3733 for (
int i = 0;
i < number_cuts;
i++) {
3734 factor = float(
i + 1) / (number_cuts + 1);
3741 bpn += number_cuts * countu;
3744 bpn = bpnew + ((number_cuts + 1) * nu->
pntsu - number_cuts);
3745 bp = bpnew + (number_cuts + 1) * ((number_cuts + 1) * nu->
pntsu - number_cuts);
3747 for (a = 1; a < nu->
pntsv; a++) {
3749 for (
b = 0;
b < (number_cuts + 1) * nu->
pntsu - number_cuts;
b++) {
3751 for (
int i = 0;
i < number_cuts;
i++) {
3752 factor = float(
i + 1) / (number_cuts + 1);
3761 bp += number_cuts * countu;
3762 bpn += number_cuts * countu;
3763 prevbp += number_cuts * countu;
3767 nu->
pntsu = (number_cuts + 1) * nu->
pntsu - number_cuts;
3768 nu->
pntsv = (number_cuts + 1) * nu->
pntsv - number_cuts;
3775 for (a = 0; a < nu->
pntsv - 1; a++) {
3776 if (vsel[a] == nu->
pntsu && vsel[a + 1] == nu->
pntsu) {
3784 for (a = 0; a < nu->
pntsv; a++) {
3791 if ((a < nu->pntsv - 1) && vsel[a] == nu->
pntsu && vsel[a + 1] == nu->
pntsu) {
3792 for (
int i = 0;
i < number_cuts;
i++) {
3793 factor = float(
i + 1) / (number_cuts + 1);
3794 prevbp = bp - nu->
pntsu;
3822 for (a = 0; a < nu->
pntsu - 1; a++) {
3823 if (usel[a] == nu->
pntsv && usel[a + 1] == nu->
pntsv) {
3834 for (a = 0; a < nu->
pntsv; a++) {
3848 for (
int i = 0;
i < number_cuts;
i++) {
3849 factor = float(
i + 1) / (number_cuts + 1);
3883 for (
Object *obedit : objects) {
3908 ot->name =
"Subdivide";
3909 ot->description =
"Subdivide selected segments";
3910 ot->idname =
"CURVE_OT_subdivide";
3919 prop =
RNA_def_int(
ot->srna,
"number_cuts", 1, 1, 1000,
"Number of Cuts",
"", 1, 10);
3939 for (
Object *obedit : objects) {
3943 bool changed =
false;
3944 bool changed_size =
false;
3950 const int pntsu_prev = nu->
pntsu;
3951 const char *err_msg =
nullptr;
3954 if (pntsu_prev != nu->
pntsu) {
3955 changed_size =
true;
3987 {
CU_POLY,
"POLY", 0,
"Poly",
""},
3988 {
CU_BEZIER,
"BEZIER", 0,
"Bézier",
""},
3989 {
CU_NURBS,
"NURBS", 0,
"NURBS",
""},
3990 {0,
nullptr, 0,
nullptr,
nullptr},
3994 ot->name =
"Set Spline Type";
3995 ot->description =
"Set type of active spline";
3996 ot->idname =
"CURVE_OT_spline_type_set";
4012 "Use handles when converting Bézier curves into polygons");
4033 for (
Object *obedit : objects) {
4053 {
HD_AUTO,
"AUTOMATIC", 0,
"Automatic",
""},
4054 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
4055 {5,
"ALIGNED", 0,
"Aligned",
""},
4056 {6,
"FREE_ALIGN", 0,
"Free",
""},
4057 {3,
"TOGGLE_FREE_ALIGN", 0,
"Toggle Free/Align",
""},
4058 {0,
nullptr, 0,
nullptr,
nullptr},
4062 ot->name =
"Set Handle Type";
4063 ot->description =
"Set type of handles for selected control points";
4064 ot->idname =
"CURVE_OT_handle_type_set";
4075 ot->prop =
RNA_def_enum(
ot->srna,
"type", editcurve_handle_type_items, 1,
"Type",
"Spline type");
4097 for (
Object *obedit : objects) {
4122 ot->name =
"Recalculate Handles";
4123 ot->description =
"Recalculate the direction of selected handles";
4124 ot->idname =
"CURVE_OT_normals_make_consistent";
4134 RNA_def_boolean(
ot->srna,
"calc_length",
false,
"Length",
"Recalculate handle length");
4147 float *fp1, *fp2, *tempf;
4150 if (base ==
nullptr || tot == 0) {
4157 fp2 = fp1 + (a - 1);
4159 while (fp1 != fp2 && a > 0) {
4160 std::swap(*fp1, *fp2);
4171 fp2[0] =
fabsf(fp1[1] - fp1[0]);
4183 fp1[0] = fp1[-1] + fp2[0];
4192 BPoint *bp1, *bp2, *temp;
4206 for (u = 0; u < nu->
pntsu; u++, bp1++) {
4207 bp2 = temp + (nu->
pntsu - u - 1) * (nu->
pntsv) +
v;
4239 ListBase nbase = {
nullptr,
nullptr};
4240 NurbSort *nus, *nustest, *headdo, *taildo;
4242 float dist, headdist, taildist;
4268 while (nbase.
first) {
4270 headdist = taildist = 1.0e30;
4271 headdo = taildo =
nullptr;
4277 if (dist < headdist) {
4283 if (dist < taildist) {
4287 nustest = nustest->
next;
4290 if (headdist < taildist) {
4310 BPoint *bp, *bp1, *bp2, *temp;
4345 if (nu1->
pntsv != 1) {
4378 if (nu1->
pntsu == 1) {
4381 if (nu2->
pntsv != 1) {
4397 bp1 = &nu1->
bp[nu1->
pntsu - 1];
4405 bp1 = &nu1->
bp[nu1->
pntsu - 1];
4438 for (u = 0; u < nu1->
pntsu; u++, bp++) {
4473 ListBase nsortbase = {
nullptr,
nullptr};
4477 if (nsortbase.
first == nsortbase.
last) {
4494 else if (nus2->
nu->
pntsv == 1) {
4540 int error_selected_few;
4541 int error_resolution;
4547 for (
Object *obedit : objects) {
4551 status.unselected++;
4556 Nurb *nu, *nu1 =
nullptr, *nu2 =
nullptr;
4562 nu =
static_cast<Nurb *
>(nubase->
first);
4570 if (nu_select_num) {
4576 if (nu_select_num > 1) {
4580 if (nu->
pntsv == 1) {
4594 switch (merge_result) {
4597 goto curve_merge_tag_object;
4599 status.error_resolution++;
4600 goto curve_merge_tag_object;
4602 status.error_selected_few++;
4605 status.error_resolution++;
4613 if (nu->
pntsu == 1) {
4621 if (nu2 ==
nullptr) {
4624 else if (nu1 ==
nullptr) {
4638 if (nu1 ==
nullptr) {
4641 else if (nu2 ==
nullptr) {
4654 else if (nu->
pntsv == 1) {
4662 if (nu2 ==
nullptr) {
4665 else if (nu1 ==
nullptr) {
4675 if (nu1 ==
nullptr) {
4678 else if (nu2 ==
nullptr) {
4696 if ((nu1 && nu2) && (nu1 != nu2)) {
4697 if (nu1->
type == nu2->type) {
4705 nu1->
pntsu += nu2->pntsu;
4721 nu1->
pntsu += nu2->pntsu;
4739 else if ((nu1 && !nu2) || (!nu1 && nu2)) {
4741 std::swap(nu1, nu2);
4763 status.error_generic++;
4773 curve_merge_tag_object:
4778 if (status.unselected == objects.
size()) {
4783 const int tot_errors = status.error_selected_few + status.error_resolution +
4784 status.error_generic;
4785 if (tot_errors > 0) {
4787 if (status.changed) {
4793 if (((status.error_selected_few ? 1 : 0) + (status.error_resolution ? 1 : 0) +
4794 (status.error_generic ? 1 : 0)) > 1)
4800 if (status.error_selected_few) {
4803 else if (status.error_resolution) {
4819 ot->name =
"Make Segment";
4820 ot->idname =
"CURVE_OT_make_segment";
4821 ot->description =
"Join two curves by their selected ends";
4846 Base *basact =
nullptr;
4848 bool changed =
false;
4859 if ((found &&
params.select_passthrough) &&
4860 (((bezt ? (&bezt->
f1)[hand] : bp->
f1) &
SELECT) != 0))
4864 else if (found ||
params.deselect_all) {
4868 for (
Object *ob_iter : objects) {
4888 if (use_handle_select) {
4914 if (use_handle_select) {
4924 else if (hand == 0) {
4943 if (use_handle_select) {
4954 if (use_handle_select) {
4963 else if (hand == 0) {
4990 if (use_handle_select) {
5038 return changed || found;
5048 float viewmat[4][4],
View3D *v3d,
Object *obedit,
const float axis[3],
const float cent[3])
5052 float cmat[3][3], tmat[3][3], imat[3][3];
5053 float bmat[3][3], rotmat[3][3], scalemat1[3][3], scalemat2[3][3];
5054 float persmat[3][3], persinv[3][3];
5055 bool ok, changed =
false;
5062 copy_m3_m4(bmat, obedit->object_to_world().ptr());
5079 scalemat2[0][0] /= float(
M_SQRT2);
5080 scalemat2[1][1] /= float(
M_SQRT2);
5089 for (a = 0; a < 7; a++) {
5133 float cent[3], axis[3], viewmat[4][4];
5134 bool changed =
false;
5135 int count_failed = 0;
5149 for (
Object *obedit : objects) {
5157 mul_m4_v3(obedit->world_to_object().ptr(), cent);
5173 if (changed ==
false) {
5174 if (count_failed != 0) {
5186 float axis[3] = {0.0f, 0.0f, 1.0f};
5202 ot->idname =
"CURVE_OT_spin";
5203 ot->description =
"Extrude selected boundary row around pivot point and current view axis";
5220 "Center in global view space",
5224 ot->srna,
"axis", 3,
nullptr, -1.0f, 1.0f,
"Axis",
"Axis in global view space", -1.0f, 1.0f);
5235 bool changed =
false;
5254 int pnt_len = nu->
pntsu;
5257 bool is_prev_selected =
false;
5258 bool duplic_first =
false;
5259 bool duplic_last =
false;
5267 bezt_prev = &nu->
bezt[0];
5271 bezt_prev = &nu->
bezt[pnt_len - 1];
5282 bezt_stack = nu->
bezt[0];
5284 bezt_prev = &bezt_stack;
5291 for (bezt = &nu->
bezt[0];
i--; bezt++) {
5293 if (bezt_prev && is_prev_selected != is_selected) {
5296 if (bezt == cu_actvert.bezt) {
5297 act_offset = new_points;
5300 is_prev_selected = is_selected;
5308 is_prev_selected =
false;
5314 else if (duplic_first) {
5315 bezt_prev = &bezt_stack;
5316 is_prev_selected =
false;
5319 bezt_prev =
nullptr;
5321 BezTriple *bezt_src, *bezt_dst, *bezt_src_iter, *bezt_dst_iter;
5322 const int new_len = pnt_len + new_points;
5324 bezt_src = nu->
bezt;
5326 bezt_src_iter = &bezt_src[0];
5327 bezt_dst_iter = &bezt_dst[0];
5329 for (bezt = &nu->
bezt[0];
i < pnt_len;
i++, bezt++) {
5337 if (bezt_prev && is_prev_selected != is_selected) {
5338 int count =
i - offset + 1;
5339 if (is_prev_selected) {
5349 bezt_dst_iter +=
count + 1;
5350 bezt_src_iter +=
count;
5354 is_prev_selected = is_selected;
5357 int remain = pnt_len - offset;
5363 ED_curve_beztcpy(editnurb, &bezt_dst[new_len - 1], &bezt_src[pnt_len - 1], 1);
5368 nu->
bezt = bezt_dst;
5369 nu->
pntsu += new_points;
5374 BPoint *bp, *bp_prev =
nullptr;
5379 bp_prev = &nu->
bp[0];
5385 bp_stack = nu->
bp[0];
5387 bp_prev = &bp_stack;
5395 for (bp = &nu->
bp[0];
i--; bp++) {
5396 bool is_selected = (bp->
f1 &
SELECT) != 0;
5397 if (bp_prev && is_prev_selected != is_selected) {
5400 if (bp == cu_actvert.bp) {
5401 act_offset = new_points;
5404 is_prev_selected = is_selected;
5408 BPoint *bp_src, *bp_dst, *bp_src_iter, *bp_dst_iter;
5409 const int new_len = pnt_len + new_points;
5411 is_prev_selected =
false;
5417 else if (duplic_first) {
5418 bp_prev = &bp_stack;
5419 is_prev_selected =
false;
5426 bp_src_iter = &bp_src[0];
5427 bp_dst_iter = &bp_dst[0];
5429 for (bp = &nu->
bp[0];
i < pnt_len;
i++, bp++) {
5430 bool is_selected = (bp->
f1 &
SELECT) != 0;
5431 if (bp_prev && is_prev_selected != is_selected) {
5432 int count =
i - offset + 1;
5433 if (is_prev_selected) {
5443 bp_dst_iter +=
count + 1;
5444 bp_src_iter +=
count;
5448 is_prev_selected = is_selected;
5451 int remain = pnt_len - offset;
5457 ED_curve_bpcpy(editnurb, &bp_dst[new_len - 1], &bp_src[pnt_len - 1], 1);
5463 nu->
pntsu += new_points;
5487 bool changed =
false;
5520 mul_v3_fl(center, 1.0f /
float(verts_len));
5585 memcpy(nurb_new->
bp, nu->
bp,
sizeof(
BPoint));
5685 const float mval[2] = {float(event->
mval[0]), float(event->
mval[1])};
5711 const float eps = 1e-6f;
5718 const float *plane_co = vc.
obedit->object_to_world().location();
5730 float location_test[3];
5755 ot->name =
"Extrude to Cursor or Add";
5756 ot->idname =
"CURVE_OT_vertex_add";
5757 ot->description =
"Add a new control point (linked to only selected end-curve one, if any)";
5775 "Location to add new vertex at",
5795 for (
Object *obedit : objects) {
5798 bool changed =
false;
5826 ot->name =
"Extrude";
5827 ot->description =
"Extrude selected control point(s)";
5828 ot->idname =
"CURVE_OT_extrude";
5857 bool changed =
false;
5908 if (direction == 0 && nu->
pntsu > 1) {
5914 if (direction == 1 && nu->
pntsv > 1) {
5936 bool changed_multi =
false;
5940 for (
Object *obedit : objects) {
5949 changed_multi =
true;
5987 {0,
"CYCLIC_U", 0,
"Cyclic U",
""},
5988 {1,
"CYCLIC_V", 0,
"Cyclic V",
""},
5989 {0,
nullptr, 0,
nullptr,
nullptr},
5993 ot->name =
"Toggle Cyclic";
5994 ot->description =
"Make active spline closed/opened loop";
5995 ot->idname =
"CURVE_OT_cyclic_toggle";
6011 "Direction to make surface cyclic in");
6026 bool changed =
false;
6027 int count_failed = 0;
6031 for (
Object *obedit : objects) {
6038 ListBase newnurb = {
nullptr,
nullptr};
6052 if (changed ==
false) {
6053 if (count_failed != 0) {
6064 ot->name =
"Duplicate Curve";
6065 ot->description =
"Duplicate selected control points";
6066 ot->idname =
"CURVE_OT_duplicate";
6098 ListBase *nubase = &editnurb->
nurbs, newnurb = {
nullptr,
nullptr};
6102 int a,
b, starta, enda, cut, cyclicut;
6106 starta = enda = cut = -1;
6110 for (a = 0, bezt = nu->
bezt; a < nu->pntsu; a++, bezt++) {
6116 if (a < nu->pntsu - 1) {
6127 if (starta <= 1 && a == nu->pntsu - 1) {
6129 if (starta == 1 && enda != a) {
6135 cut = enda - starta + 1;
6138 else if (starta == 0) {
6141 cut = enda - starta + 1;
6151 starta = nu->
pntsu - 1;
6163 else if (enda == nu->
pntsu - 1) {
6166 cut = enda - starta + 1;
6168 bezt2 = &nu->
bezt[1];
6177 else if (cyclicut != 0) {
6191 cut = enda - starta + 1;
6195 if (nu1 !=
nullptr) {
6199 if (starta != 0 || enda != nu->
pntsu - 1) {
6211 bezt2 = &nu->
bezt[1];
6229 else if (nu->
pntsv >= 1) {
6233 for (a = 0, bp = nu->
bp; a < nu->pntsu; a++, bp++) {
6239 if (a < nu->pntsu - 1) {
6243 else if (a < nu->pntsu - 1 && !((bp + 1)->f1 &
SELECT)) {
6250 if (starta <= 1 && a == nu->pntsu - 1) {
6252 if (starta == 1 && enda != a) {
6258 cut = enda - starta + 1;
6261 else if (starta == 0) {
6264 cut = enda - starta + 1;
6275 starta = nu->
pntsu - 1;
6287 else if (enda == nu->
pntsu - 1) {
6290 cut = enda - starta + 1;
6302 else if (cyclicut != 0) {
6307 editnurb, &nu1->
bp[
b * nu1->
pntsu + cut], &nu->
bp[
b * nu->
pntsu], cyclicut);
6318 cut = enda - starta + 1;
6322 if (nu1 !=
nullptr) {
6329 if (starta != 0 || enda != nu->
pntsu - 1) {
6364 for (a = 0, bp = nu->
bp; a < nu->pntsv; a++, bp += nu->
pntsu) {
6370 if (a < nu->pntsv - 1) {
6374 else if (a < nu->pntsv - 1 && !((bp + nu->
pntsu)->f1 &
SELECT)) {
6381 if (starta <= 1 && a == nu->pntsv - 1) {
6383 if (starta == 1 && enda != a) {
6389 cut = enda - starta + 1;
6392 else if (starta == 0) {
6395 cut = enda - starta + 1;
6403 starta = nu->
pntsv - 1;
6415 else if (enda == nu->
pntsv - 1) {
6418 cut = enda - starta + 1;
6427 else if (cyclicut != 0) {
6441 cut = enda - starta + 1;
6445 if (nu1 !=
nullptr) {
6449 if (starta != 0 || enda != nu->
pntsv - 1) {
6511 if (nu->
pntsv > 1) {
6534 bool changed_multi =
false;
6536 for (
Object *obedit : objects) {
6538 bool changed =
false;
6556 changed_multi =
true;
6568 if (changed_multi) {
6577 {0,
nullptr, 0,
nullptr,
nullptr},
6605 ot->name =
"Delete";
6606 ot->description =
"Delete selected control points or segments";
6607 ot->idname =
"CURVE_OT_delete";
6642 const uint span_len,
6643 const uint span_step[2])
6645 int i_span_edge_len = span_len + 1;
6648 const int points_len = ((cu->
resolu - 1) * i_span_edge_len) + 1;
6650 float *points_stride = points;
6651 const int points_stride_len = (cu->
resolu - 1);
6653 for (
int segment = 0; segment < i_span_edge_len; segment++) {
6657 for (
int axis = 0; axis < dims; axis++) {
6659 bezt_a->
vec[2][axis],
6660 bezt_b->
vec[0][axis],
6661 bezt_b->
vec[1][axis],
6662 points_stride + axis,
6664 dims *
sizeof(
float));
6667 points_stride += dims * points_stride_len;
6670 BLI_assert(points_stride + dims == points + (points_len * dims));
6672 float tan_l[3], tan_r[3], error_sq_dummy;
6673 uint error_index_dummy;
6680 curve_fit_cubic_to_points_single_fl(points,
6690 &error_index_dummy);
6711 for (
Object *obedit : objects) {
6759 ot->name =
"Dissolve Vertices";
6760 ot->description =
"Delete selected control points, correcting surrounding handles";
6761 ot->idname =
"CURVE_OT_dissolve_verts";
6782 for (
i = nu->
pntsu, bezt = nu->
bezt;
i--; bezt++) {
6783 if (bezt->
f2 & flag_test) {
6794 const float error_sq_max =
FLT_MAX;
6796 bool all_supported_multi =
true;
6802 for (
Object *obedit : objects) {
6804 bool all_supported =
true;
6805 bool changed =
false;
6813 const int error_target_len =
max_ii(2, nu->
pntsu * ratio);
6814 if (error_target_len != nu->
pntsu) {
6821 all_supported =
false;
6826 if (all_supported ==
false) {
6827 all_supported_multi =
false;
6841 if (all_supported_multi ==
false) {
6851 ot->name =
"Decimate Curve";
6852 ot->description =
"Simplify selected curves";
6853 ot->idname =
"CURVE_OT_decimate";
6882 for (
Object *obedit : objects) {
6911 ot->name =
"Shade Smooth";
6912 ot->idname =
"CURVE_OT_shade_smooth";
6913 ot->description =
"Set shading to smooth";
6926 ot->name =
"Shade Flat";
6927 ot->idname =
"CURVE_OT_shade_flat";
6928 ot->description =
"Set shading to flat";
6953 float imat[4][4], cmat[4][4];
6958 if (ob_iter == ob_active) {
6980 if (ob_iter->type == ob_active->
type) {
6981 if (ob_iter != ob_active) {
6983 cu =
static_cast<Curve *
>(ob_iter->data);
6987 mul_m4_m4m4(cmat, imat, ob_iter->object_to_world().ptr());
6990 bool do_radius =
false;
6991 float compensate_radius = 0.0f;
7008 if ((bezt = newnu->
bezt)) {
7013 bezt->
radius *= compensate_radius;
7023 if ((bp = newnu->
bp)) {
7039 cu =
static_cast<Curve *
>(ob_active->
data);
7075 for (
Object *obedit : objects) {
7125 ot->name =
"Clear Tilt";
7126 ot->idname =
"CURVE_OT_tilt_clear";
7127 ot->description =
"Clear the tilt of selected control points";
7172 float min[3],
max[3], texspace_size[3], texspace_location[3];
7182 texspace_size[0] = (
max[0] -
min[0]) / 2.0f;
7183 texspace_size[1] = (
max[1] -
min[1]) / 2.0f;
7184 texspace_size[2] = (
max[2] -
min[2]) / 2.0f;
7186 for (a = 0; a < 3; a++) {
7187 if (texspace_size[a] == 0.0f) {
7188 texspace_size[a] = 1.0f;
7190 else if (texspace_size[a] > 0.0f && texspace_size[a] < 0.00001f) {
7191 texspace_size[a] = 0.00001f;
7193 else if (texspace_size[a] < 0.0f && texspace_size[a] > -0.00001f) {
7194 texspace_size[a] = -0.00001f;
7212 ot->name =
"Match Texture Space";
7213 ot->idname =
"CURVE_OT_match_texture_space";
7214 ot->description =
"Match texture space to object's bounding box";
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
Blender kernel action and pose functionality.
void BKE_action_groups_reconstruct(bAction *act)
void action_groups_remove_channel(bAction *act, FCurve *fcu)
AnimData * BKE_animdata_from_id(const ID *id)
#define CTX_DATA_BEGIN(C, Type, instance, member)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
Main * CTX_data_main(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
@ NURB_HANDLE_TEST_KNOT_OR_EACH
@ NURB_HANDLE_TEST_KNOT_ONLY
bool BKE_nurb_type_convert(Nurb *nu, short type, bool use_handles, const char **r_err_msg)
void BKE_nurb_handle_calc_simple_auto(Nurb *nu, BezTriple *bezt)
void BKE_nurbList_handles_set(ListBase *editnurb, eNurbHandleTest_Mode handle_mode, char code)
void BKE_nurb_handle_calc_simple(Nurb *nu, BezTriple *bezt)
void BKE_nurb_handles_calc(Nurb *nu)
void BKE_curve_editNurb_free(Curve *cu)
void BKE_nurb_project_2d(Nurb *nu)
void BKE_curve_decimate_nurb(Nurb *nu, unsigned int resolu, float error_sq_max, unsigned int error_target_len)
void BKE_nurb_free(Nurb *nu)
void BKE_curve_nurb_active_set(Curve *cu, const Nurb *nu)
Nurb * BKE_curve_nurb_active_get(Curve *cu)
void BKE_curve_editNurb_keyIndex_free(GHash **keyindex)
void BKE_nurbList_handles_recalculate(ListBase *editnurb, bool calc_length, uint8_t flag)
void BKE_curve_nurb_vert_active_set(Curve *cu, const Nurb *nu, const void *vert)
void BKE_nurb_knot_calc_u(Nurb *nu)
void BKE_curve_dimension_update(Curve *cu)
void * BKE_curve_vert_active_get(Curve *cu)
bool BKE_nurb_order_clamp_u(Nurb *nu)
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
void BKE_nurbList_free(ListBase *lb)
void BKE_nurb_handle_calc(BezTriple *bezt, BezTriple *prev, BezTriple *next, bool is_fcurve, char smoothing)
void BKE_nurb_knot_calc_v(Nurb *nu)
void BKE_nurb_direction_switch(Nurb *nu)
void BKE_curve_nurb_vert_active_validate(Curve *cu)
bool BKE_curve_nurb_vert_active_get(Curve *cu, Nurb **r_nu, void **r_vert)
void BKE_nurb_bezierPoints_add(Nurb *nu, int number)
BPoint * BKE_nurb_bpoint_get_next(Nurb *nu, BPoint *bp)
void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set)
BezTriple * BKE_nurb_bezt_get_next(Nurb *nu, BezTriple *bezt)
Nurb * BKE_nurb_duplicate(const Nurb *nu)
bool BKE_nurb_order_clamp_v(Nurb *nu)
void BKE_curve_editNurb_keyIndex_delCV(GHash *keyindex, const void *cv)
Nurb * BKE_nurb_copy(Nurb *src, int pntsu, int pntsv)
display list (or rather multi purpose list) stuff.
void BKE_displist_minmax(const struct ListBase *dispbase, float min[3], float max[3])
void BKE_fcurve_free(FCurve *fcu)
KeyBlock * BKE_keyblock_from_object(Object *ob)
int BKE_keyblock_curve_element_count(const ListBase *nurb)
KeyBlock * BKE_keyblock_find_by_index(Key *key, int index)
void BKE_keyblock_convert_to_curve(KeyBlock *kb, Curve *cu, ListBase *nurb)
std::optional< blender::Array< bool > > BKE_keyblock_get_dependent_keys(const Key *key, int index)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Base * BKE_view_layer_active_base_get(ViewLayer *view_layer)
blender::Vector< Base * > BKE_view_layer_array_from_bases_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
ID * BKE_id_copy(Main *bmain, const ID *id)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
Generic array manipulation API.
#define BLI_array_iter_span(arr, arr_len, use_wrap, use_delimit_bounds, test_fn, user_data, span_step, r_span_len)
#define BLI_assert_unreachable()
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_popkey(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_ptr_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghash_len(const GHash *gh) ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void void BLI_movelisttolist(ListBase *dst, ListBase *src) ATTR_NONNULL(1
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
MINLINE int mod_i(int i, int n)
MINLINE float interpf(float target, float origin, float t)
bool isect_ray_plane_v3_factor(const float ray_origin[3], const float ray_direction[3], const float plane_co[3], const float plane_no[3], float *r_lambda)
float mat4_to_scale(const float mat[4][4])
void mul_m3_v3(const float M[3][3], float r[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m3(float m[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
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])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
void invert_m4_m4_safe_ortho(float inverse[4][4], const float mat[4][4])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void unit_m4(float m[4][4])
void axis_angle_to_mat3(float R[3][3], const float axis[3], float angle)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t)
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE float mul_project_m4_v3_zfac(const float mat[4][4], const float co[3]) ATTR_WARN_UNUSED_RESULT
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void swap_v3_v3(float a[3], float b[3])
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE float normalize_v3(float n[3])
ATTR_WARN_UNUSED_RESULT const size_t num
char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
#define SNPRINTF(dst, format,...)
#define INIT_MINMAX(min, max)
#define STREQLEN(a, b, n)
#define UNUSED_VARS_NDEBUG(...)
#define IN_RANGE_INCL(a, b, c)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
#define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt)
#define BEZT_SEL_ALL(bezt)
#define BEZT_DESEL_ALL(bezt)
#define KEYELEM_FLOAT_LEN_BEZTRIPLE
#define KEYELEM_FLOAT_LEN_BPOINT
Object is a sort of wrapper for general info.
@ SCE_SNAP_TARGET_NOT_ACTIVE
@ SCE_SNAP_INDIVIDUAL_PROJECT
#define OBJECT_ADD_SIZE_MAXF
void ED_outliner_select_sync_from_object_tag(bContext *C)
bool ED_operator_editsurfcurve(bContext *C)
bool ED_operator_editcurve(bContext *C)
bool ED_operator_editsurf(bContext *C)
void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3])
RegionView3D * ED_view3d_context_rv3d(bContext *C)
void ED_view3d_win_to_3d_int(const View3D *v3d, const ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3])
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
void view3d_operator_needs_gpu(const bContext *C)
static void split(const char *text, const char *seps, char ***str, int *count)
Read Guarded memory(de)allocation.
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemsEnumO(uiLayout *layout, blender::StringRefNull opname, blender::StringRefNull propname)
@ OPTYPE_DEPENDS_ON_CURSOR
ATTR_WARN_UNUSED_RESULT const BMVert * v
BPy_StructRNA * depsgraph
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
bool contains(const Key &key) const
constexpr bool is_empty() const
void append(const T &value)
bool is_action_legacy() const
bool select_bpoint(BPoint *bp, bool selstatus, uint8_t flag, bool hidden)
bool select_beztriple(BezTriple *bezt, bool selstatus, uint8_t flag, eVisible_Types hidden)
void ED_curve_nurb_vert_selected_find(Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp)
bool ED_curve_pick_vert_ex(ViewContext *vc, bool select, int dist_px, Nurb **r_nurb, BezTriple **r_bezt, BPoint **r_bp, short *r_handle, Base **r_base)
static wmOperatorStatus shade_smooth_exec(bContext *C, wmOperator *op)
static bool ed_editcurve_extrude(Curve *cu, EditNurb *editnurb, View3D *v3d)
static void keyIndex_updateBP(EditNurb *editnurb, BPoint *bp, BPoint *newbp, int count)
static bool isNurbselV(Nurb *nu, int *u, int flag)
static bool curve_delete_segments(Object *obedit, View3D *v3d, const bool split)
static void keyIndex_swap(EditNurb *editnurb, void *a, void *b)
static void remap_hooks_and_vertex_parents(Main *bmain, Object *obedit)
void selectend_nurb(Object *obedit, enum eEndPoint_Types selfirst, bool doswap, bool selstatus)
static int * init_index_map(Object *obedit, int *r_old_totvert)
static void interp_bpoint(BPoint *bp_target, const BPoint *bp_a, const BPoint *bp_b, const float factor)
static bool is_u_selected(Nurb *nu, int u)
bool ed_editnurb_extrude_flag(EditNurb *editnurb, const uint8_t flag)
void CURVE_OT_dissolve_verts(wmOperatorType *ot)
static CVKeyIndex * popCVKeyIndex(EditNurb *editnurb, const void *cv)
static void weightflagNurb(ListBase *editnurb, short flag, float w)
void CURVE_OT_match_texture_space(wmOperatorType *ot)
void CURVE_OT_switch_direction(wmOperatorType *ot)
static const EnumPropertyItem * rna_curve_delete_type_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
static wmOperatorStatus curve_normals_make_consistent_exec(bContext *C, wmOperator *op)
static bool test_bezt_is_sel_any(const void *bezt_v, void *user_data)
static wmOperatorStatus switch_direction_exec(bContext *C, wmOperator *)
static wmOperatorStatus add_vertex_exec(bContext *C, wmOperator *op)
static wmOperatorStatus set_spline_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_spline_weight_set(wmOperatorType *ot)
static void calc_duplicate_actnurb(const ListBase *editnurb, const ListBase *newnurb, Curve *cu)
static bool calc_duplicate_actvert(const ListBase *editnurb, const ListBase *newnurb, Curve *cu, int start, int end, int vert)
static wmOperatorStatus hide_exec(bContext *C, wmOperator *op)
static void keyIndex_updateBezt(EditNurb *editnurb, BezTriple *bezt, BezTriple *newbezt, int count)
static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
void CURVE_OT_extrude(wmOperatorType *ot)
void CURVE_OT_make_segment(wmOperatorType *ot)
static wmOperatorStatus curve_smooth_radius_exec(bContext *C, wmOperator *op)
void ED_curve_keyindex_update_nurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu)
void CURVE_OT_hide(wmOperatorType *ot)
void CURVE_OT_normals_make_consistent(wmOperatorType *ot)
static wmOperatorStatus curve_extrude_exec(bContext *C, wmOperator *)
@ CURVE_MERGE_ERR_RESOLUTION_ALL
@ CURVE_MERGE_ERR_FEW_SELECTION
@ CURVE_MERGE_ERR_RESOLUTION_SOME
static void curve_smooth_value(ListBase *editnurb, const int bezt_offsetof, const int bp_offset)
static CVKeyIndex * init_cvKeyIndex(void *cv, int key_index, int nu_index, int pt_index, int vertex_index)
static wmOperatorStatus duplicate_exec(bContext *C, wmOperator *op)
static NurbDim editnurb_find_max_points_num(const EditNurb *editnurb)
void CURVE_OT_shade_smooth(wmOperatorType *ot)
static wmOperatorStatus curve_smooth_tilt_exec(bContext *C, wmOperator *op)
void ed_editnurb_translate_flag(ListBase *editnurb, uint8_t flag, const float vec[3], bool is_2d)
static void subdividenurb(Object *obedit, View3D *v3d, int number_cuts)
static void calc_keyHandles(ListBase *nurb, float *key)
static wmOperatorStatus toggle_cyclic_exec(bContext *C, wmOperator *op)
void ED_curve_beztcpy(EditNurb *editnurb, BezTriple *dst, BezTriple *src, int count)
static void calc_shapeKeys(Object *obedit, ListBase *newnurbs)
static wmOperatorStatus make_segment_exec(bContext *C, wmOperator *op)
void CURVE_OT_delete(wmOperatorType *ot)
static void rotateflagNurb(ListBase *editnurb, short flag, const float cent[3], const float rotmat[3][3])
void ED_curve_editnurb_make(Object *obedit)
static void bezt_to_key(BezTriple *bezt, float *key)
void CURVE_OT_spin(wmOperatorType *ot)
static bool nurb_bezt_flag_any(const Nurb *nu, const char flag_test)
static void make_selection_list_nurb(View3D *v3d, ListBase *editnurb, ListBase *nsortbase)
static CVKeyIndex * getCVKeyIndex(EditNurb *editnurb, const void *cv)
void CURVE_OT_spline_type_set(wmOperatorType *ot)
static wmOperatorStatus clear_tilt_exec(bContext *C, wmOperator *op)
static bool match_texture_space_poll(bContext *C)
void CURVE_OT_shade_flat(wmOperatorType *ot)
static void ed_curve_delete_selected(Object *obedit, View3D *v3d)
static void keyData_switchDirectionNurb(Curve *cu, Nurb *nu)
void ED_curve_editnurb_free(Object *obedit)
static bool isNurbselU(Nurb *nu, int *v, int flag)
void CURVE_OT_vertex_add(wmOperatorType *ot)
static int merge_nurb(View3D *v3d, Object *obedit)
static void smooth_single_bp(BPoint *bp, const BPoint *bp_orig_prev, const BPoint *bp_orig_next, float factor)
static wmOperatorStatus set_goal_weight_exec(bContext *C, wmOperator *op)
void ed_dissolve_bez_segment(BezTriple *bezt_prev, BezTriple *bezt_next, const Nurb *nu, const Curve *cu, const uint span_len, const uint span_step[2])
static wmOperatorStatus curve_dissolve_exec(bContext *C, wmOperator *)
static void adduplicateflagNurb(Object *obedit, View3D *v3d, ListBase *newnurb, const uint8_t flag, const bool split)
static wmOperatorStatus curve_smooth_weight_exec(bContext *C, wmOperator *)
static int getKeyIndexOrig_keyIndex(EditNurb *editnurb, void *cv)
ListBase * object_editcurve_get(Object *ob)
static void switch_keys_direction(Curve *cu, Nurb *actnu)
static void key_to_bezt(float *key, BezTriple *basebezt, BezTriple *bezt)
static bool curve_is_animated(Curve *cu)
static void select_bpoints(BPoint *bp, const int stride, const int count, const bool selstatus, const uint8_t flag, const bool hidden)
static wmOperatorStatus add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus smooth_exec(bContext *C, wmOperator *op)
static wmOperatorStatus spin_exec(bContext *C, wmOperator *op)
static wmOperatorStatus curve_split_exec(bContext *C, wmOperator *op)
bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], const int dist_px, const SelectPick_Params ¶ms)
KeyBlock * ED_curve_get_edit_shape_key(const Curve *cu)
wmOperatorStatus ED_curve_join_objects_exec(bContext *C, wmOperator *op)
int ED_curve_updateAnimPaths(Main *bmain, Curve *cu)
static wmOperatorStatus reveal_exec(bContext *C, wmOperator *op)
static void switchdirection_knots(float *base, int tot)
static bool curve_delete_vertices(Object *obedit, View3D *v3d)
bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction)
void CURVE_OT_separate(wmOperatorType *ot)
void CURVE_OT_smooth_tilt(wmOperatorType *ot)
static void keyIndex_delNurbList(EditNurb *editnurb, ListBase *nubase)
void CURVE_OT_reveal(wmOperatorType *ot)
static wmOperatorStatus curve_decimate_exec(bContext *C, wmOperator *op)
static wmOperatorStatus subdivide_exec(bContext *C, wmOperator *op)
void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
static wmOperatorStatus spin_invoke(bContext *C, wmOperator *op, const wmEvent *)
void CURVE_OT_duplicate(wmOperatorType *ot)
static void smooth_single_bezt(BezTriple *bezt, const BezTriple *bezt_orig_prev, const BezTriple *bezt_orig_next, float factor)
static wmOperatorStatus set_radius_exec(bContext *C, wmOperator *op)
static wmOperatorStatus separate_exec(bContext *C, wmOperator *op)
static void keyIndex_updateCV(EditNurb *editnurb, char *cv, char *newcv, int count, int size)
static void fcurve_path_rename(const char *orig_rna_path, const char *rna_path, const blender::Span< FCurve * > orig_curves, blender::Set< FCurve * > &processed_fcurves)
void CURVE_OT_smooth_radius(wmOperatorType *ot)
void ED_curve_editnurb_load(Main *bmain, Object *obedit)
void ED_curve_bpcpy(EditNurb *editnurb, BPoint *dst, BPoint *src, int count)
static blender::Vector< FCurve * > curve_rename_fcurves(Curve *cu, blender::Span< FCurve * > orig_curves)
static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
GHash * ED_curve_keyindex_hash_duplicate(GHash *keyindex)
static wmOperatorStatus set_handle_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_smooth(wmOperatorType *ot)
static void rotate_direction_nurb(Nurb *nu)
bool ed_editnurb_spin(float viewmat[4][4], View3D *v3d, Object *obedit, const float axis[3], const float cent[3])
void CURVE_OT_split(wmOperatorType *ot)
static wmOperatorStatus toggle_cyclic_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus match_texture_space_exec(bContext *C, wmOperator *)
int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3])
void CURVE_OT_smooth_weight(wmOperatorType *ot)
void CURVE_OT_radius_set(wmOperatorType *ot)
static void keyIndex_delBP(EditNurb *editnurb, BPoint *bp)
static void ed_surf_delete_selected(Object *obedit)
static bool merge_2_nurb(Curve *cu, ListBase *editnurb, Nurb *nu1, Nurb *nu2)
void CURVE_OT_decimate(wmOperatorType *ot)
static BPoint * getKeyIndexOrig_bp(EditNurb *editnurb, BPoint *bp)
static BezTriple * getKeyIndexOrig_bezt(EditNurb *editnurb, const BezTriple *bezt)
static const EnumPropertyItem curve_delete_type_items[]
static int sel_to_copy_ints(const BPoint *bp, const int next_j, const int max_j, const int next_i, const int max_i, const uint8_t flag, int copy_intervals[], int *interval_count, bool *out_is_first_sel)
void CURVE_OT_handle_type_set(wmOperatorType *ot)
void CURVE_OT_subdivide(wmOperatorType *ot)
static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu)
static void keyIndex_delBezt(EditNurb *editnurb, BezTriple *bezt)
void CURVE_OT_tilt_clear(wmOperatorType *ot)
static wmOperatorStatus curve_delete_exec(bContext *C, wmOperator *op)
static bool is_cyclic(const Nurb *nu)
bool ED_curve_select_check(const View3D *v3d, const EditNurb *editnurb)
bool ED_curve_nurb_select_check(const View3D *v3d, const Nurb *nu)
bool ED_curve_deselect_all(EditNurb *editnurb)
int ED_curve_nurb_select_count(const View3D *v3d, const Nurb *nu)
CCL_NAMESPACE_BEGIN ccl_device float invert(const float color, const float factor)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
static void clear(Message &msg)
Vector< FCurve * > fcurves_for_assigned_action(AnimData *adt)
bool action_fcurve_remove(Action &action, FCurve &fcu)
bool shape_key_report_if_locked(const Object *obedit, ReportList *reports)
void base_activate(bContext *C, Base *base)
Base * add_duplicate(Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base, eDupli_ID_Flags dupflag)
bool material_active_index_set(Object *ob, int index)
void base_free_and_unlink(Main *bmain, Scene *scene, Object *ob)
Vector< T * > listbase_to_vector(ListBase &list)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name)
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)
PropertyRNA * RNA_def_float(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)
PropertyRNA * RNA_def_float_vector(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_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float_vector_xyz(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)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
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)
float texspace_location[3]
ObjectRuntimeHandle * runtime
struct ToolSettings * toolsettings
struct ReportList * reports
struct wmOperatorType * type
void WM_cursor_wait(bool val)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorStatus WM_operator_flag_only_pass_through_on_press(wmOperatorStatus retval, const wmEvent *event)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
wmOperatorStatus WM_operator_props_popup(bContext *C, wmOperator *op, const wmEvent *)