Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mask/mask_add.c
| Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | if (point_index < 0) { | ||||
| point_index += spline->tot_point; /* wrap index */ | point_index += spline->tot_point; /* wrap index */ | ||||
| if ((spline->flag & MASK_SPLINE_CYCLIC) == 0) { | if ((spline->flag & MASK_SPLINE_CYCLIC) == 0) { | ||||
| do_cyclic_correct = true; | do_cyclic_correct = true; | ||||
| point_index = 0; | point_index = 0; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| // print_v2("", tangent_point); | #if 0 | ||||
| // printf("%d\n", point_index); | print_v2("", tangent_point); | ||||
| printf("%d\n", point_index); | |||||
| #endif | |||||
| mask_spline_add_point_at_index(spline, point_index); | mask_spline_add_point_at_index(spline, point_index); | ||||
| if (do_cyclic_correct) { | if (do_cyclic_correct) { | ||||
| ref_point = &spline->points[point_index + 1]; | ref_point = &spline->points[point_index + 1]; | ||||
| new_point = &spline->points[point_index]; | new_point = &spline->points[point_index]; | ||||
| *ref_point = *new_point; | *ref_point = *new_point; | ||||
| memset(new_point, 0, sizeof(*new_point)); | memset(new_point, 0, sizeof(*new_point)); | ||||
| ▲ Show 20 Lines • Show All 516 Lines • Show Last 20 Lines | |||||