55 #include "curve_fit_nd.h"
90 void printknots(
Object *obedit)
96 for (nu = editnurb->
first; nu; nu = nu->
next) {
100 for (
a = 0;
a < num;
a++) {
101 printf(
"knotu %d: %f\n",
a, nu->
knotsu[
a]);
106 for (
a = 0;
a < num;
a++) {
107 printf(
"knotv %d: %f\n",
a, nu->
knotsv[
a]);
122 void *cv,
int key_index,
int nu_index,
int pt_index,
int vertex_index)
144 int a, key_index = 0, nu_index = 0, pt_index = 0, vertex_index = 0;
156 origbezt = orignu->
bezt;
164 *origbezt_cpy = *origbezt;
165 keyIndex =
init_cvKeyIndex(origbezt_cpy, key_index, nu_index, pt_index, vertex_index);
185 *origbp_cpy = *origbp;
186 keyIndex =
init_cvKeyIndex(origbp_cpy, key_index, nu_index, pt_index, vertex_index);
197 orignu = orignu->
next;
310 for (i = 0; i <
count; i++) {
366 bezt2 = bezt1 + (
a - 1);
382 if (bezt1 != bezt2) {
397 if (nu->
pntsv == 1) {
402 while (bp1 != bp2 &&
a > 0) {
433 while (bp1 != bp2 &&
a > 0) {
476 *(fp + 9) = -*(fp + 9);
492 *(fp + 3) = -*(fp + 3);
544 memcpy(bezt, basebezt,
sizeof(
BezTriple));
545 memcpy(bezt->
vec, key,
sizeof(
float[9]));
552 memcpy(key, bezt->
vec,
sizeof(
float[9]));
567 float *startfp, *prevfp, *nextfp;
574 prevp = bezt + (
a - 1);
643 float *oldkey, *newkey, *ofp;
655 totvec += nu->
pntsu * 4;
662 ofs =
MEM_callocN(
sizeof(
float[3]) * totvec,
"currkey->data");
673 for (j = 0; j < 3; j++) {
677 ofs[i][0] = bezt->
tilt - oldbezt->
tilt;
694 ofs[i + 1][0] = bp->
tilt - oldbp->
tilt;
706 const bool apply_offset = (ofs && (currkey != actkey) &&
707 (editnurb->
shapenr - 1 == currkey->relative));
710 ofp = oldkey = currkey->data;
716 newnu = newnurbs->
first;
719 if (currkey == actkey) {
720 const bool restore = actkey != cu->
key->
refkey;
730 for (j = 0; j < 3; j++, i++) {
733 if (restore && oldbezt) {
740 if (restore && oldbezt) {
763 if (restore && oldbp) {
789 curofp = ofp + index;
791 for (j = 0; j < 3; j++, i++) {
811 for (j = 0; j < 3; j++, i++) {
829 curofp = ofp + index;
862 currkey->totelem = totvert;
866 currkey->data = newkey;
888 const char *orig_rna_path,
889 const char *rna_path,
894 int len = strlen(orig_rna_path);
898 char *spath, *suffix = fcu->rna_path +
len;
906 nfcu->
grp = fcu->grp;
928 if (orig_curves == &adt->
drivers) {
943 char rna_path[64], orig_rna_path[64];
958 rna_path,
sizeof(rna_path),
"splines[%d].bezier_points[%d]", nu_index, pt_index);
960 sizeof(orig_rna_path),
961 "splines[%d].bezier_points[%d]",
966 char handle_path[64], orig_handle_path[64];
967 BLI_snprintf(orig_handle_path,
sizeof(orig_rna_path),
"%s.handle_left", orig_rna_path);
968 BLI_snprintf(handle_path,
sizeof(rna_path),
"%s.handle_right", rna_path);
972 orig_handle_path,
sizeof(orig_rna_path),
"%s.handle_right", orig_rna_path);
973 BLI_snprintf(handle_path,
sizeof(rna_path),
"%s.handle_left", rna_path);
995 BLI_snprintf(rna_path,
sizeof(rna_path),
"splines[%d].points[%d]", nu_index, pt_index);
997 sizeof(orig_rna_path),
998 "splines[%d].points[%d]",
1017 if (
STRPREFIX(fcu->rna_path,
"splines")) {
1018 const char *ch = strchr(fcu->rna_path,
'.');
1039 BLI_snprintf(rna_path,
sizeof(rna_path),
"splines[%d]", nu_index);
1048 if (
STRPREFIX(fcu->rna_path,
"splines")) {
1100 int *old_to_new_map;
1102 int old_totvert = 0;
1105 old_totvert += nu->
pntsu * 3;
1112 old_to_new_map =
MEM_mallocN(old_totvert *
sizeof(
int),
"curve old to new index map");
1113 for (
int i = 0; i < old_totvert; i++) {
1114 old_to_new_map[i] = -1;
1117 int vertex_index = 0;
1125 if (keyIndex && keyIndex->vertex_index + 2 < old_totvert) {
1126 if (keyIndex->switched) {
1127 old_to_new_map[keyIndex->vertex_index] = vertex_index + 2;
1128 old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
1129 old_to_new_map[keyIndex->vertex_index + 2] = vertex_index;
1132 old_to_new_map[keyIndex->vertex_index] = vertex_index;
1133 old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
1134 old_to_new_map[keyIndex->vertex_index + 2] = vertex_index + 2;
1148 old_to_new_map[keyIndex->vertex_index] = vertex_index;
1156 *r_old_totvert = old_totvert;
1157 return old_to_new_map;
1164 int *old_to_new_map =
NULL;
1167 if (editnurb->keyindex ==
NULL) {
1177 if ((object->parent) && (object->parent->data ==
curve) &&
1179 if (old_to_new_map ==
NULL) {
1183 if (object->par1 < old_totvert) {
1184 index = old_to_new_map[
object->par1];
1186 object->par1 = index;
1189 if (object->par2 < old_totvert) {
1190 index = old_to_new_map[
object->par2];
1192 object->par2 = index;
1195 if (object->par3 < old_totvert) {
1196 index = old_to_new_map[
object->par3];
1198 object->par3 = index;
1202 if (object->data ==
curve) {
1208 if (old_to_new_map ==
NULL) {
1213 if (hmd->
indexar[i] < old_totvert) {
1214 index = old_to_new_map[hmd->
indexar[i]];
1229 if (old_to_new_map !=
NULL) {
1238 if (obedit ==
NULL) {
1284 undo_editmode_clear();
1307 editnurb->shapenr = obedit->
shapenr;
1339 int error_vertex_keys;
1348 for (
uint b_index = 0; b_index < bases_len; b_index++) {
1349 Base *oldbase = bases[b_index];
1352 Curve *oldcu, *newcu;
1357 oldcu = oldob->
data;
1360 status.error_vertex_keys++;
1365 status.unselected++;
1373 status.error_generic++;
1412 if (status.unselected == bases_len) {
1417 const int tot_errors = status.error_vertex_keys + status.error_generic;
1418 if (tot_errors > 0) {
1421 if (status.changed) {
1427 if (((status.error_vertex_keys ? 1 : 0) + (status.error_generic ? 1 : 0)) > 1) {
1432 if (status.error_vertex_keys) {
1452 ot->
description =
"Separate selected points from connected unselected points into a new object";
1474 bool changed =
false;
1475 int count_failed = 0;
1480 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1481 Object *obedit = objects[ob_index];
1514 if (changed ==
false) {
1515 if (count_failed != 0) {
1528 ot->
description =
"Split off selected points from connected unselected points";
1557 for (
a = 0;
a < nu->
pntsu;
a++, bp++) {
1558 if (bp->
f1 & flag) {
1562 if (sel == nu->
pntsu) {
1579 if (bp->f1 & flag) {
1583 if (sel == nu->
pntsv) {
1596 if (*r_u == -1 && *r_v > -1) {
1599 if (*r_v == -1 && *r_u > -1) {
1613 for (
b = 0, bp = nu->
bp; b < nu->pntsv;
b++) {
1615 for (
a = 0;
a < nu->
pntsu;
a++, bp++) {
1616 if (bp->
f1 & flag) {
1620 if (sel == nu->
pntsu) {
1623 else if (sel >= 1) {
1644 if (bp->f1 & flag) {
1648 if (sel == nu->
pntsv) {
1651 else if (sel >= 1) {
1662 const float cent[3],
1663 const float rotmat[3][3])
1675 if (bp->
f1 & flag) {
1698 if (bezt->
f1 & flag) {
1701 if (bezt->
f2 & flag) {
1704 if (bezt->
f3 & flag) {
1714 if (bp->
f1 & flag) {
1737 if (bp->
f1 & flag) {
1751 BPoint *bp, *bpn, *newbp;
1752 int a,
b, newu, newv;
1779 newv = nu->
pntsv - newv;
1780 if (newv != nu->
pntsv) {
1805 newu = nu->
pntsu - newu;
1806 if (newu != nu->
pntsu) {
1811 for (
a = 0;
a < nu->
pntsu;
a++, bp++) {
1824 if (newu == 1 && nu->
pntsv > 1) {
1849 int a,
type, nuindex = 0;
1868 if (cu->
actnu == nuindex) {
1894 if (cu->
actnu == nuindex) {
1910 clamp_nurb_order_u(nu);
1942 else if (nu->
pntsv == 1) {
1947 memmove(bp, bp + 1, (nu->
pntsu -
a - 1) *
sizeof(
BPoint));
1969 clamp_nurb_order_u(nu);
1981 BPoint *bp, *bpn, *newbp;
1986 if (nu->
pntsv == 1) {
1990 if (bp->
f1 & flag) {
2003 bp = newbp + nu->
pntsu;
2076 if (
v == nu->
pntsu - 1) {
2108 if ((start <= cu->actvert) && (end > cu->
actvert)) {
2122 BPoint *bp, *bp1, *bp2, *bp3;
2124 int a,
b,
c, starta, enda, diffa, cyclicu, cyclicv, newu, newv;
2129 cyclicu = cyclicv = 0;
2131 for (
a = 0, bezt = nu->
bezt; a < nu->pntsu;
a++, bezt++) {
2134 while ((bezt->
f1 & flag) || (bezt->
f2 & flag) || (bezt->
f3 & flag)) {
2139 if (
a >= nu->
pntsu - 1) {
2145 if (enda >= starta) {
2146 newu = diffa = enda - starta + 1;
2152 if (enda == nu->
pntsu - 1) {
2155 if (i == cu->
actnu) {
2157 editnurb, newnurb, cu, starta, starta + diffa, cu->
actvert - starta);
2162 if (newu != diffa) {
2164 if (i == cu->
actnu) {
2166 editnurb, newnurb, cu, 0, cyclicu, newu - cyclicu + cu->
actvert);
2171 if (newu != nu->
pntsu) {
2175 for (
b = 0, bezt1 = newnu->
bezt; b < newnu->pntsu;
b++, bezt1++) {
2185 if (i == cu->
actnu) {
2193 for (
b = 0, bezt1 = newnu->
bezt; b < newnu->pntsu;
b++, bezt1++) {
2200 else if (nu->
pntsv == 1) {
2201 for (
a = 0, bp = nu->
bp; a < nu->pntsu;
a++, bp++) {
2204 while (bp->
f1 & flag) {
2209 if (
a >= nu->
pntsu - 1) {
2215 if (enda >= starta) {
2216 newu = diffa = enda - starta + 1;
2222 if (enda == nu->
pntsu - 1) {
2225 if (i == cu->
actnu) {
2227 editnurb, newnurb, cu, starta, starta + diffa, cu->
actvert - starta);
2231 memcpy(newnu->
bp, &nu->
bp[starta], diffa *
sizeof(
BPoint));
2232 if (newu != diffa) {
2233 memcpy(&newnu->
bp[diffa], nu->
bp, cyclicu *
sizeof(
BPoint));
2234 if (i == cu->
actnu) {
2236 editnurb, newnurb, cu, 0, cyclicu, newu - cyclicu + cu->
actvert);
2241 if (newu != nu->
pntsu) {
2245 for (
b = 0, bp1 = newnu->
bp; b < newnu->pntsu;
b++, bp1++) {
2255 if (i == cu->
actnu) {
2260 memcpy(newnu->
bp, nu->
bp, cyclicu *
sizeof(
BPoint));
2263 for (
b = 0, bp1 = newnu->
bp; b < newnu->pntsu;
b++, bp1++) {
2277 for (
b = 0;
b < nu->
pntsu;
b++, bp++) {
2278 if (bp->
f1 & flag) {
2287 if (
ELEM(newv, 0, usel[
a])) {
2299 if ((newu == 0 || newv == 0) ||
2302 printf(
"Can't duplicate Nurb\n");
2306 for (
a = 0, bp1 = nu->
bp; a < nu->pntsu * nu->
pntsv;
a++, bp1++) {
2311 for (
b =
a % nu->
pntsu, bp2 = bp1; b < nu->pntsu;
b++, bp2++) {
2312 if (bp2->
f1 & flag) {
2314 for (
c =
a / nu->
pntsu, bp3 = bp2; c < nu->pntsv;
c++, bp3 += nu->
pntsu) {
2315 if (bp3->
f1 & flag) {
2333 if ((newu + newv) > 2) {
2343 if (cyclicu != 0 || cyclicv != 0) {
2348 if (
a + newu == nu->
pntsu && cyclicu != 0) {
2351 for (
b = 0;
b < newv;
b++) {
2352 memcpy(&newnu->
bp[
b * newnu->
pntsu],
2355 memcpy(&newnu->
bp[
b * newnu->
pntsu + newu],
2357 cyclicu *
sizeof(
BPoint));
2360 if (cu->
actnu == i) {
2365 for (
b = 0, diffa = 0;
b < newv;
b++, diffa += nu->
pntsu - newu) {
2389 cyclicu = cyclicv = 0;
2391 else if ((
a / nu->
pntsu) + newv == nu->
pntsv && cyclicv != 0) {
2394 memcpy(newnu->
bp, &nu->
bp[
a], newu * newv *
sizeof(
BPoint));
2395 memcpy(&newnu->
bp[newu * newv], nu->
bp, newu * cyclicv *
sizeof(
BPoint));
2398 if (cu->
actnu == i) {
2402 cyclicu = cyclicv = 0;
2406 for (
b = 0;
b < newv;
b++) {
2412 if (cu->
actnu == i) {
2417 for (
b = 0, diffa = 0;
b < newv;
b++, diffa += nu->
pntsu - newu) {
2425 (starta % nu->
pntsu)))) {
2433 if (newu != nu->
pntsu) {
2436 if (newv != nu->
pntsv) {
2442 if (cyclicu != 0 || cyclicv != 0) {
2444 newu = cyclicu == 0 ? nu->
pntsu : cyclicu;
2445 newv = cyclicv == 0 ? nu->
pntsv : cyclicv;
2448 for (
b = 0;
b < newv;
b++) {
2453 if (cu->
actnu == i) {
2458 for (
b = 0, diffa = 0;
b < newv;
b++, diffa += nu->
pntsu - newu) {
2473 if (newu != nu->
pntsu) {
2476 if (newv != nu->
pntsv) {
2481 for (
b = 0, bp1 = nu->
bp; b < nu->pntsu * nu->
pntsv;
b++, bp1++) {
2507 for (
a = 0, bp = nu->
bp; a < nu->pntsu * nu->
pntsv;
a++, bp++) {
2534 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2535 Object *obedit = objects[ob_index];
2569 ot->
name =
"Switch Direction";
2571 ot->
idname =
"CURVE_OT_switch_direction";
2594 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2595 Object *obedit = objects[ob_index];
2604 for (bezt = nu->
bezt,
a = 0; a < nu->pntsu;
a++, bezt++) {
2611 for (bp = nu->
bp,
a = 0; a < nu->pntsu * nu->
pntsv;
a++, bp++) {
2631 ot->
name =
"Set Goal Weight";
2632 ot->
description =
"Set softbody goal weight for selected points";
2633 ot->
idname =
"CURVE_OT_spline_weight_set";
2660 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2661 Object *obedit = objects[ob_index];
2670 for (bezt = nu->
bezt,
a = 0; a < nu->pntsu;
a++, bezt++) {
2677 for (bp = nu->
bp,
a = 0; a < nu->pntsu * nu->
pntsv;
a++, bp++) {
2697 ot->
name =
"Set Curve Radius";
2698 ot->
description =
"Set per-point radius which is used for bevel tapering";
2699 ot->
idname =
"CURVE_OT_radius_set";
2727 for (
int i = 0; i < 3; i++) {
2729 float val_old = bezt->
vec[1][i];
2732 float val_new = (bezt_orig_prev->
vec[1][i] * 0.5f) + (bezt_orig_next->
vec[1][i] * 0.5f);
2733 float offset = (val_old * (1.0f - factor)) + (val_new * factor) - val_old;
2746 const BPoint *bp_orig_prev,
2747 const BPoint *bp_orig_next,
2752 for (
int i = 0; i < 3; i++) {
2753 float val_old, val_new,
offset;
2755 val_old = bp->
vec[i];
2756 val_new = (bp_orig_prev->
vec[i] * 0.5f) + (bp_orig_next->
vec[i] * 0.5f);
2757 offset = (val_old * (1.0f - factor)) + (val_new * factor) - val_old;
2765 const float factor = 1.0f / 6.0f;
2771 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2772 Object *obedit = objects[ob_index];
2776 bool changed =
false;
2792 a_end = nu->
pntsu - 1;
2796 for (;
a < a_end;
a++) {
2798 bezt = &nu->
bezt[
a];
2800 const BezTriple *bezt_orig_prev, *bezt_orig_next;
2802 bezt_orig_prev = &bezt_orig[
mod_i(
a - 1, nu->
pntsu)];
2803 bezt_orig_next = &bezt_orig[
mod_i(
a + 1, nu->
pntsu)];
2826 a_end = nu->
pntsu - 1;
2829 for (;
a < a_end;
a++) {
2832 const BPoint *bp_orig_prev, *bp_orig_next;
2886 int start_sel, end_sel;
2887 float start_rad, end_rad, fac, range;
2891 #define BEZT_VALUE(bezt) (*((float *)((char *)(bezt) + bezt_offsetof)))
2893 for (last_sel = 0; last_sel < nu->
pntsu; last_sel++) {
2899 for (bezt = &nu->
bezt[last_sel],
a = last_sel; a < nu->pntsu;
a++, bezt++) {
2906 end_sel = start_sel;
2907 for (bezt = &nu->
bezt[start_sel + 1],
a = start_sel + 1; a < nu->pntsu;
a++, bezt++) {
2914 if (start_sel == -1) {
2915 last_sel = nu->
pntsu;
2921 start_rad = end_rad = FLT_MAX;
2923 if (start_sel == end_sel) {
2925 if (start_sel > 0) {
2928 if (end_sel != -1 && end_sel < nu->pntsu) {
2932 if (start_rad != FLT_MAX && end_rad >= FLT_MAX) {
2935 else if (start_rad != FLT_MAX) {
2938 else if (end_rad != FLT_MAX) {
2944 if (start_sel == 0) {
2951 if (end_sel == nu->
pntsu - 1) {
2960 range = (
float)(end_sel - start_sel) + 2.0f;
2961 for (bezt = &nu->
bezt[start_sel],
a = start_sel;
a <= end_sel;
a++, bezt++) {
2962 fac = (
float)(1 +
a - start_sel) / range;
2963 BEZT_VALUE(bezt) = start_rad * (1.0f - fac) + end_rad * fac;
2971 #define BP_VALUE(bp) (*((float *)((char *)(bp) + bp_offset)))
2974 for (last_sel = 0; last_sel < nu->
pntsu; last_sel++) {
2980 for (bp = &nu->
bp[last_sel],
a = last_sel; a < nu->pntsu;
a++, bp++) {
2987 end_sel = start_sel;
2988 for (bp = &nu->
bp[start_sel + 1],
a = start_sel + 1; a < nu->pntsu;
a++, bp++) {
2995 if (start_sel == -1) {
2996 last_sel = nu->
pntsu;
3002 start_rad = end_rad = FLT_MAX;
3004 if (start_sel == end_sel) {
3006 if (start_sel > 0) {
3007 start_rad =
BP_VALUE(&nu->
bp[start_sel - 1]);
3009 if (end_sel != -1 && end_sel < nu->pntsu) {
3013 if (start_rad != FLT_MAX && end_rad != FLT_MAX) {
3014 BP_VALUE(&nu->
bp[start_sel]) = (start_rad + end_rad) / 2;
3016 else if (start_rad != FLT_MAX) {
3019 else if (end_rad != FLT_MAX) {
3025 if (start_sel == 0) {
3030 start_rad =
BP_VALUE(&nu->
bp[start_sel - 1]);
3032 if (end_sel == nu->
pntsu - 1) {
3041 range = (
float)(end_sel - start_sel) + 2.0f;
3042 for (bp = &nu->
bp[start_sel],
a = start_sel;
a <= end_sel;
a++, bp++) {
3043 fac = (
float)(1 +
a - start_sel) / range;
3044 BP_VALUE(bp) = start_rad * (1.0f - fac) + end_rad * fac;
3067 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3068 Object *obedit = objects[ob_index];
3085 ot->
name =
"Smooth Curve Weight";
3087 ot->
idname =
"CURVE_OT_smooth_weight";
3110 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3111 Object *obedit = objects[ob_index];
3128 ot->
name =
"Smooth Curve Radius";
3130 ot->
idname =
"CURVE_OT_smooth_radius";
3153 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3154 Object *obedit = objects[ob_index];
3171 ot->
name =
"Smooth Curve Tilt";
3173 ot->
idname =
"CURVE_OT_smooth_tilt";
3199 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3200 Object *obedit = objects[ob_index];
3231 if (sel == nu->
pntsu) {
3270 ot->
name =
"Hide Selected";
3295 bool changed_multi =
false;
3300 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3301 Object *obedit = objects[ob_index];
3306 bool changed =
false;
3340 changed_multi =
true;
3350 ot->
name =
"Reveal Hidden";
3380 BPoint *bp, *prevbp, *bpnew, *bpn;
3382 int a,
b, sel, amount, *usel, *vsel;
3402 if (nextbezt ==
NULL) {
3408 amount += number_cuts;
3425 if (nextbezt ==
NULL) {
3431 float prevvec[3][3];
3433 memcpy(prevvec, bezt->
vec,
sizeof(
float[9]));
3435 for (
int i = 0; i < number_cuts; i++) {
3436 factor = 1.0f / (number_cuts + 1 - i);
3438 memcpy(beztn, nextbezt,
sizeof(
BezTriple));
3465 memcpy(prevvec, beztn->
vec,
sizeof(
float[9]));
3475 nu->
pntsu += amount;
3480 else if (nu->
pntsv == 1) {
3494 if (nextbp ==
NULL) {
3499 amount += number_cuts;
3514 memcpy(bpn, bp,
sizeof(
BPoint));
3519 if (nextbp ==
NULL) {
3525 for (
int i = 0; i < number_cuts; i++) {
3526 factor = (
float)(i + 1) / (number_cuts + 1);
3528 memcpy(bpn, nextbp,
sizeof(
BPoint));
3539 nu->
pntsu += amount;
3610 int countu = nu->
pntsu + (nu->
pntsu - 1) * number_cuts;
3613 int tot = ((number_cuts + 1) * nu->
pntsu - number_cuts) *
3614 ((number_cuts + 1) * nu->
pntsv - number_cuts);
3625 if (b < nu->pntsu - 1) {
3627 for (
int i = 0; i < number_cuts; i++) {
3628 factor = (
float)(i + 1) / (number_cuts + 1);
3635 bpn += number_cuts * countu;
3638 bpn = bpnew + ((number_cuts + 1) * nu->
pntsu - number_cuts);
3639 bp = bpnew + (number_cuts + 1) * ((number_cuts + 1) * nu->
pntsu - number_cuts);
3643 for (
b = 0;
b < (number_cuts + 1) * nu->
pntsu - number_cuts;
b++) {
3645 for (
int i = 0; i < number_cuts; i++) {
3646 factor = (
float)(i + 1) / (number_cuts + 1);
3655 bp += number_cuts * countu;
3656 bpn += number_cuts * countu;
3657 prevbp += number_cuts * countu;
3661 nu->
pntsu = (number_cuts + 1) * nu->
pntsu - number_cuts;
3662 nu->
pntsv = (number_cuts + 1) * nu->
pntsv - number_cuts;
3669 for (
a = 0;
a < nu->
pntsv - 1;
a++) {
3670 if (vsel[
a] == nu->
pntsu && vsel[
a + 1] == nu->
pntsu) {
3686 if ((a < nu->pntsv - 1) && vsel[
a] == nu->
pntsu && vsel[
a + 1] == nu->
pntsu) {
3687 for (
int i = 0; i < number_cuts; i++) {
3688 factor = (
float)(i + 1) / (number_cuts + 1);
3689 prevbp = bp - nu->
pntsu;
3717 for (
a = 0;
a < nu->
pntsu - 1;
a++) {
3718 if (usel[
a] == nu->
pntsv && usel[
a + 1] == nu->
pntsv) {
3735 if ((b < nu->pntsu - 1) && usel[
b] == nu->
pntsv && usel[
b + 1] == nu->
pntsv) {
3743 for (
int i = 0; i < number_cuts; i++) {
3744 factor = (
float)(i + 1) / (number_cuts + 1);
3775 uint objects_len = 0;
3778 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3779 Object *obedit = objects[ob_index];
3816 prop =
RNA_def_int(
ot->
srna,
"number_cuts", 1, 1, 1000,
"Number of Cuts",
"", 1, 10);
3836 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3837 Object *obedit = objects[ob_index];
3841 bool changed =
false;
3842 bool changed_size =
false;
3848 const int pntsu_prev = nu->
pntsu;
3849 const char *err_msg =
NULL;
3852 if (pntsu_prev != nu->
pntsu) {
3853 changed_size =
true;
3887 {
CU_POLY,
"POLY", 0,
"Poly",
""},
3889 {
CU_NURBS,
"NURBS", 0,
"NURBS",
""},
3894 ot->
name =
"Set Spline Type";
3896 ot->
idname =
"CURVE_OT_spline_type_set";
3912 "Use handles when converting bezier curves into polygons");
3930 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3931 Object *obedit = objects[ob_index];
3952 {
HD_AUTO,
"AUTOMATIC", 0,
"Automatic",
""},
3953 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
3954 {5,
"ALIGNED", 0,
"Aligned",
""},
3955 {6,
"FREE_ALIGN", 0,
"Free",
""},
3956 {3,
"TOGGLE_FREE_ALIGN", 0,
"Toggle Free/Align",
""},
3961 ot->
name =
"Set Handle Type";
3962 ot->
description =
"Set type of handles for selected control points";
3963 ot->
idname =
"CURVE_OT_handle_type_set";
3993 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3994 Object *obedit = objects[ob_index];
4014 ot->
name =
"Recalculate Handles";
4015 ot->
description =
"Recalculate the direction of selected handles";
4016 ot->
idname =
"CURVE_OT_normals_make_consistent";
4039 float *fp1, *fp2, *tempf;
4042 if (base ==
NULL || tot == 0) {
4049 fp2 = fp1 + (
a - 1);
4051 while (fp1 != fp2 &&
a > 0) {
4052 SWAP(
float, *fp1, *fp2);
4061 fp2 = tempf =
MEM_mallocN(
sizeof(
float) * tot,
"switchdirect");
4063 fp2[0] =
fabsf(fp1[1] - fp1[0]);
4075 fp1[0] = fp1[-1] + fp2[0];
4084 BPoint *bp1, *bp2, *temp;
4098 for (u = 0; u < nu->
pntsu; u++, bp1++) {
4099 bp2 = temp + (nu->
pntsu - u - 1) * (nu->
pntsv) +
v;
4132 NurbSort *nus, *nustest, *headdo, *taildo;
4134 float dist, headdist, taildist;
4160 while (nbase.
first) {
4162 headdist = taildist = 1.0e30;
4163 headdo = taildo =
NULL;
4165 nustest = nbase.
first;
4169 if (dist < headdist) {
4175 if (dist < taildist) {
4179 nustest = nustest->
next;
4182 if (headdist < taildist) {
4202 BPoint *bp, *bp1, *bp2, *temp;
4237 if (nu1->
pntsv != 1) {
4270 if (nu1->
pntsu == 1) {
4273 if (nu2->
pntsv != 1) {
4289 bp1 = &nu1->
bp[nu1->
pntsu - 1];
4297 bp1 = &nu1->
bp[nu1->
pntsu - 1];
4330 for (u = 0; u < nu1->
pntsu; u++, bp++) {
4369 if (nsortbase.
first == nsortbase.
last) {
4374 nus1 = nsortbase.
first;
4386 else if (nus2->
nu->
pntsv == 1) {
4431 int error_selected_few;
4432 int error_resolution;
4439 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
4440 Object *obedit = objects[ob_index];
4444 status.unselected++;
4463 if (nu_select_num) {
4469 if (nu_select_num > 1) {
4473 if (nu->
pntsv == 1) {
4487 switch (merge_result) {
4490 goto curve_merge_tag_object;
4492 status.error_resolution++;
4493 goto curve_merge_tag_object;
4495 status.error_selected_few++;
4498 status.error_resolution++;
4505 for (nu = nubase->
first; nu; nu = nu->
next) {
4506 if (nu->
pntsu == 1) {
4517 else if (nu1 ==
NULL) {
4534 else if (nu2 ==
NULL) {
4547 else if (nu->
pntsv == 1) {
4558 else if (nu1 ==
NULL) {
4571 else if (nu2 ==
NULL) {
4589 if ((nu1 && nu2) && (nu1 != nu2)) {
4590 if (nu1->
type == nu2->type) {
4599 nu1->
pntsu += nu2->pntsu;
4615 nu1->
pntsu += nu2->pntsu;
4633 else if ((nu1 && !nu2) || (!nu1 && nu2)) {
4655 status.error_generic++;
4665 curve_merge_tag_object:
4671 if (status.unselected == objects_len) {
4676 const int tot_errors = status.error_selected_few + status.error_resolution +
4677 status.error_generic;
4678 if (tot_errors > 0) {
4680 if (status.changed) {
4686 if (((status.error_selected_few ? 1 : 0) + (status.error_resolution ? 1 : 0) +
4687 (status.error_generic ? 1 : 0)) > 1) {
4692 if (status.error_selected_few) {
4695 else if (status.error_resolution) {
4711 ot->
name =
"Make Segment";
4712 ot->
idname =
"CURVE_OT_make_segment";
4732 const bool vert_without_handles,
4742 bool changed =
false;
4748 const bool use_handle_select = vert_without_handles &&
4754 if ((found &&
params->select_passthrough) &&
4755 (((bezt ? (&bezt->
f1)[hand] : bp->
f1) &
SELECT) != 0)) {
4758 else if (found ||
params->deselect_all) {
4760 uint objects_len = 0;
4763 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
4764 Object *ob_iter = objects[ob_index];
4782 switch (
params->sel_op) {
4786 if (use_handle_select) {
4812 if (use_handle_select) {
4822 else if (hand == 0) {
4841 if (use_handle_select) {
4852 if (use_handle_select) {
4861 else if (hand == 0) {
4888 if (use_handle_select) {
4938 return changed || found;
4948 float viewmat[4][4],
View3D *v3d,
Object *obedit,
const float axis[3],
const float cent[3])
4952 float cmat[3][3], tmat[3][3], imat[3][3];
4953 float bmat[3][3], rotmat[3][3], scalemat1[3][3], scalemat2[3][3];
4954 float persmat[3][3], persinv[3][3];
4955 bool ok, changed =
false;
4989 for (
a = 0;
a < 7;
a++) {
5032 float cent[3], axis[3], viewmat[4][4];
5033 bool changed =
false;
5034 int count_failed = 0;
5049 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5050 Object *obedit = objects[ob_index];
5075 if (changed ==
false) {
5076 if (count_failed != 0) {
5088 float axis[3] = {0.0f, 0.0f, 1.0f};
5105 ot->
description =
"Extrude selected boundary row around pivot point and current view axis";
5122 "Center in global view space",
5126 ot->
srna,
"axis", 3,
NULL, -1.0f, 1.0f,
"Axis",
"Axis in global view space", -1.0f, 1.0f);
5137 bool changed =
false;
5156 int pnt_len = nu->
pntsu;
5159 bool is_prev_selected =
false;
5160 bool duplic_first =
false;
5161 bool duplic_last =
false;
5169 bezt_prev = &nu->
bezt[0];
5173 bezt_prev = &nu->
bezt[pnt_len - 1];
5184 bezt_stack = nu->
bezt[0];
5186 bezt_prev = &bezt_stack;
5193 for (bezt = &nu->
bezt[0]; i--; bezt++) {
5195 if (bezt_prev && is_prev_selected != is_selected) {
5198 if (bezt == cu_actvert.bezt) {
5199 act_offset = new_points;
5202 is_prev_selected = is_selected;
5210 is_prev_selected =
false;
5216 else if (duplic_first) {
5217 bezt_prev = &bezt_stack;
5218 is_prev_selected =
false;
5223 BezTriple *bezt_src, *bezt_dst, *bezt_src_iter, *bezt_dst_iter;
5224 const int new_len = pnt_len + new_points;
5226 bezt_src = nu->
bezt;
5228 bezt_src_iter = &bezt_src[0];
5229 bezt_dst_iter = &bezt_dst[0];
5231 for (bezt = &nu->
bezt[0]; i < pnt_len; i++, bezt++) {
5239 if (bezt_prev && is_prev_selected != is_selected) {
5241 if (is_prev_selected) {
5251 bezt_dst_iter +=
count + 1;
5252 bezt_src_iter +=
count;
5256 is_prev_selected = is_selected;
5259 int remain = pnt_len -
offset;
5265 ED_curve_beztcpy(editnurb, &bezt_dst[new_len - 1], &bezt_src[pnt_len - 1], 1);
5270 nu->
bezt = bezt_dst;
5271 nu->
pntsu += new_points;
5281 bp_prev = &nu->
bp[0];
5287 bp_stack = nu->
bp[0];
5289 bp_prev = &bp_stack;
5297 for (bp = &nu->
bp[0]; i--; bp++) {
5298 bool is_selected = (bp->
f1 &
SELECT) != 0;
5299 if (bp_prev && is_prev_selected != is_selected) {
5302 if (bp == cu_actvert.bp) {
5303 act_offset = new_points;
5306 is_prev_selected = is_selected;
5310 BPoint *bp_src, *bp_dst, *bp_src_iter, *bp_dst_iter;
5311 const int new_len = pnt_len + new_points;
5313 is_prev_selected =
false;
5319 else if (duplic_first) {
5320 bp_prev = &bp_stack;
5321 is_prev_selected =
false;
5328 bp_src_iter = &bp_src[0];
5329 bp_dst_iter = &bp_dst[0];
5331 for (bp = &nu->
bp[0]; i < pnt_len; i++, bp++) {
5332 bool is_selected = (bp->
f1 &
SELECT) != 0;
5333 if (bp_prev && is_prev_selected != is_selected) {
5335 if (is_prev_selected) {
5345 bp_dst_iter +=
count + 1;
5346 bp_src_iter +=
count;
5350 is_prev_selected = is_selected;
5353 int remain = pnt_len -
offset;
5359 ED_curve_bpcpy(editnurb, &bp_dst[new_len - 1], &bp_src[pnt_len - 1], 1);
5365 nu->
pntsu += new_points;
5389 bool changed =
false;
5399 for (i = 0, bezt = nu->
bezt; i < nu->pntsu; i++, bezt++) {
5409 for (i = 0, bp = nu->
bp; i < nu->pntsu; i++, bp++) {
5432 for (i = 0, bezt = nu->
bezt; i < nu->pntsu; i++, bezt++) {
5449 for (i = 0, bp = nu->
bp; i < nu->pntsu; i++, bp++) {
5473 nurb_new =
MEM_callocN(
sizeof(
Nurb),
"BLI_editcurve_addvert new_bezt_nurb 2");
5487 memcpy(nurb_new->
bp, nu->
bp,
sizeof(
BPoint));
5600 .snap_target_select = (vc.obedit != NULL) ? SCE_SNAP_TARGET_NOT_ACTIVE :
5601 SCE_SNAP_TARGET_ALL,
5602 .edit_mode_type = SNAP_GEOM_FINAL,
5615 const float eps = 1e-6f;
5634 float location_test[3];
5658 ot->
name =
"Extrude to Cursor or Add";
5659 ot->
idname =
"CURVE_OT_vertex_add";
5660 ot->
description =
"Add a new control point (linked to only selected end-curve one, if any)";
5678 "Location to add new vertex at",
5698 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5699 Object *obedit = objects[ob_index];
5702 bool changed =
false;
5703 bool as_curve =
false;
5768 bool changed =
false;
5819 if (direction == 0 && nu->
pntsu > 1) {
5825 if (direction == 1 && nu->
pntsv > 1) {
5846 bool changed_multi =
false;
5851 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5852 Object *obedit = objects[ob_index];
5861 changed_multi =
true;
5898 {0,
"CYCLIC_U", 0,
"Cyclic U",
""},
5899 {1,
"CYCLIC_V", 0,
"Cyclic V",
""},
5904 ot->
name =
"Toggle Cyclic";
5906 ot->
idname =
"CURVE_OT_cyclic_toggle";
5922 "Direction to make surface cyclic in");
5936 bool changed =
false;
5937 int count_failed = 0;
5939 uint objects_len = 0;
5942 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5943 Object *obedit = objects[ob_index];
5965 if (changed ==
false) {
5966 if (count_failed != 0) {
5977 ot->
name =
"Duplicate Curve";
6015 int a,
b, starta, enda, cut, cyclicut;
6019 starta = enda = cut = -1;
6023 for (
a = 0, bezt = nu->
bezt; a < nu->pntsu;
a++, bezt++) {
6029 if (a < nu->pntsu - 1) {
6040 if (starta <= 1 && a == nu->pntsu - 1) {
6042 if (starta == 1 && enda !=
a) {
6048 cut = enda - starta + 1;
6051 else if (starta == 0) {
6054 cut = enda - starta + 1;
6063 starta = nu->
pntsu - 1;
6075 else if (enda == nu->
pntsu - 1) {
6078 cut = enda - starta + 1;
6080 bezt2 = &nu->
bezt[1];
6088 else if (cyclicut != 0) {
6102 cut = enda - starta + 1;
6110 if (starta != 0 || enda != nu->
pntsu - 1) {
6122 bezt2 = &nu->
bezt[1];
6140 else if (nu->
pntsv >= 1) {
6144 for (
a = 0, bp = nu->
bp; a < nu->pntsu;
a++, bp++) {
6150 if (a < nu->pntsu - 1) {
6154 else if (a < nu->pntsu - 1 && !((bp + 1)->f1 &
SELECT)) {
6161 if (starta <= 1 && a == nu->pntsu - 1) {
6163 if (starta == 1 && enda !=
a) {
6169 cut = enda - starta + 1;
6172 else if (starta == 0) {
6175 cut = enda - starta + 1;
6186 starta = nu->
pntsu - 1;
6198 else if (enda == nu->
pntsu - 1) {
6201 cut = enda - starta + 1;
6213 else if (cyclicut != 0) {
6218 editnurb, &nu1->
bp[
b * nu1->
pntsu + cut], &nu->
bp[
b * nu->
pntsu], cyclicut);
6229 cut = enda - starta + 1;
6240 if (starta != 0 || enda != nu->
pntsu - 1) {
6275 for (
a = 0, bp = nu->
bp; a < nu->pntsv;
a++, bp += nu->
pntsu) {
6281 if (a < nu->pntsv - 1) {
6285 else if (a < nu->pntsv - 1 && !((bp + nu->
pntsu)->f1 &
SELECT)) {
6292 if (starta <= 1 && a == nu->pntsv - 1) {
6294 if (starta == 1 && enda !=
a) {
6300 cut = enda - starta + 1;
6303 else if (starta == 0) {
6306 cut = enda - starta + 1;
6314 starta = nu->
pntsv - 1;
6326 else if (enda == nu->
pntsv - 1) {
6329 cut = enda - starta + 1;
6338 else if (cyclicut != 0) {
6352 cut = enda - starta + 1;
6360 if (starta != 0 || enda != nu->
pntsv - 1) {
6404 for (
b = 0, bezt1 = nu->
bezt; b < nu->pntsu;
b++, bezt1++) {
6414 for (
b = 0, bp1 = nu->
bp; b < nu->pntsu * nu->
pntsv;
b++, bp1++) {
6422 if (nu->
pntsv > 1) {
6442 uint objects_len = 0;
6445 bool changed_multi =
false;
6447 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6448 Object *obedit = objects[ob_index];
6450 bool changed =
false;
6467 changed_multi =
true;
6480 if (changed_multi) {
6518 ot->
description =
"Delete selected control points or segments";
6554 const uint span_len,
6555 const uint span_step[2])
6557 int i_span_edge_len = span_len + 1;
6560 const int points_len = ((cu->
resolu - 1) * i_span_edge_len) + 1;
6561 float *points =
MEM_mallocN(points_len * dims *
sizeof(
float), __func__);
6562 float *points_stride = points;
6563 const int points_stride_len = (cu->
resolu - 1);
6569 for (
int axis = 0; axis < dims; axis++) {
6571 bezt_a->
vec[2][axis],
6572 bezt_b->
vec[0][axis],
6573 bezt_b->
vec[1][axis],
6574 points_stride + axis,
6576 dims *
sizeof(
float));
6579 points_stride += dims * points_stride_len;
6582 BLI_assert(points_stride + dims == points + (points_len * dims));
6584 float tan_l[3], tan_r[3], error_sq_dummy;
6585 uint error_index_dummy;
6592 curve_fit_cubic_to_points_single_fl(points,
6602 &error_index_dummy);
6623 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6624 Object *obedit = objects[ob_index];
6672 ot->
name =
"Dissolve Vertices";
6673 ot->
description =
"Delete selected control points, correcting surrounding handles";
6674 ot->
idname =
"CURVE_OT_dissolve_verts";
6695 for (i = nu->
pntsu, bezt = nu->
bezt; i--; bezt++) {
6696 if (bezt->
f2 & flag_test) {
6707 const float error_sq_max = FLT_MAX;
6709 bool all_supported_multi =
true;
6712 uint objects_len = 0;
6715 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6716 Object *obedit = objects[ob_index];
6718 bool all_supported =
true;
6719 bool changed =
false;
6727 const int error_target_len =
max_ii(2, nu->
pntsu * ratio);
6728 if (error_target_len != nu->
pntsu) {
6735 all_supported =
false;
6740 if (all_supported ==
false) {
6741 all_supported_multi =
false;
6755 if (all_supported_multi ==
false) {
6767 ot->
name =
"Decimate Curve";
6798 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6799 Object *obedit = objects[ob_index];
6830 ot->
name =
"Shade Smooth";
6831 ot->
idname =
"CURVE_OT_shade_smooth";
6846 ot->
idname =
"CURVE_OT_shade_flat";
6872 float imat[4][4], cmat[4][4];
6877 if (ob_iter == ob_active) {
6899 if (ob_iter->type == ob_active->
type) {
6900 if (ob_iter != ob_active) {
6909 bool do_radius =
false;
6910 float compensate_radius = 0.0f;
6927 if ((bezt = newnu->
bezt)) {
6932 bezt->
radius *= compensate_radius;
6942 if ((bp = newnu->
bp)) {
6958 cu = ob_active->
data;
6991 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6992 Object *obedit = objects[ob_index];
7038 ot->
idname =
"CURVE_OT_tilt_clear";
7039 ot->
description =
"Clear the tilt of selected control points";
7098 for (
a = 0;
a < 3;
a++) {
7099 if (
size[
a] == 0.0f) {
7102 else if (
size[
a] > 0.0f &&
size[
a] < 0.00001f) {
7105 else if (
size[
a] < 0.0f &&
size[
a] > -0.00001f) {
7106 size[
a] = -0.00001f;
7124 ot->
name =
"Match Texture Space";
7125 ot->
idname =
"CURVE_OT_match_texture_space";
7126 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(const 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_knot_calc_v(struct Nurb *nu)
bool BKE_nurb_type_convert(struct Nurb *nu, short type, bool use_handles, const char **r_err_msg)
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)
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_nurbList_handles_set(struct ListBase *editnurb, char code)
void BKE_nurb_knot_calc_u(struct Nurb *nu)
void BKE_nurbList_free(struct ListBase *lb)
struct Nurb * BKE_curve_nurb_active_get(struct Curve *cu)
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)
void BKE_nurb_handle_calc(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, bool is_fcurve, char smoothing)
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, unsigned int resolu, float error_sq_max, unsigned int error_target_len)
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, bool calc_length, uint8_t flag)
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)
bool BKE_keyblock_is_basis(const struct Key *key, int index)
void BKE_keyblock_convert_to_curve(struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb)
struct KeyBlock * BKE_keyblock_from_object(struct Object *ob)
int BKE_keyblock_curve_element_count(const struct ListBase *nurb)
#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_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_)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghash_len(const GHash *gh) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_ptr_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC 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(const char *info) ATTR_MALLOC 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, 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], float angle)
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])
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])
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.
@ SCE_SNAP_MODE_FACE_RAYCAST
#define OBJECT_ADD_SIZE_MAXF
struct Base * ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Base *base, eDupli_ID_Flags dupflag)
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)
eSnapMode ED_transform_snap_object_project_view3d(struct SnapObjectContext *sctx, struct Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const eSnapMode snap_to, const struct SnapObjectParams *params, const float init_co[3], const float mval[2], const float prev_co[3], float *dist_px, float r_loc[3], float r_no[3])
SnapObjectContext * ED_transform_snap_object_context_create(struct Scene *scene, int flag)
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 Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
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()
@ OPTYPE_DEPENDS_ON_CURSOR
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
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)
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(struct ViewContext *vc, short sel, int dist_px, struct Nurb **r_nurb, struct BezTriple **r_bezt, struct BPoint **r_bp, short *r_handle, struct Base **r_base)
const Depsgraph * depsgraph
SyclQueue void void * src
SyclQueue void void size_t num_bytes void
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)
bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], const int dist_px, const bool vert_without_handles, const struct SelectPick_Params *params)
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)
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)
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 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)
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 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)
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)
int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3])
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)
@ CURVE_MERGE_ERR_RESOLUTION_ALL
@ CURVE_MERGE_ERR_FEW_SELECTION
@ CURVE_MERGE_ERR_RESOLUTION_SOME
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)
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(float color, float factor)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
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)
SymEdge< T > * prev(const SymEdge< T > *se)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
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
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
void WM_cursor_wait(bool val)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_flag_only_pass_through_on_press(int retval, const struct wmEvent *event)
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))