Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_boundary.c
| Show First 20 Lines • Show All 583 Lines • ▼ Show 20 Lines | |||||
| static void sculpt_boundary_slide_data_init(SculptSession *ss, SculptBoundary *boundary) | static void sculpt_boundary_slide_data_init(SculptSession *ss, SculptBoundary *boundary) | ||||
| { | { | ||||
| const int totvert = SCULPT_vertex_count_get(ss); | const int totvert = SCULPT_vertex_count_get(ss); | ||||
| boundary->slide.directions = MEM_calloc_arrayN(totvert, 3 * sizeof(float), "slide directions"); | boundary->slide.directions = MEM_calloc_arrayN(totvert, 3 * sizeof(float), "slide directions"); | ||||
| for (int i = 0; i < totvert; i++) { | for (int i = 0; i < totvert; i++) { | ||||
| if (boundary->edit_info[i].num_propagation_steps != boundary->max_propagation_steps) { | if (boundary->edit_info[i].num_propagation_steps != boundary->max_propagation_steps) { | ||||
| continue; | |||||
| } | } | ||||
| sub_v3_v3v3(boundary->slide.directions[boundary->edit_info[i].original_vertex], | sub_v3_v3v3(boundary->slide.directions[boundary->edit_info[i].original_vertex], | ||||
| SCULPT_vertex_co_get(ss, boundary->edit_info[i].original_vertex), | SCULPT_vertex_co_get(ss, boundary->edit_info[i].original_vertex), | ||||
| SCULPT_vertex_co_get(ss, i)); | SCULPT_vertex_co_get(ss, i)); | ||||
| normalize_v3(boundary->slide.directions[boundary->edit_info[i].original_vertex]); | normalize_v3(boundary->slide.directions[boundary->edit_info[i].original_vertex]); | ||||
| } | } | ||||
| for (int i = 0; i < totvert; i++) { | for (int i = 0; i < totvert; i++) { | ||||
| ▲ Show 20 Lines • Show All 467 Lines • Show Last 20 Lines | |||||