70 #include "curve_fit_nd.h"
105 void printknots(
Object *obedit)
111 for (nu = editnurb->
first; nu; nu = nu->
next) {
115 for (
a = 0;
a < num;
a++) {
116 printf(
"knotu %d: %f\n",
a, nu->
knotsu[
a]);
121 for (
a = 0;
a < num;
a++) {
122 printf(
"knotv %d: %f\n",
a, nu->
knotsv[
a]);
137 void *cv,
int key_index,
int nu_index,
int pt_index,
int vertex_index)
159 int a, key_index = 0, nu_index = 0, pt_index = 0, vertex_index = 0;
171 origbezt = orignu->
bezt;
179 *origbezt_cpy = *origbezt;
180 keyIndex =
init_cvKeyIndex(origbezt_cpy, key_index, nu_index, pt_index, vertex_index);
200 *origbp_cpy = *origbp;
201 keyIndex =
init_cvKeyIndex(origbp_cpy, key_index, nu_index, pt_index, vertex_index);
212 orignu = orignu->
next;
325 for (i = 0; i <
count; i++) {
381 bezt2 = bezt1 + (
a - 1);
397 if (bezt1 != bezt2) {
412 if (nu->
pntsv == 1) {
417 while (bp1 != bp2 &&
a > 0) {
441 for (b = 0; b < nu->
pntsv; b++) {
448 while (bp1 != bp2 &&
a > 0) {
491 *(fp + 9) = -*(fp + 9);
507 *(fp + 3) = -*(fp + 3);
559 memcpy(bezt, basebezt,
sizeof(
BezTriple));
560 memcpy(bezt->
vec, key,
sizeof(
float[9]));
567 memcpy(key, bezt->
vec,
sizeof(
float[9]));
582 float *startfp, *prevfp, *nextfp;
589 prevp = bezt + (
a - 1);
658 float *oldkey, *newkey, *ofp;
670 totvec += nu->
pntsu * 4;
677 ofs =
MEM_callocN(
sizeof(
float[3]) * totvec,
"currkey->data");
688 for (j = 0; j < 3; j++) {
692 ofs[i][0] = bezt->
tilt - oldbezt->
tilt;
709 ofs[i + 1][0] = bp->
tilt - oldbp->
tilt;
721 const bool apply_offset = (ofs && (currkey != actkey) &&
722 (editnurb->
shapenr - 1 == currkey->relative));
725 ofp = oldkey = currkey->data;
731 newnu = newnurbs->
first;
734 if (currkey == actkey) {
735 const bool restore = actkey != cu->
key->
refkey;
745 for (j = 0; j < 3; j++, i++) {
748 if (restore && oldbezt) {
755 if (restore && oldbezt) {
778 if (restore && oldbp) {
804 curofp = ofp + index;
806 for (j = 0; j < 3; j++, i++) {
826 for (j = 0; j < 3; j++, i++) {
844 curofp = ofp + index;
877 currkey->totelem = totvert;
881 currkey->data = newkey;
903 const char *orig_rna_path,
904 const char *rna_path,
909 int len = strlen(orig_rna_path);
913 char *spath, *suffix = fcu->rna_path +
len;
921 nfcu->
grp = fcu->grp;
943 if (orig_curves == &adt->
drivers) {
958 char rna_path[64], orig_rna_path[64];
973 rna_path,
sizeof(rna_path),
"splines[%d].bezier_points[%d]", nu_index, pt_index);
975 sizeof(orig_rna_path),
976 "splines[%d].bezier_points[%d]",
981 char handle_path[64], orig_handle_path[64];
982 BLI_snprintf(orig_handle_path,
sizeof(orig_rna_path),
"%s.handle_left", orig_rna_path);
983 BLI_snprintf(handle_path,
sizeof(rna_path),
"%s.handle_right", rna_path);
987 orig_handle_path,
sizeof(orig_rna_path),
"%s.handle_right", orig_rna_path);
988 BLI_snprintf(handle_path,
sizeof(rna_path),
"%s.handle_left", rna_path);
1010 BLI_snprintf(rna_path,
sizeof(rna_path),
"splines[%d].points[%d]", nu_index, pt_index);
1012 sizeof(orig_rna_path),
1013 "splines[%d].points[%d]",
1032 if (
STRPREFIX(fcu->rna_path,
"splines")) {
1033 const char *ch = strchr(fcu->rna_path,
'.');
1054 BLI_snprintf(rna_path,
sizeof(rna_path),
"splines[%d]", nu_index);
1063 if (
STRPREFIX(fcu->rna_path,
"splines")) {
1071 *orig_curves = curves;
1116 int *old_to_new_map;
1118 int old_totvert = 0;
1121 old_totvert += nu->
pntsu * 3;
1128 old_to_new_map =
MEM_mallocN(old_totvert *
sizeof(
int),
"curve old to new index map");
1129 for (
int i = 0; i < old_totvert; i++) {
1130 old_to_new_map[i] = -1;
1133 int vertex_index = 0;
1141 if (keyIndex && keyIndex->vertex_index + 2 < old_totvert) {
1142 if (keyIndex->switched) {
1143 old_to_new_map[keyIndex->vertex_index] = vertex_index + 2;
1144 old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
1145 old_to_new_map[keyIndex->vertex_index + 2] = vertex_index;
1148 old_to_new_map[keyIndex->vertex_index] = vertex_index;
1149 old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
1150 old_to_new_map[keyIndex->vertex_index + 2] = vertex_index + 2;
1164 old_to_new_map[keyIndex->vertex_index] = vertex_index;
1172 *r_old_totvert = old_totvert;
1173 return old_to_new_map;
1180 int *old_to_new_map =
NULL;
1183 if (editnurb->keyindex ==
NULL) {
1193 if ((object->parent) && (object->parent->data ==
curve) &&
1195 if (old_to_new_map ==
NULL) {
1199 if (object->par1 < old_totvert) {
1200 index = old_to_new_map[
object->par1];
1202 object->par1 = index;
1205 if (object->par2 < old_totvert) {
1206 index = old_to_new_map[
object->par2];
1208 object->par2 = index;
1211 if (object->par3 < old_totvert) {
1212 index = old_to_new_map[
object->par3];
1214 object->par3 = index;
1218 if (object->data ==
curve) {
1224 if (old_to_new_map ==
NULL) {
1228 for (i = j = 0; i < hmd->
totindex; i++) {
1229 if (hmd->
indexar[i] < old_totvert) {
1230 index = old_to_new_map[hmd->
indexar[i]];
1245 if (old_to_new_map !=
NULL) {
1255 if (obedit ==
NULL) {
1302 undo_editmode_clear();
1325 editnurb->shapenr = obedit->
shapenr;
1357 int error_vertex_keys;
1366 for (
uint b_index = 0; b_index < bases_len; b_index++) {
1367 Base *oldbase = bases[b_index];
1370 Curve *oldcu, *newcu;
1375 oldcu = oldob->
data;
1378 status.error_vertex_keys++;
1383 status.unselected++;
1391 status.error_generic++;
1430 if (status.unselected == bases_len) {
1435 const int tot_errors = status.error_vertex_keys + status.error_generic;
1436 if (tot_errors > 0) {
1439 if (status.changed) {
1442 tot_errors == 1 ?
"%d curve could not be separated" :
1443 "%d curves could not be separated",
1449 if (((status.error_vertex_keys ? 1 : 0) + (status.error_generic ? 1 : 0)) > 1) {
1452 tot_errors == 1 ?
"Could not separate selected curves" :
1453 "Could not separate selected curve");
1457 if (status.error_vertex_keys) {
1477 ot->
description =
"Separate selected points from connected unselected points into a new object";
1504 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1505 Object *obedit = objects[ob_index];
1550 ot->
description =
"Split off selected points from connected unselected points";
1577 for (b = 0; b < nu->
pntsv; b++) {
1579 for (
a = 0;
a < nu->
pntsu;
a++, bp++) {
1580 if (bp->
f1 & flag) {
1584 if (sel == nu->
pntsu) {
1600 for (b = 0; b < nu->
pntsv; b++, bp += nu->
pntsu) {
1601 if (bp->f1 & flag) {
1605 if (sel == nu->
pntsv) {
1618 if (*r_u == -1 && *r_v > -1) {
1621 if (*r_v == -1 && *r_u > -1) {
1635 for (b = 0, bp = nu->
bp; b < nu->pntsv; b++) {
1637 for (
a = 0;
a < nu->
pntsu;
a++, bp++) {
1638 if (bp->
f1 & flag) {
1642 if (sel == nu->
pntsu) {
1645 else if (sel >= 1) {
1665 for (b = 0; b < nu->
pntsv; b++, bp += nu->
pntsu) {
1666 if (bp->f1 & flag) {
1670 if (sel == nu->
pntsv) {
1673 else if (sel >= 1) {
1684 const float cent[3],
1685 const float rotmat[3][3])
1697 if (bp->
f1 & flag) {
1720 if (bezt->
f1 & flag) {
1723 if (bezt->
f2 & flag) {
1726 if (bezt->
f3 & flag) {
1736 if (bp->
f1 & flag) {
1759 if (bp->
f1 & flag) {
1773 BPoint *bp, *bpn, *newbp;
1774 int a, b, newu, newv;
1801 newv = nu->
pntsv - newv;
1802 if (newv != nu->
pntsv) {
1806 for (b = 0; b < nu->
pntsv; b++) {
1827 newu = nu->
pntsu - newu;
1828 if (newu != nu->
pntsu) {
1832 for (b = 0; b < nu->
pntsv; b++) {
1833 for (
a = 0;
a < nu->
pntsu;
a++, bp++) {
1846 if (newu == 1 && nu->
pntsv > 1) {
1874 int a,
type, nuindex = 0;
1893 if (cu->
actnu == nuindex) {
1919 if (cu->
actnu == nuindex) {
1935 clamp_nurb_order_u(nu);
1967 else if (nu->
pntsv == 1) {
1972 memmove(bp, bp + 1, (nu->
pntsu -
a - 1) *
sizeof(
BPoint));
1994 clamp_nurb_order_u(nu);
2007 BPoint *bp, *bpn, *newbp;
2012 if (nu->
pntsv == 1) {
2016 if (bp->
f1 & flag) {
2029 bp = newbp + nu->
pntsu;
2102 if (
v == nu->
pntsu - 1) {
2134 if ((start <= cu->actvert) && (end > cu->
actvert)) {
2148 BPoint *bp, *bp1, *bp2, *bp3;
2150 int a, b,
c, starta, enda, diffa, cyclicu, cyclicv, newu, newv;
2155 cyclicu = cyclicv = 0;
2157 for (
a = 0, bezt = nu->
bezt; a < nu->pntsu;
a++, bezt++) {
2160 while ((bezt->
f1 & flag) || (bezt->
f2 & flag) || (bezt->
f3 & flag)) {
2165 if (
a >= nu->
pntsu - 1) {
2171 if (enda >= starta) {
2172 newu = diffa = enda - starta + 1;
2178 if (enda == nu->
pntsu - 1) {
2181 if (i == cu->
actnu) {
2183 editnurb, newnurb, cu, starta, starta + diffa, cu->
actvert - starta);
2188 if (newu != diffa) {
2190 if (i == cu->
actnu) {
2192 editnurb, newnurb, cu, 0, cyclicu, newu - cyclicu + cu->
actvert);
2197 if (newu != nu->
pntsu) {
2201 for (b = 0, bezt1 = newnu->
bezt; b < newnu->pntsu; b++, bezt1++) {
2211 if (i == cu->
actnu) {
2219 for (b = 0, bezt1 = newnu->
bezt; b < newnu->pntsu; b++, bezt1++) {
2226 else if (nu->
pntsv == 1) {
2227 for (
a = 0, bp = nu->
bp; a < nu->pntsu;
a++, bp++) {
2230 while (bp->
f1 & flag) {
2235 if (
a >= nu->
pntsu - 1) {
2241 if (enda >= starta) {
2242 newu = diffa = enda - starta + 1;
2248 if (enda == nu->
pntsu - 1) {
2251 if (i == cu->
actnu) {
2253 editnurb, newnurb, cu, starta, starta + diffa, cu->
actvert - starta);
2257 memcpy(newnu->
bp, &nu->
bp[starta], diffa *
sizeof(
BPoint));
2258 if (newu != diffa) {
2259 memcpy(&newnu->
bp[diffa], nu->
bp, cyclicu *
sizeof(
BPoint));
2260 if (i == cu->
actnu) {
2262 editnurb, newnurb, cu, 0, cyclicu, newu - cyclicu + cu->
actvert);
2267 if (newu != nu->
pntsu) {
2271 for (b = 0, bp1 = newnu->
bp; b < newnu->pntsu; b++, bp1++) {
2281 if (i == cu->
actnu) {
2286 memcpy(newnu->
bp, nu->
bp, cyclicu *
sizeof(
BPoint));
2289 for (b = 0, bp1 = newnu->
bp; b < newnu->pntsu; b++, bp1++) {
2303 for (b = 0; b < nu->
pntsu; b++, bp++) {
2304 if (bp->
f1 & flag) {
2313 if (
ELEM(newv, 0, usel[
a])) {
2325 if ((newu == 0 || newv == 0) ||
2328 printf(
"Can't duplicate Nurb\n");
2332 for (
a = 0, bp1 = nu->
bp; a < nu->pntsu * nu->
pntsv;
a++, bp1++) {
2337 for (b =
a % nu->
pntsu, bp2 = bp1; b < nu->pntsu; b++, bp2++) {
2338 if (bp2->
f1 & flag) {
2340 for (
c =
a / nu->
pntsu, bp3 = bp2; c < nu->pntsv;
c++, bp3 += nu->
pntsu) {
2341 if (bp3->
f1 & flag) {
2359 if ((newu + newv) > 2) {
2369 if (cyclicu != 0 || cyclicv != 0) {
2374 if (
a + newu == nu->
pntsu && cyclicu != 0) {
2377 for (b = 0; b < newv; b++) {
2378 memcpy(&newnu->
bp[b * newnu->
pntsu],
2381 memcpy(&newnu->
bp[b * newnu->
pntsu + newu],
2383 cyclicu *
sizeof(
BPoint));
2386 if (cu->
actnu == i) {
2391 for (b = 0, diffa = 0; b < newv; b++, diffa += nu->
pntsu - newu) {
2392 starta = b * nu->
pntsu +
a;
2399 b * newnu->
pntsu)) {
2415 cyclicu = cyclicv = 0;
2417 else if ((
a / nu->
pntsu) + newv == nu->
pntsv && cyclicv != 0) {
2420 memcpy(newnu->
bp, &nu->
bp[
a], newu * newv *
sizeof(
BPoint));
2421 memcpy(&newnu->
bp[newu * newv], nu->
bp, newu * cyclicv *
sizeof(
BPoint));
2424 if (cu->
actnu == i) {
2428 cyclicu = cyclicv = 0;
2432 for (b = 0; b < newv; b++) {
2433 memcpy(&newnu->
bp[b * newu], &nu->
bp[b * nu->
pntsu +
a], newu *
sizeof(
BPoint));
2438 if (cu->
actnu == i) {
2443 for (b = 0, diffa = 0; b < newv; b++, diffa += nu->
pntsu - newu) {
2444 starta = b * nu->
pntsu +
a;
2451 (starta % nu->
pntsu)))) {
2459 if (newu != nu->
pntsu) {
2462 if (newv != nu->
pntsv) {
2468 if (cyclicu != 0 || cyclicv != 0) {
2470 newu = cyclicu == 0 ? nu->
pntsu : cyclicu;
2471 newv = cyclicv == 0 ? nu->
pntsv : cyclicv;
2474 for (b = 0; b < newv; b++) {
2475 memcpy(&newnu->
bp[b * newu], &nu->
bp[b * nu->
pntsu], newu *
sizeof(
BPoint));
2479 if (cu->
actnu == i) {
2484 for (b = 0, diffa = 0; b < newv; b++, diffa += nu->
pntsu - newu) {
2485 starta = b * nu->
pntsu;
2499 if (newu != nu->
pntsu) {
2502 if (newv != nu->
pntsv) {
2507 for (b = 0, bp1 = nu->
bp; b < nu->pntsu * nu->
pntsv; b++, bp1++) {
2533 for (
a = 0, bp = nu->
bp; a < nu->pntsu * nu->
pntsv;
a++, bp++) {
2560 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2561 Object *obedit = objects[ob_index];
2595 ot->
name =
"Switch Direction";
2597 ot->
idname =
"CURVE_OT_switch_direction";
2620 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2621 Object *obedit = objects[ob_index];
2630 for (bezt = nu->
bezt,
a = 0; a < nu->pntsu;
a++, bezt++) {
2637 for (bp = nu->
bp,
a = 0; a < nu->pntsu * nu->
pntsv;
a++, bp++) {
2657 ot->
name =
"Set Goal Weight";
2658 ot->
description =
"Set softbody goal weight for selected points";
2659 ot->
idname =
"CURVE_OT_spline_weight_set";
2686 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2687 Object *obedit = objects[ob_index];
2696 for (bezt = nu->
bezt,
a = 0; a < nu->pntsu;
a++, bezt++) {
2703 for (bp = nu->
bp,
a = 0; a < nu->pntsu * nu->
pntsv;
a++, bp++) {
2723 ot->
name =
"Set Curve Radius";
2724 ot->
description =
"Set per-point radius which is used for bevel tapering";
2725 ot->
idname =
"CURVE_OT_radius_set";
2753 for (
int i = 0; i < 3; i++) {
2755 float val_old = bezt->
vec[1][i];
2758 float val_new = (bezt_orig_prev->
vec[1][i] * 0.5f) + (bezt_orig_next->
vec[1][i] * 0.5f);
2759 float offset = (val_old * (1.0f - factor)) + (val_new * factor) - val_old;
2762 bezt->
vec[1][i] += offset;
2763 bezt->
vec[0][i] += offset;
2764 bezt->
vec[2][i] += offset;
2772 const BPoint *bp_orig_prev,
2773 const BPoint *bp_orig_next,
2778 for (
int i = 0; i < 3; i++) {
2779 float val_old, val_new, offset;
2781 val_old = bp->
vec[i];
2782 val_new = (bp_orig_prev->
vec[i] * 0.5f) + (bp_orig_next->
vec[i] * 0.5f);
2783 offset = (val_old * (1.0f - factor)) + (val_new * factor) - val_old;
2785 bp->
vec[i] += offset;
2791 const float factor = 1.0f / 6.0f;
2797 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2798 Object *obedit = objects[ob_index];
2802 bool changed =
false;
2818 a_end = nu->
pntsu - 1;
2822 for (;
a < a_end;
a++) {
2824 bezt = &nu->
bezt[
a];
2826 const BezTriple *bezt_orig_prev, *bezt_orig_next;
2828 bezt_orig_prev = &bezt_orig[
mod_i(
a - 1, nu->
pntsu)];
2829 bezt_orig_next = &bezt_orig[
mod_i(
a + 1, nu->
pntsu)];
2852 a_end = nu->
pntsu - 1;
2855 for (;
a < a_end;
a++) {
2858 const BPoint *bp_orig_prev, *bp_orig_next;
2912 int start_sel, end_sel;
2913 float start_rad, end_rad, fac, range;
2917 #define BEZT_VALUE(bezt) (*((float *)((char *)(bezt) + bezt_offsetof)))
2919 for (last_sel = 0; last_sel < nu->
pntsu; last_sel++) {
2925 for (bezt = &nu->
bezt[last_sel],
a = last_sel; a < nu->pntsu;
a++, bezt++) {
2932 end_sel = start_sel;
2933 for (bezt = &nu->
bezt[start_sel + 1],
a = start_sel + 1; a < nu->pntsu;
a++, bezt++) {
2940 if (start_sel == -1) {
2941 last_sel = nu->
pntsu;
2947 start_rad = end_rad = FLT_MAX;
2949 if (start_sel == end_sel) {
2951 if (start_sel > 0) {
2954 if (end_sel != -1 && end_sel < nu->pntsu) {
2958 if (start_rad != FLT_MAX && end_rad >= FLT_MAX) {
2961 else if (start_rad != FLT_MAX) {
2964 else if (end_rad != FLT_MAX) {
2970 if (start_sel == 0) {
2977 if (end_sel == nu->
pntsu - 1) {
2986 range = (
float)(end_sel - start_sel) + 2.0f;
2987 for (bezt = &nu->
bezt[start_sel],
a = start_sel;
a <= end_sel;
a++, bezt++) {
2988 fac = (
float)(1 +
a - start_sel) / range;
2989 BEZT_VALUE(bezt) = start_rad * (1.0f - fac) + end_rad * fac;
2997 #define BP_VALUE(bp) (*((float *)((char *)(bp) + bp_offset)))
3000 for (last_sel = 0; last_sel < nu->
pntsu; last_sel++) {
3006 for (bp = &nu->
bp[last_sel],
a = last_sel; a < nu->pntsu;
a++, bp++) {
3013 end_sel = start_sel;
3014 for (bp = &nu->
bp[start_sel + 1],
a = start_sel + 1; a < nu->pntsu;
a++, bp++) {
3021 if (start_sel == -1) {
3022 last_sel = nu->
pntsu;
3028 start_rad = end_rad = FLT_MAX;
3030 if (start_sel == end_sel) {
3032 if (start_sel > 0) {
3033 start_rad =
BP_VALUE(&nu->
bp[start_sel - 1]);
3035 if (end_sel != -1 && end_sel < nu->pntsu) {
3039 if (start_rad != FLT_MAX && end_rad != FLT_MAX) {
3040 BP_VALUE(&nu->
bp[start_sel]) = (start_rad + end_rad) / 2;
3042 else if (start_rad != FLT_MAX) {
3045 else if (end_rad != FLT_MAX) {
3051 if (start_sel == 0) {
3056 start_rad =
BP_VALUE(&nu->
bp[start_sel - 1]);
3058 if (end_sel == nu->
pntsu - 1) {
3067 range = (
float)(end_sel - start_sel) + 2.0f;
3068 for (bp = &nu->
bp[start_sel],
a = start_sel;
a <= end_sel;
a++, bp++) {
3069 fac = (
float)(1 +
a - start_sel) / range;
3070 BP_VALUE(bp) = start_rad * (1.0f - fac) + end_rad * fac;
3093 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3094 Object *obedit = objects[ob_index];
3111 ot->
name =
"Smooth Curve Weight";
3113 ot->
idname =
"CURVE_OT_smooth_weight";
3136 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3137 Object *obedit = objects[ob_index];
3154 ot->
name =
"Smooth Curve Radius";
3156 ot->
idname =
"CURVE_OT_smooth_radius";
3179 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3180 Object *obedit = objects[ob_index];
3197 ot->
name =
"Smooth Curve Tilt";
3199 ot->
idname =
"CURVE_OT_smooth_tilt";
3225 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3226 Object *obedit = objects[ob_index];
3257 if (sel == nu->
pntsu) {
3296 ot->
name =
"Hide Selected";
3321 bool changed_multi =
false;
3326 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3327 Object *obedit = objects[ob_index];
3332 bool changed =
false;
3366 changed_multi =
true;
3376 ot->
name =
"Reveal Hidden";
3406 BPoint *bp, *prevbp, *bpnew, *bpn;
3408 int a, b, sel, amount, *usel, *vsel;
3428 if (nextbezt ==
NULL) {
3434 amount += number_cuts;
3451 if (nextbezt ==
NULL) {
3457 float prevvec[3][3];
3459 memcpy(prevvec, bezt->
vec,
sizeof(
float[9]));
3461 for (
int i = 0; i < number_cuts; i++) {
3462 factor = 1.0f / (number_cuts + 1 - i);
3464 memcpy(beztn, nextbezt,
sizeof(
BezTriple));
3491 memcpy(prevvec, beztn->
vec,
sizeof(
float[9]));
3501 nu->
pntsu += amount;
3506 else if (nu->
pntsv == 1) {
3520 if (nextbp ==
NULL) {
3525 amount += number_cuts;
3540 memcpy(bpn, bp,
sizeof(
BPoint));
3545 if (nextbp ==
NULL) {
3551 for (
int i = 0; i < number_cuts; i++) {
3552 factor = (
float)(i + 1) / (number_cuts + 1);
3554 memcpy(bpn, nextbp,
sizeof(
BPoint));
3565 nu->
pntsu += amount;
3622 for (b = 0; b < nu->
pntsu; b++) {
3636 int countu = nu->
pntsu + (nu->
pntsu - 1) * number_cuts;
3639 int tot = ((number_cuts + 1) * nu->
pntsu - number_cuts) *
3640 ((number_cuts + 1) * nu->
pntsv - number_cuts);
3646 for (b = 0; b < nu->
pntsu; b++) {
3651 if (b < nu->pntsu - 1) {
3653 for (
int i = 0; i < number_cuts; i++) {
3654 factor = (
float)(i + 1) / (number_cuts + 1);
3661 bpn += number_cuts * countu;
3664 bpn = bpnew + ((number_cuts + 1) * nu->
pntsu - number_cuts);
3665 bp = bpnew + (number_cuts + 1) * ((number_cuts + 1) * nu->
pntsu - number_cuts);
3669 for (b = 0; b < (number_cuts + 1) * nu->
pntsu - number_cuts; b++) {
3671 for (
int i = 0; i < number_cuts; i++) {
3672 factor = (
float)(i + 1) / (number_cuts + 1);
3681 bp += number_cuts * countu;
3682 bpn += number_cuts * countu;
3683 prevbp += number_cuts * countu;
3687 nu->
pntsu = (number_cuts + 1) * nu->
pntsu - number_cuts;
3688 nu->
pntsv = (number_cuts + 1) * nu->
pntsv - number_cuts;
3695 for (
a = 0;
a < nu->
pntsv - 1;
a++) {
3696 if (vsel[
a] == nu->
pntsu && vsel[
a + 1] == nu->
pntsu) {
3706 for (b = 0; b < nu->
pntsu; b++) {
3712 if ((a < nu->pntsv - 1) && vsel[
a] == nu->
pntsu && vsel[
a + 1] == nu->
pntsu) {
3713 for (
int i = 0; i < number_cuts; i++) {
3714 factor = (
float)(i + 1) / (number_cuts + 1);
3715 prevbp = bp - nu->
pntsu;
3716 for (b = 0; b < nu->
pntsu; b++) {
3743 for (
a = 0;
a < nu->
pntsu - 1;
a++) {
3744 if (usel[
a] == nu->
pntsv && usel[
a + 1] == nu->
pntsv) {
3756 for (b = 0; b < nu->
pntsu; b++) {
3761 if ((b < nu->pntsu - 1) && usel[b] == nu->
pntsv && usel[b + 1] == nu->
pntsv) {
3769 for (
int i = 0; i < number_cuts; i++) {
3770 factor = (
float)(i + 1) / (number_cuts + 1);
3801 uint objects_len = 0;
3804 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3805 Object *obedit = objects[ob_index];
3842 prop =
RNA_def_int(
ot->
srna,
"number_cuts", 1, 1, 1000,
"Number of Cuts",
"", 1, 10);
3862 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3863 Object *obedit = objects[ob_index];
3867 bool changed =
false;
3868 bool changed_size =
false;
3879 const int pntsu_prev = nu->
pntsu;
3880 const char *err_msg =
NULL;
3883 if (pntsu_prev != nu->
pntsu) {
3884 changed_size =
true;
3918 {
CU_POLY,
"POLY", 0,
"Poly",
""},
3922 {
CU_NURBS,
"NURBS", 0,
"NURBS",
""},
3927 ot->
name =
"Set Spline Type";
3929 ot->
idname =
"CURVE_OT_spline_type_set";
3945 "Use handles when converting bezier curves into polygons");
3963 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3964 Object *obedit = objects[ob_index];
3985 {
HD_AUTO,
"AUTOMATIC", 0,
"Automatic",
""},
3986 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
3987 {5,
"ALIGNED", 0,
"Aligned",
""},
3988 {6,
"FREE_ALIGN", 0,
"Free",
""},
3989 {3,
"TOGGLE_FREE_ALIGN", 0,
"Toggle Free/Align",
""},
3994 ot->
name =
"Set Handle Type";
3995 ot->
description =
"Set type of handles for selected control points";
3996 ot->
idname =
"CURVE_OT_handle_type_set";
4026 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
4027 Object *obedit = objects[ob_index];
4047 ot->
name =
"Recalculate Handles";
4048 ot->
description =
"Recalculate the direction of selected handles";
4049 ot->
idname =
"CURVE_OT_normals_make_consistent";
4072 float *fp1, *fp2, *tempf;
4075 if (base ==
NULL || tot == 0) {
4082 fp2 = fp1 + (
a - 1);
4084 while (fp1 != fp2 &&
a > 0) {
4085 SWAP(
float, *fp1, *fp2);
4094 fp2 = tempf =
MEM_mallocN(
sizeof(
float) * tot,
"switchdirect");
4096 fp2[0] =
fabsf(fp1[1] - fp1[0]);
4108 fp1[0] = fp1[-1] + fp2[0];
4117 BPoint *bp1, *bp2, *temp;
4131 for (u = 0; u < nu->
pntsu; u++, bp1++) {
4132 bp2 = temp + (nu->
pntsu - u - 1) * (nu->
pntsv) +
v;
4165 NurbSort *nus, *nustest, *headdo, *taildo;
4167 float dist, headdist, taildist;
4193 while (nbase.
first) {
4195 headdist = taildist = 1.0e30;
4196 headdo = taildo =
NULL;
4198 nustest = nbase.
first;
4202 if (dist < headdist) {
4208 if (dist < taildist) {
4212 nustest = nustest->
next;
4215 if (headdist < taildist) {
4235 BPoint *bp, *bp1, *bp2, *temp;
4270 if (nu1->
pntsv != 1) {
4303 if (nu1->
pntsu == 1) {
4306 if (nu2->
pntsv != 1) {
4322 bp1 = &nu1->
bp[nu1->
pntsu - 1];
4330 bp1 = &nu1->
bp[nu1->
pntsu - 1];
4363 for (u = 0; u < nu1->
pntsu; u++, bp++) {
4402 if (nsortbase.
first == nsortbase.
last) {
4407 nus1 = nsortbase.
first;
4419 else if (nus2->
nu->
pntsv == 1) {
4464 int error_selected_few;
4465 int error_resolution;
4472 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
4473 Object *obedit = objects[ob_index];
4477 status.unselected++;
4496 if (nu_select_num) {
4502 if (nu_select_num > 1) {
4506 if (nu->
pntsv == 1) {
4520 switch (merge_result) {
4523 goto curve_merge_tag_object;
4525 status.error_resolution++;
4526 goto curve_merge_tag_object;
4528 status.error_selected_few++;
4531 status.error_resolution++;
4538 for (nu = nubase->
first; nu; nu = nu->
next) {
4539 if (nu->
pntsu == 1) {
4550 else if (nu1 ==
NULL) {
4567 else if (nu2 ==
NULL) {
4580 else if (nu->
pntsv == 1) {
4591 else if (nu1 ==
NULL) {
4604 else if (nu2 ==
NULL) {
4622 if ((nu1 && nu2) && (nu1 != nu2)) {
4623 if (nu1->
type == nu2->type) {
4632 nu1->
pntsu += nu2->pntsu;
4648 nu1->
pntsu += nu2->pntsu;
4669 else if ((nu1 && !nu2) || (!nu1 && nu2)) {
4691 status.error_generic++;
4701 curve_merge_tag_object:
4707 if (status.unselected == objects_len) {
4712 const int tot_errors = status.error_selected_few + status.error_resolution +
4713 status.error_generic;
4714 if (tot_errors > 0) {
4716 if (status.changed) {
4719 tot_errors == 1 ?
"%d curve could not make segments" :
4720 "%d curves could not make segments",
4726 if (((status.error_selected_few ? 1 : 0) + (status.error_resolution ? 1 : 0) +
4727 (status.error_generic ? 1 : 0)) > 1) {
4732 if (status.error_selected_few) {
4735 else if (status.error_resolution) {
4751 ot->
name =
"Make Segment";
4752 ot->
idname =
"CURVE_OT_make_segment";
4770 bContext *
C,
const int mval[2],
bool extend,
bool deselect,
bool toggle)
4790 if (!extend && !deselect && !toggle) {
4791 uint objects_len = 0;
4794 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
4795 Object *ob_iter = objects[ob_index];
4825 else if (deselect) {
4833 else if (hand == 0) {
4861 else if (hand == 0) {
4932 float viewmat[4][4],
View3D *v3d,
Object *obedit,
const float axis[3],
const float cent[3])
4936 float cmat[3][3], tmat[3][3], imat[3][3];
4937 float bmat[3][3], rotmat[3][3], scalemat1[3][3], scalemat2[3][3];
4938 float persmat[3][3], persinv[3][3];
4939 bool ok, changed =
false;
4973 for (
a = 0;
a < 7;
a++) {
5013 float cent[3], axis[3], viewmat[4][4];
5029 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5030 Object *obedit = objects[ob_index];
5065 float axis[3] = {0.0f, 0.0f, 1.0f};
5082 ot->
description =
"Extrude selected boundary row around pivot point and current view axis";
5099 "Center in global view space",
5103 ot->
srna,
"axis", 3,
NULL, -1.0f, 1.0f,
"Axis",
"Axis in global view space", -1.0f, 1.0f);
5114 bool changed =
false;
5133 int pnt_len = nu->
pntsu;
5136 bool is_prev_selected =
false;
5137 bool duplic_first =
false;
5138 bool duplic_last =
false;
5142 bool is_cyclic =
false;
5146 bezt_prev = &nu->
bezt[0];
5150 bezt_prev = &nu->
bezt[pnt_len - 1];
5161 bezt_stack = nu->
bezt[0];
5163 bezt_prev = &bezt_stack;
5170 for (bezt = &nu->
bezt[0]; i--; bezt++) {
5172 if (bezt_prev && is_prev_selected != is_selected) {
5175 if (bezt == cu_actvert.bezt) {
5176 act_offset = new_points;
5179 is_prev_selected = is_selected;
5187 is_prev_selected =
false;
5189 else if (is_cyclic) {
5193 else if (duplic_first) {
5194 bezt_prev = &bezt_stack;
5195 is_prev_selected =
false;
5200 BezTriple *bezt_src, *bezt_dst, *bezt_src_iter, *bezt_dst_iter;
5201 const int new_len = pnt_len + new_points;
5203 bezt_src = nu->
bezt;
5205 bezt_src_iter = &bezt_src[0];
5206 bezt_dst_iter = &bezt_dst[0];
5208 for (bezt = &nu->
bezt[0]; i < pnt_len; i++, bezt++) {
5216 if (bezt_prev && is_prev_selected != is_selected) {
5217 int count = i - offset + 1;
5218 if (is_prev_selected) {
5228 bezt_dst_iter +=
count + 1;
5229 bezt_src_iter +=
count;
5233 is_prev_selected = is_selected;
5236 int remain = pnt_len - offset;
5242 ED_curve_beztcpy(editnurb, &bezt_dst[new_len - 1], &bezt_src[pnt_len - 1], 1);
5247 nu->
bezt = bezt_dst;
5248 nu->
pntsu += new_points;
5258 bp_prev = &nu->
bp[0];
5264 bp_stack = nu->
bp[0];
5266 bp_prev = &bp_stack;
5274 for (bp = &nu->
bp[0]; i--; bp++) {
5275 bool is_selected = (bp->
f1 &
SELECT) != 0;
5276 if (bp_prev && is_prev_selected != is_selected) {
5279 if (bp == cu_actvert.bp) {
5280 act_offset = new_points;
5283 is_prev_selected = is_selected;
5287 BPoint *bp_src, *bp_dst, *bp_src_iter, *bp_dst_iter;
5288 const int new_len = pnt_len + new_points;
5290 is_prev_selected =
false;
5296 else if (duplic_first) {
5297 bp_prev = &bp_stack;
5298 is_prev_selected =
false;
5305 bp_src_iter = &bp_src[0];
5306 bp_dst_iter = &bp_dst[0];
5308 for (bp = &nu->
bp[0]; i < pnt_len; i++, bp++) {
5309 bool is_selected = (bp->
f1 &
SELECT) != 0;
5310 if (bp_prev && is_prev_selected != is_selected) {
5311 int count = i - offset + 1;
5312 if (is_prev_selected) {
5322 bp_dst_iter +=
count + 1;
5323 bp_src_iter +=
count;
5327 is_prev_selected = is_selected;
5330 int remain = pnt_len - offset;
5336 ED_curve_bpcpy(editnurb, &bp_dst[new_len - 1], &bp_src[pnt_len - 1], 1);
5342 nu->
pntsu += new_points;
5364 const float location_init[3])
5369 bool changed =
false;
5379 for (i = 0, bezt = nu->
bezt; i < nu->pntsu; i++, bezt++) {
5389 for (i = 0, bp = nu->
bp; i < nu->pntsu; i++, bp++) {
5412 for (i = 0, bezt = nu->
bezt; i < nu->pntsu; i++, bezt++) {
5429 for (i = 0, bp = nu->
bp; i < nu->pntsu; i++, bp++) {
5453 nurb_new =
MEM_callocN(
sizeof(
Nurb),
"BLI_editcurve_addvert new_bezt_nurb 2");
5467 memcpy(nurb_new->
bp, nu->
bp,
sizeof(
BPoint));
5578 .snap_select = (vc.obedit != NULL) ? SNAP_NOT_ACTIVE : SNAP_ALL,
5579 .use_object_edit_cage = false,
5591 const float eps = 1e-6f;
5610 float location_test[3];
5630 ot->
idname =
"CURVE_OT_vertex_add";
5631 ot->
description =
"Add a new control point (linked to only selected end-curve one, if any)";
5649 "Location to add new vertex at",
5669 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5670 Object *obedit = objects[ob_index];
5673 bool changed =
false;
5674 bool as_curve =
false;
5739 bool changed =
false;
5790 if (direction == 0 && nu->
pntsu > 1) {
5796 if (direction == 1 && nu->
pntsv > 1) {
5817 bool changed_multi =
false;
5822 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5823 Object *obedit = objects[ob_index];
5832 changed_multi =
true;
5869 {0,
"CYCLIC_U", 0,
"Cyclic U",
""},
5870 {1,
"CYCLIC_V", 0,
"Cyclic V",
""},
5875 ot->
name =
"Toggle Cyclic";
5877 ot->
idname =
"CURVE_OT_cyclic_toggle";
5893 "Direction to make surface cyclic in");
5908 uint objects_len = 0;
5911 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5912 Object *obedit = objects[ob_index];
5944 ot->
name =
"Duplicate Curve";
5982 int a, b, starta, enda, cut, cyclicut;
5986 starta = enda = cut = -1;
5990 for (
a = 0, bezt = nu->
bezt; a < nu->pntsu;
a++, bezt++) {
5996 if (a < nu->pntsu - 1) {
6007 if (starta <= 1 && a == nu->pntsu - 1) {
6009 if (starta == 1 && enda !=
a) {
6015 cut = enda - starta + 1;
6018 else if (starta == 0) {
6021 cut = enda - starta + 1;
6030 starta = nu->
pntsu - 1;
6042 else if (enda == nu->
pntsu - 1) {
6045 cut = enda - starta + 1;
6047 bezt2 = &nu->
bezt[1];
6055 else if (cyclicut != 0) {
6069 cut = enda - starta + 1;
6077 if (starta != 0 || enda != nu->
pntsu - 1) {
6089 bezt2 = &nu->
bezt[1];
6107 else if (nu->
pntsv >= 1) {
6111 for (
a = 0, bp = nu->
bp; a < nu->pntsu;
a++, bp++) {
6117 if (a < nu->pntsu - 1) {
6121 else if (a < nu->pntsu - 1 && !((bp + 1)->f1 &
SELECT)) {
6128 if (starta <= 1 && a == nu->pntsu - 1) {
6130 if (starta == 1 && enda !=
a) {
6136 cut = enda - starta + 1;
6139 else if (starta == 0) {
6142 cut = enda - starta + 1;
6149 for (b = 0; b < nu->
pntsv; b++) {
6151 editnurb, &nu1->
bp[b * nu1->
pntsu + 1], &nu->
bp[b * nu->
pntsu], cut);
6153 starta = nu->
pntsu - 1;
6165 else if (enda == nu->
pntsu - 1) {
6168 cut = enda - starta + 1;
6175 for (b = 0; b < nu->
pntsv; b++) {
6177 editnurb, &nu1->
bp[b * nu1->
pntsu + cut], &nu->
bp[b * nu->
pntsu], 1);
6180 else if (cyclicut != 0) {
6183 for (b = 0; b < nu->
pntsv; b++) {
6185 editnurb, &nu1->
bp[b * nu1->
pntsu + cut], &nu->
bp[b * nu->
pntsu], cyclicut);
6196 cut = enda - starta + 1;
6201 for (b = 0; b < nu->
pntsv; b++) {
6203 editnurb, &nu1->
bp[b * nu1->
pntsu], &nu->
bp[b * nu->
pntsu + starta], cut);
6207 if (starta != 0 || enda != nu->
pntsu - 1) {
6223 for (b = 0; b < nu->
pntsv; b++) {
6234 for (b = 0; b < nu->
pntsv; b++) {
6242 for (
a = 0, bp = nu->
bp; a < nu->pntsv;
a++, bp += nu->
pntsu) {
6248 if (a < nu->pntsv - 1) {
6252 else if (a < nu->pntsv - 1 && !((bp + nu->
pntsu)->f1 &
SELECT)) {
6259 if (starta <= 1 && a == nu->pntsv - 1) {
6261 if (starta == 1 && enda !=
a) {
6267 cut = enda - starta + 1;
6270 else if (starta == 0) {
6273 cut = enda - starta + 1;
6281 starta = nu->
pntsv - 1;
6293 else if (enda == nu->
pntsv - 1) {
6296 cut = enda - starta + 1;
6305 else if (cyclicut != 0) {
6319 cut = enda - starta + 1;
6327 if (starta != 0 || enda != nu->
pntsv - 1) {
6371 for (b = 0, bezt1 = nu->
bezt; b < nu->pntsu; b++, bezt1++) {
6381 for (b = 0, bp1 = nu->
bp; b < nu->pntsu * nu->
pntsv; b++, bp1++) {
6389 if (nu->
pntsv > 1) {
6409 uint objects_len = 0;
6412 bool changed_multi =
false;
6414 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6415 Object *obedit = objects[ob_index];
6417 bool changed =
false;
6434 changed_multi =
true;
6447 if (changed_multi) {
6485 ot->
description =
"Delete selected control points or segments";
6526 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6527 Object *obedit = objects[ob_index];
6552 int i_span_edge_len = span_len + 1;
6553 const uint dims = 3;
6555 const uint points_len = ((cu->
resolu - 1) * i_span_edge_len) + 1;
6556 float *points =
MEM_mallocN(points_len * dims *
sizeof(
float), __func__);
6557 float *points_stride = points;
6558 const int points_stride_len = (cu->
resolu - 1);
6564 for (
int axis = 0; axis < dims; axis++) {
6566 bezt_a->
vec[2][axis],
6567 bezt_b->
vec[0][axis],
6568 bezt_b->
vec[1][axis],
6569 points_stride + axis,
6571 dims *
sizeof(
float));
6574 points_stride += dims * points_stride_len;
6577 BLI_assert(points_stride + dims == points + (points_len * dims));
6579 float tan_l[3], tan_r[3], error_sq_dummy;
6580 uint error_index_dummy;
6587 curve_fit_cubic_to_points_single_fl(points,
6597 &error_index_dummy);
6629 ot->
name =
"Dissolve Vertices";
6630 ot->
description =
"Delete selected control points, correcting surrounding handles";
6631 ot->
idname =
"CURVE_OT_dissolve_verts";
6652 for (i = nu->
pntsu, bezt = nu->
bezt; i--; bezt++) {
6653 if (bezt->
f2 & flag_test) {
6664 const float error_sq_max = FLT_MAX;
6666 bool all_supported_multi =
true;
6669 uint objects_len = 0;
6672 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6673 Object *obedit = objects[ob_index];
6675 bool all_supported =
true;
6676 bool changed =
false;
6684 const int error_target_len =
max_ii(2, nu->
pntsu * ratio);
6685 if (error_target_len != nu->
pntsu) {
6692 all_supported =
false;
6697 if (all_supported ==
false) {
6698 all_supported_multi =
false;
6712 if (all_supported_multi ==
false) {
6724 ot->
name =
"Decimate Curve";
6755 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6756 Object *obedit = objects[ob_index];
6787 ot->
name =
"Shade Smooth";
6788 ot->
idname =
"CURVE_OT_shade_smooth";
6803 ot->
idname =
"CURVE_OT_shade_flat";
6833 float imat[4][4], cmat[4][4];
6838 if (ob_iter == ob_active) {
6860 if (ob_iter->type == ob_active->
type) {
6861 if (ob_iter != ob_active) {
6870 bool do_radius =
false;
6871 float compensate_radius = 0.0f;
6872 if (cu->
ext2 != 0.0f && cu_active->
ext2 != 0.0f) {
6874 compensate_radius = cu->
ext2 / cu_active->
ext2 * compensate_scale;
6888 if ((bezt = newnu->
bezt)) {
6893 bezt->
radius *= compensate_radius;
6903 if ((bp = newnu->
bp)) {
6919 cu = ob_active->
data;
6952 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6953 Object *obedit = objects[ob_index];
6999 ot->
idname =
"CURVE_OT_tilt_clear";
7000 ot->
description =
"Clear the tilt of selected control points";
7059 for (
a = 0;
a < 3;
a++) {
7060 if (
size[
a] == 0.0f) {
7063 else if (
size[
a] > 0.0f &&
size[
a] < 0.00001f) {
7066 else if (
size[
a] < 0.0f &&
size[
a] > -0.00001f) {
7067 size[
a] = -0.00001f;
7085 ot->
name =
"Match Texture Space";
7086 ot->
idname =
"CURVE_OT_match_texture_space";
7087 ot->
description =
"Match texture space to object's bounding box";
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
void BKE_action_groups_reconstruct(struct bAction *act)
void action_groups_remove_channel(struct bAction *act, struct FCurve *fcu)
struct AnimData * BKE_animdata_from_id(struct ID *id)
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
void BKE_nurb_handles_calc(struct Nurb *nu)
bool BKE_curve_nurb_vert_active_get(struct Curve *cu, struct Nurb **r_nu, void **r_vert)
void BKE_nurb_handle_calc_simple(struct Nurb *nu, struct BezTriple *bezt)
void BKE_nurb_direction_switch(struct Nurb *nu)
void BKE_nurb_handle_calc(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, const bool is_fcurve, const char smoothing)
void BKE_nurb_knot_calc_v(struct Nurb *nu)
bool BKE_nurb_order_clamp_u(struct Nurb *nu)
struct BezTriple * BKE_nurb_bezt_get_next(struct Nurb *nu, struct BezTriple *bezt)
void BKE_nurb_free(struct Nurb *nu)
void BKE_curve_nurb_vert_active_set(struct Curve *cu, const struct Nurb *nu, const void *vert)
struct Nurb * BKE_nurb_duplicate(const struct Nurb *nu)
void BKE_curve_nurb_vert_active_validate(struct Curve *cu)
void BKE_curve_editNurb_free(struct Curve *cu)
void BKE_curve_editNurb_keyIndex_delCV(struct GHash *keyindex, const void *cv)
struct BPoint * BKE_nurb_bpoint_get_next(struct Nurb *nu, struct BPoint *bp)
void BKE_nurbList_handles_set(struct ListBase *editnurb, const char code)
struct Nurb * BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv)
void BKE_nurb_project_2d(struct Nurb *nu)
void BKE_curve_dimension_update(struct Curve *cu)
void * BKE_curve_vert_active_get(struct Curve *cu)
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
void BKE_nurb_knot_calc_u(struct Nurb *nu)
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, const bool calc_length, const uint8_t flag)
void BKE_nurbList_free(struct ListBase *lb)
struct Nurb * BKE_curve_nurb_active_get(struct Curve *cu)
bool BKE_nurb_type_convert(struct Nurb *nu, const short type, const bool use_handles, const char **r_err_msg)
void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set)
void BKE_nurb_handle_calc_simple_auto(struct Nurb *nu, struct BezTriple *bezt)
bool BKE_nurb_order_clamp_v(struct Nurb *nu)
void BKE_nurb_bezierPoints_add(struct Nurb *nu, int number)
void BKE_curve_editNurb_keyIndex_free(struct GHash **keyindex)
void BKE_curve_nurb_active_set(struct Curve *cu, const struct Nurb *nu)
void BKE_curve_decimate_nurb(struct Nurb *nu, const unsigned int resolu, const float error_sq_max, const unsigned int error_target_len)
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(struct FCurve *fcu)
struct FCurve * BKE_fcurve_copy(const struct FCurve *fcu)
void BKE_keyblock_convert_to_curve(struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb)
bool BKE_keyblock_is_basis(struct Key *key, const int index)
int BKE_keyblock_curve_element_count(struct ListBase *nurb)
struct KeyBlock * BKE_keyblock_from_object(struct Object *ob)
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
#define BKE_view_layer_array_from_bases_in_edit_mode_unique_data(view_layer, v3d, r_len)
struct ID * BKE_id_copy(struct Main *bmain, const struct ID *id)
void id_us_min(struct ID *id)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
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)
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_)
unsigned int BLI_ghash_len(GHash *gh) ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_popkey(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
GHash * BLI_ghash_ptr_new_ex(const char *info, const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct 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 a, float b, float t)
bool isect_ray_plane_v3(const float ray_origin[3], const float ray_direction[3], const float plane[4], float *r_lambda, const bool clip)
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])
void invert_m4_m4_safe_ortho(float Ainv[4][4], const float A[4][4])
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
bool invert_m3_m3(float R[3][3], const float A[3][3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
float mat4_to_scale(const float M[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void axis_angle_to_mat3(float R[3][3], const float axis[3], const float angle)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float r[3])
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])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t)
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])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
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])
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define INIT_MINMAX(min, max)
#define STREQLEN(a, b, n)
#define IN_RANGE_INCL(a, b, c)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ ID_RECALC_COPY_ON_WRITE
#define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt)
#define BEZT_SEL_ALL(bezt)
#define BEZT_DESEL_ALL(bezt)
struct BezTriple BezTriple
#define KEYELEM_FLOAT_LEN_BEZTRIPLE
#define KEYELEM_FLOAT_LEN_BPOINT
Object is a sort of wrapper for general info.
#define SCE_SNAP_MODE_FACE
struct Base * ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Base *base, const eDupli_ID_Flags dupflag)
#define OBJECT_ADD_SIZE_MAXF
void ED_object_base_activate(struct bContext *C, struct Base *base)
void ED_object_base_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Object *ob)
void ED_outliner_select_sync_from_object_tag(struct bContext *C)
bool ED_operator_editsurfcurve(struct bContext *C)
bool ED_operator_editcurve(struct bContext *C)
bool ED_operator_editsurf(struct bContext *C)
SnapObjectContext * ED_transform_snap_object_context_create_view3d(struct Scene *scene, int flag, const struct ARegion *region, const struct View3D *v3d)
bool ED_transform_snap_object_project_view3d(struct SnapObjectContext *sctx, struct Depsgraph *depsgraph, const unsigned short snap_to, const struct SnapObjectParams *params, const float mval[2], const float prev_co[3], float *dist_px, float r_loc[3], float r_no[3])
void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx)
void ED_view3d_win_to_3d_int(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3])
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
void ED_view3d_global_to_vector(const struct RegionView3D *rv3d, const float coord[3], float vec[3])
void view3d_operator_needs_opengl(const struct bContext *C)
struct RegionView3D * ED_view3d_context_rv3d(struct bContext *C)
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
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)
bool ED_curve_pick_vert(struct ViewContext *vc, short sel, struct Nurb **r_nurb, struct BezTriple **r_bezt, struct BPoint **r_bp, short *r_handle, struct Base **r_base)
void ED_curve_nurb_vert_selected_find(Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp)
const Depsgraph * depsgraph
static bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction)
static bool ed_editcurve_extrude(Curve *cu, EditNurb *editnurb, View3D *v3d)
static void keyIndex_updateBP(EditNurb *editnurb, BPoint *bp, BPoint *newbp, int count)
static int hide_exec(bContext *C, wmOperator *op)
static bool isNurbselV(Nurb *nu, int *u, int flag)
static int curve_smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
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)
int ED_curve_join_objects_exec(bContext *C, wmOperator *op)
static int add_vertex_exec(bContext *C, wmOperator *op)
static BPoint * getKeyIndexOrig_bp(EditNurb *editnurb, BPoint *bp)
static bool is_u_selected(Nurb *nu, int u)
static int shade_smooth_exec(bContext *C, wmOperator *op)
bool ed_editnurb_extrude_flag(EditNurb *editnurb, const uint8_t flag)
void CURVE_OT_dissolve_verts(wmOperatorType *ot)
static void weightflagNurb(ListBase *editnurb, short flag, float w)
ListBase * object_editcurve_get(Object *ob)
void CURVE_OT_match_texture_space(wmOperatorType *ot)
void CURVE_OT_switch_direction(wmOperatorType *ot)
static bool test_bezt_is_sel_any(const void *bezt_v, void *user_data)
GHash * ED_curve_keyindex_hash_duplicate(GHash *keyindex)
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 int set_spline_type_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)
void ED_curve_keyindex_update_nurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu)
static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
static int curve_smooth_tilt_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_hide(wmOperatorType *ot)
void CURVE_OT_normals_make_consistent(wmOperatorType *ot)
static void curve_smooth_value(ListBase *editnurb, const int bezt_offsetof, const int bp_offset)
static int match_texture_space_exec(bContext *C, wmOperator *UNUSED(op))
static int spin_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void CURVE_OT_shade_smooth(wmOperatorType *ot)
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)
void ED_curve_beztcpy(EditNurb *editnurb, BezTriple *dst, BezTriple *src, int count)
static CVKeyIndex * init_cvKeyIndex(void *cv, int key_index, int nu_index, int pt_index, int vertex_index)
static void calc_shapeKeys(Object *obedit, ListBase *newnurbs)
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)
@ CURVE_MERGE_ERR_RESOLUTION_ALL
@ CURVE_MERGE_ERR_FEW_SELECTION
@ CURVE_MERGE_ERR_RESOLUTION_SOME
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 int set_handle_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_spline_type_set(wmOperatorType *ot)
static bool match_texture_space_poll(bContext *C)
void CURVE_OT_shade_flat(wmOperatorType *ot)
static int curve_decimate_exec(bContext *C, wmOperator *op)
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 CVKeyIndex * getCVKeyIndex(EditNurb *editnurb, const void *cv)
static int reveal_exec(bContext *C, wmOperator *op)
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 void adduplicateflagNurb(Object *obedit, View3D *v3d, ListBase *newnurb, const uint8_t flag, const bool split)
static int getKeyIndexOrig_keyIndex(EditNurb *editnurb, void *cv)
static int curve_smooth_weight_exec(bContext *C, wmOperator *UNUSED(op))
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 int * init_index_map(Object *obedit, int *r_old_totvert)
static int make_segment_exec(bContext *C, wmOperator *op)
static int curve_split_exec(bContext *C, wmOperator *op)
int ED_curve_updateAnimPaths(Main *bmain, Curve *cu)
static void switchdirection_knots(float *base, int tot)
static int duplicate_exec(bContext *C, wmOperator *op)
static bool curve_delete_vertices(Object *obedit, View3D *v3d)
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 int spin_exec(bContext *C, wmOperator *op)
static int subdivide_exec(bContext *C, wmOperator *op)
static int toggle_cyclic_exec(bContext *C, wmOperator *op)
void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
static int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3])
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 CVKeyIndex * popCVKeyIndex(EditNurb *editnurb, const void *cv)
static void keyIndex_updateCV(EditNurb *editnurb, char *cv, char *newcv, int count, int size)
static int curve_extrude_exec(bContext *C, wmOperator *UNUSED(op))
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 int set_goal_weight_exec(bContext *C, wmOperator *op)
static int curve_normals_make_consistent_exec(bContext *C, wmOperator *op)
static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
static BezTriple * getKeyIndexOrig_bezt(EditNurb *editnurb, const BezTriple *bezt)
void CURVE_OT_smooth(wmOperatorType *ot)
static void curve_rename_fcurves(Curve *cu, ListBase *orig_curves)
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])
static int separate_exec(bContext *C, wmOperator *op)
void CURVE_OT_split(wmOperatorType *ot)
static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op))
static const EnumPropertyItem * rna_curve_delete_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
static void fcurve_remove(AnimData *adt, ListBase *orig_curves, FCurve *fcu)
static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
static int set_radius_exec(bContext *C, wmOperator *op)
void CURVE_OT_smooth_weight(wmOperatorType *ot)
static void fcurve_path_rename(AnimData *adt, const char *orig_rna_path, const char *rna_path, ListBase *orig_curves, ListBase *curves)
void CURVE_OT_radius_set(wmOperatorType *ot)
static int toggle_cyclic_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static bool isNurbselUV(const Nurb *nu, uint8_t flag, int *r_u, int *r_v)
static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void keyIndex_delBP(EditNurb *editnurb, BPoint *bp)
static void ed_surf_delete_selected(Object *obedit)
static int curve_delete_exec(bContext *C, wmOperator *op)
static bool merge_2_nurb(Curve *cu, ListBase *editnurb, Nurb *nu1, Nurb *nu2)
void CURVE_OT_decimate(wmOperatorType *ot)
static const EnumPropertyItem curve_delete_type_items[]
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)
static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_tilt_clear(wmOperatorType *ot)
bool ED_curve_select_check(View3D *v3d, struct EditNurb *editnurb)
bool ED_curve_nurb_select_check(View3D *v3d, Nurb *nu)
int ED_curve_nurb_select_count(View3D *v3d, Nurb *nu)
bool ED_curve_deselect_all(EditNurb *editnurb)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void clear(Message *msg)
Segment< FEdge *, Vec3r > segment
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
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(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
PropertyRNA * RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
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_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct CurveCache * curve_cache
struct ToolSettings * toolsettings
const struct View3D * v3d
struct Depsgraph * depsgraph
struct ViewLayer * view_layer
struct RegionView3D * rv3d
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
void WM_cursor_wait(bool val)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_confirm(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
int WM_operator_props_popup(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))