52 if ((
flag != ((1 << 0) | (1 << 1) | (1 << 2))) && (
flag & (1 << 1))) {
54 flag = (1 << 0) | (1 << 1) | (1 << 2);
64#define SEL_F1 (1 << 0)
65#define SEL_F2 (1 << 1)
66#define SEL_F3 (1 << 2)
72 int data_len_all_pt = 0;
83 Curve *cu =
static_cast<Curve *
>(tc->obedit->data);
88 int count = 0, countsel = 0;
89 int count_pt = 0, countsel_pt = 0;
100 for (a = 0, bezt = nu->bezt; a < nu->pntsu; a++, bezt++) {
101 if (bezt->
hide == 0) {
123 for (a = nu->pntsu * nu->pntsv, bp = nu->bp; a > 0; a--, bp++) {
140 if (((is_prop_edit && !is_prop_connected) ?
count : countsel) == 0) {
148 tc->data_len =
count;
149 data_len_pt = count_pt;
152 tc->data_len = countsel;
153 data_len_pt = countsel_pt;
158 data_len_all_pt += data_len_pt;
165 if (tc->data_len == 0) {
169 Curve *cu =
static_cast<Curve *
>(tc->obedit->data);
176 float mtx[3][3], smtx[3][3];
178 copy_m3_m4(mtx, tc->obedit->object_to_world().ptr());
186 bool has_any_selected =
false;
188 for (a = 0, bezt = nu->bezt; a < nu->pntsu; a++, bezt++) {
189 if (bezt->
hide == 0) {
194 float normal[3], plane[3];
204 has_any_selected |= bezt_tx != 0;
206 if (is_prop_edit || bezt_tx &
SEL_F1) {
245 if (is_prop_edit || bezt_tx &
SEL_F2) {
275 if ((bezt_tx &
SEL_F1) == 0 && (bezt_tx &
SEL_F3) == 0) {
277 if (hdata ==
nullptr) {
286 if (is_prop_edit || bezt_tx &
SEL_F3) {
312 if (hdata ==
nullptr) {
332 for (a = nu->pntsu * nu->pntsv, bp = nu->bp; a > 0; a--, bp++) {
334 if (is_prop_edit || (bp->
f1 &
SELECT)) {
340 has_any_selected |=
true;
359 if (nu->pntsv == 1) {
360 float normal[3], plane[3];
375 if (is_prop_edit && head != tail) {
377 if (is_prop_connected && has_any_selected) {
382 for (td = head; td <= tail; td++) {
411 Curve *cu =
static_cast<Curve *
>(tc->obedit->data);
@ NURB_HANDLE_TEST_KNOT_OR_EACH
@ NURB_HANDLE_TEST_KNOT_ONLY
void BKE_nurb_handles_calc(Nurb *nu)
void BKE_nurb_bpoint_calc_plane(Nurb *nu, BPoint *bp, float r_plane[3])
short BKE_nurb_bezt_handle_test_calc_flag(const BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode)
void BKE_nurb_handles_test(Nurb *nu, eNurbHandleTest_Mode handle_mode, bool use_around_local)
void BKE_curve_dimension_update(Curve *cu)
ListBase * BKE_curve_editNurbs_get(Curve *cu)
void BKE_nurb_bezt_calc_normal(Nurb *nu, BezTriple *bezt, float r_normal[3])
void BKE_nurb_bpoint_calc_normal(Nurb *nu, BPoint *bp, float r_normal[3])
void BKE_nurb_bezt_calc_plane(Nurb *nu, BezTriple *bezt, float r_plane[3])
#define LISTBASE_FOREACH(type, var, list)
void pseudoinverse_m3_m3(float inverse[3][3], const float mat[3][3], float epsilon)
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
#define PSEUDOINVERSE_EPSILON
MINLINE void copy_v3_v3(float r[3], const float a[3])
void DEG_id_tag_update(ID *id, unsigned int flags)
@ V3D_AROUND_LOCAL_ORIGINS
Read Guarded memory(de)allocation.
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
bool shape_key_report_if_locked(const Object *obedit, ReportList *reports)