44static bool check_counts(
const int neighbor_count,
const int boundary_vertex_count)
48 if (neighbor_count <= 2) {
54 if (boundary_vertex_count > 2) {
71 const int initial_vert)
73 if (!hide_vert.
is_empty() && hide_vert[initial_vert]) {
77 int neighbor_count = 0;
78 int boundary_vertex_count = 0;
82 faces, corner_verts, vert_to_face, hide_poly, initial_vert, neighbors))
84 if (hide_vert.
is_empty() || !hide_vert[neighbor]) {
87 boundary_vertex_count++;
92 return check_counts(neighbor_count, boundary_vertex_count);
111 int neighbor_count = 0;
112 int boundary_vertex_count = 0;
117 boundary_vertex_count++;
122 return check_counts(neighbor_count, boundary_vertex_count);
131 int neighbor_count = 0;
132 int boundary_vertex_count = 0;
139 boundary_vertex_count++;
144 return check_counts(neighbor_count, boundary_vertex_count);
160 const int initial_vert,
170 const float3 initial_vert_position = vert_positions[initial_vert];
171 const float radius_sq = radius * radius;
173 std::optional<int> boundary_initial_vert;
174 int boundary_initial_vert_steps = std::numeric_limits<int>::max();
177 flood_fill.execute(
object, vert_to_face, [&](
int from_v,
int to_v) {
178 if (!hide_vert.
is_empty() && hide_vert[from_v]) {
182 floodfill_steps[to_v] = floodfill_steps[from_v] + 1;
185 if (floodfill_steps[to_v] < boundary_initial_vert_steps) {
186 boundary_initial_vert_steps = floodfill_steps[to_v];
187 boundary_initial_vert = to_v;
192 return len_sq < radius_sq;
195 return boundary_initial_vert;
217 const float3 initial_vert_position = positions[initial_vert.
to_index(key)];
218 const float radius_sq = radius * radius;
220 int boundary_initial_vert_steps = std::numeric_limits<int>::max();
222 std::optional<SubdivCCGCoord> boundary_initial_vert;
226 const int to_v_index = to_v.
to_index(key);
227 const int from_v_index = from_v.
to_index(key);
234 floodfill_steps[to_v_index] = floodfill_steps[from_v_index];
237 floodfill_steps[to_v_index] = floodfill_steps[from_v_index] + 1;
241 if (floodfill_steps[to_v_index] < boundary_initial_vert_steps) {
242 boundary_initial_vert_steps = floodfill_steps[to_v_index];
243 boundary_initial_vert = to_v;
249 return len_sq < radius_sq;
252 return boundary_initial_vert;
261 return &initial_vert;
268 const float3 initial_vert_position = initial_vert.
co;
269 const float radius_sq = radius * radius;
271 int boundary_initial_vert_steps = std::numeric_limits<int>::max();
273 std::optional<BMVert *> boundary_initial_vert;
283 floodfill_steps[to_v_i] = floodfill_steps[from_v_i] + 1;
286 if (floodfill_steps[to_v_i] < boundary_initial_vert_steps) {
287 boundary_initial_vert_steps = floodfill_steps[to_v_i];
288 boundary_initial_vert = to_v;
293 return len_sq < radius_sq;
296 return boundary_initial_vert;
318 included_verts.
add(new_index);
332 const int initial_boundary_vert,
339 flood_fill.add_initial(initial_boundary_vert);
341 flood_fill.execute(
object, vert_to_face, [&](
const int from_v,
const int to_v) {
342 const float3 from_v_co = vert_positions[from_v];
343 const float3 to_v_co = vert_positions[to_v];
348 const float edge_len =
len_v3v3(from_v_co, to_v_co);
349 const float distance_boundary_to_dst =
boundary.distance.lookup_default(from_v, 0.0f) +
352 boundary.edges.append({from_v_co, to_v_co});
354 faces, corner_verts, vert_to_face, hide_vert, hide_poly, boundary_verts, to_v);
370 const int initial_boundary_index = initial_vert.
to_index(key);
379 const int from_v_i = from_v.
to_index(key);
380 const int to_v_i = to_v.
to_index(key);
382 const float3 &from_v_co = positions[from_v_i];
383 const float3 &to_v_co = positions[to_v_i];
388 const float edge_len =
len_v3v3(from_v_co, to_v_co);
389 const float distance_boundary_to_dst =
boundary.distance.lookup_default(from_v_i, 0.0f) +
393 boundary.edges.append({from_v_co, to_v_co});
396 faces, corner_verts, subdiv_ccg, boundary_verts, to_v);
402 BMVert &initial_boundary_vert,
411 flood_fill.add_initial(&initial_boundary_vert);
417 const float3 from_v_co = from_v->
co;
423 const float edge_len =
len_v3v3(from_v_co, to_v_co);
424 const float distance_boundary_to_dst =
boundary.distance.lookup_default(from_v_i, 0.0f) +
427 boundary.edges.append({from_v_co, to_v_co});
438#define BOUNDARY_VERTEX_NONE -1
439#define BOUNDARY_STEPS_NONE -1
453 const int initial_vert_i,
462 std::queue<int> current_iteration;
464 for (
const int i :
boundary.verts.index_range()) {
468 boundary.edit_info.original_vertex_i[index] = index;
469 boundary.edit_info.propagation_steps_num[index] = 0;
471 current_iteration.push(vert);
474 int propagation_steps_num = 0;
475 float accum_distance = 0.0f;
477 std::queue<int> next_iteration;
482 if (accum_distance > radius || current_iteration.empty()) {
483 boundary.max_propagation_steps = propagation_steps_num;
487 while (!current_iteration.empty()) {
488 const int from_v = current_iteration.front();
489 current_iteration.pop();
493 faces, corner_verts, vert_to_face, hide_poly, from_v, neighbors))
495 if ((!hide_vert.
is_empty() && hide_vert[from_v]) ||
501 boundary.edit_info.original_vertex_i[neighbor] =
502 boundary.edit_info.original_vertex_i[from_v];
504 boundary.edit_info.propagation_steps_num[neighbor] =
505 boundary.edit_info.propagation_steps_num[from_v] + 1;
507 next_iteration.push(neighbor);
511 if (
boundary.edit_info.original_vertex_i[from_v] == initial_vert_i) {
512 boundary.pivot_position = vert_positions[neighbor];
519 while (!next_iteration.empty()) {
520 const int next_v = next_iteration.front();
521 next_iteration.pop();
522 current_iteration.push(next_v);
525 propagation_steps_num++;
530 const int initial_vert_i,
541 std::queue<SubdivCCGCoord> current_iteration;
543 for (
const int i :
boundary.verts.index_range()) {
548 boundary.edit_info.original_vertex_i[index] = index;
549 boundary.edit_info.propagation_steps_num[index] = 0;
554 boundary.edit_info.original_vertex_i[neighbor.to_index(key)] = index;
557 current_iteration.push(vert);
560 int propagation_steps_num = 0;
561 float accum_distance = 0.0f;
563 std::queue<SubdivCCGCoord> next_iteration;
568 if (accum_distance > radius || current_iteration.empty()) {
569 boundary.max_propagation_steps = propagation_steps_num;
573 while (!current_iteration.empty()) {
575 current_iteration.pop();
577 const int from_v_i = from_v.
to_index(key);
583 const int neighbor_idx = neighbor.to_index(key);
587 subdiv_ccg.
grid_hidden[neighbor.grid_index][index_in_grid];
593 boundary.edit_info.original_vertex_i[neighbor_idx] =
594 boundary.edit_info.original_vertex_i[from_v_i];
596 boundary.edit_info.propagation_steps_num[neighbor_idx] =
597 boundary.edit_info.propagation_steps_num[from_v_i];
601 const int neighbor_idx = neighbor.to_index(key);
605 subdiv_ccg.
grid_hidden[neighbor.grid_index][index_in_grid];
611 boundary.edit_info.original_vertex_i[neighbor_idx] =
612 boundary.edit_info.original_vertex_i[from_v_i];
614 boundary.edit_info.propagation_steps_num[neighbor_idx] =
615 boundary.edit_info.propagation_steps_num[from_v_i] + 1;
617 next_iteration.push(neighbor);
628 const int neighbor_duplicate_index = coord.to_index(key);
629 boundary.edit_info.original_vertex_i[neighbor_duplicate_index] =
630 boundary.edit_info.original_vertex_i[from_v_i];
631 boundary.edit_info.propagation_steps_num[neighbor_duplicate_index] =
632 boundary.edit_info.propagation_steps_num[from_v_i] + 1;
637 if (
boundary.edit_info.original_vertex_i[from_v_i] == initial_vert_i) {
638 boundary.pivot_position = positions[neighbor_idx];
645 while (!next_iteration.empty()) {
647 next_iteration.pop();
648 current_iteration.push(next_v);
651 propagation_steps_num++;
656 const int initial_vert_i,
666 std::queue<BMVert *> current_iteration;
668 for (
const int i :
boundary.verts.index_range()) {
672 boundary.edit_info.original_vertex_i[index] = index;
673 boundary.edit_info.propagation_steps_num[index] = 0;
677 current_iteration.push(vert);
680 int propagation_steps_num = 0;
681 float accum_distance = 0.0f;
683 std::queue<BMVert *> next_iteration;
688 if (accum_distance > radius || current_iteration.empty()) {
689 boundary.max_propagation_steps = propagation_steps_num;
693 while (!current_iteration.empty()) {
694 BMVert *from_v = current_iteration.front();
695 current_iteration.pop();
707 boundary.edit_info.original_vertex_i[neighbor_idx] =
708 boundary.edit_info.original_vertex_i[from_v_i];
710 boundary.edit_info.propagation_steps_num[neighbor_idx] =
711 boundary.edit_info.propagation_steps_num[from_v_i] + 1;
713 next_iteration.push(neighbor);
717 if (
boundary.edit_info.original_vertex_i[from_v_i] == initial_vert_i) {
718 boundary.pivot_position = neighbor->co;
725 while (!next_iteration.empty()) {
726 BMVert *next_v = next_iteration.front();
727 next_iteration.pop();
728 current_iteration.push(next_v);
731 propagation_steps_num++;
752 boundary.edit_info.propagation_steps_num.size());
754 boundary.edit_info.strength_factor.size());
756 const int num_elements =
boundary.edit_info.strength_factor.size();
762 if (
boundary.edit_info.propagation_steps_num[
i] !=
boundary.max_propagation_steps) {
766 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
768 const float3 normal = vert_normals[
i];
769 const float3 dir = vert_positions[orig_vert_i] - vert_positions[
i];
771 boundary.bend.pivot_positions[orig_vert_i] = vert_positions[
i];
778 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
781 boundary.bend.pivot_rotation_axis[
i] =
boundary.bend.pivot_rotation_axis[orig_vert_i];
788 boundary.edit_info.propagation_steps_num.size());
790 boundary.edit_info.strength_factor.size());
792 const int num_elements =
boundary.edit_info.strength_factor.size();
801 if (
boundary.edit_info.propagation_steps_num[
i] !=
boundary.max_propagation_steps) {
805 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
808 const float3 dir = positions[orig_vert_i] - positions[
i];
810 boundary.bend.pivot_positions[orig_vert_i] = positions[
i];
817 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
820 boundary.bend.pivot_rotation_axis[
i] =
boundary.bend.pivot_rotation_axis[orig_vert_i];
827 boundary.edit_info.propagation_steps_num.size());
829 boundary.edit_info.strength_factor.size());
831 const int num_elements =
boundary.edit_info.strength_factor.size();
837 if (
boundary.edit_info.propagation_steps_num[
i] !=
boundary.max_propagation_steps) {
842 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
855 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
857 boundary.bend.pivot_rotation_axis[
i] =
boundary.bend.pivot_rotation_axis[orig_vert_i];
864 boundary.edit_info.propagation_steps_num.size());
866 boundary.edit_info.strength_factor.size());
868 const int num_elements =
boundary.edit_info.strength_factor.size();
872 if (
boundary.edit_info.propagation_steps_num[
i] !=
boundary.max_propagation_steps) {
875 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
892 boundary.edit_info.propagation_steps_num.size());
894 boundary.edit_info.strength_factor.size());
896 const int num_elements =
boundary.edit_info.strength_factor.size();
902 if (
boundary.edit_info.propagation_steps_num[
i] !=
boundary.max_propagation_steps) {
905 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
923 boundary.edit_info.propagation_steps_num.size());
925 boundary.edit_info.strength_factor.size());
927 const int num_elements =
boundary.edit_info.strength_factor.size();
931 if (
boundary.edit_info.propagation_steps_num[
i] !=
boundary.max_propagation_steps) {
935 const int orig_vert_i =
boundary.edit_info.original_vertex_i[
i];
953 for (
const float3 &position : positions) {
954 boundary.twist.pivot_position += position;
981 positions[
i] = vert->
co;
1091 float3 from_pivot_to_pos = positions[
i] - pivot_positions[
i];
1094 new_positions[
i] = rotated + pivot_positions[
i];
1107 const float3 symmetry_pivot,
1108 const float strength,
1166 const float3 symmetry_pivot,
1167 const float strength,
1181 subdiv_ccg, vert_factors, grids, tls.
factors);
1196 subdiv_ccg, vert_pivot_axes, grids, tls.
pivot_axes);
1217 cache.
cloth_sim->deformation_pos.as_mutable_span());
1231 const float3 symmetry_pivot,
1232 const float strength,
1264 calc_bend_position(orig_positions, pivot_positions, pivot_axes, factors, new_positions);
1289 const float strength,
1293 switch (pbvh.
type()) {
1304 boundary.edit_info.propagation_steps_num,
1305 boundary.edit_info.strength_factor,
1319 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
1329 boundary.edit_info.propagation_steps_num,
1330 boundary.edit_info.strength_factor,
1350 boundary.edit_info.propagation_steps_num,
1351 boundary.edit_info.strength_factor,
1384 new_positions[
i] = positions[
i] + (directions[
i] * factors[
i]);
1396 const float3 symmetry_pivot,
1397 const float strength,
1454 const float3 symmetry_pivot,
1455 const float strength,
1469 subdiv_ccg, vert_factors, grids, tls.
factors);
1504 cache.
cloth_sim->deformation_pos.as_mutable_span());
1517 const float3 symmetry_pivot,
1518 const float strength,
1574 const float strength,
1578 switch (pbvh.
type()) {
1589 boundary.edit_info.propagation_steps_num,
1590 boundary.edit_info.strength_factor,
1603 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
1613 boundary.edit_info.propagation_steps_num,
1614 boundary.edit_info.strength_factor,
1633 boundary.edit_info.propagation_steps_num,
1634 boundary.edit_info.strength_factor,
1666 new_positions[
i] = positions[
i] + (
normals[
i] * factors[
i]);
1677 const float3 symmetry_pivot,
1678 const float strength,
1730 const float3 symmetry_pivot,
1731 const float strength,
1745 subdiv_ccg, vert_factors, grids, tls.
factors);
1776 cache.
cloth_sim->deformation_pos.as_mutable_span());
1788 const float3 symmetry_pivot,
1789 const float strength,
1842 const float strength,
1846 switch (pbvh.
type()) {
1857 boundary.edit_info.propagation_steps_num,
1858 boundary.edit_info.strength_factor,
1870 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
1880 boundary.edit_info.propagation_steps_num,
1881 boundary.edit_info.strength_factor,
1899 boundary.edit_info.propagation_steps_num,
1900 boundary.edit_info.strength_factor,
1930 new_positions[
i] = positions[
i] + (grab_delta * factors[
i]);
1941 const float3 grab_delta_symmetry,
1942 const float3 symmetry_pivot,
1943 const float strength,
1995 const float3 grab_delta_symmetry,
1996 const float3 symmetry_pivot,
1997 const float strength,
2011 subdiv_ccg, vert_factors, grids, tls.
factors);
2042 cache.
cloth_sim->deformation_pos.as_mutable_span());
2054 const float3 grab_delta_symmetry,
2055 const float3 symmetry_pivot,
2056 const float strength,
2109 const float strength,
2114 switch (pbvh.
type()) {
2125 boundary.edit_info.propagation_steps_num,
2126 boundary.edit_info.strength_factor,
2139 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
2149 boundary.edit_info.propagation_steps_num,
2150 boundary.edit_info.strength_factor,
2169 boundary.edit_info.propagation_steps_num,
2170 boundary.edit_info.strength_factor,
2193 const float3 pivot_point,
2213 const float3 twist_pivot_position,
2215 const float3 symmetry_pivot,
2216 const float strength,
2243 orig_data.
positions, twist_pivot_position, twist_axis, factors, new_positions);
2267 const float3 twist_pivot_position,
2271 const float3 symmetry_pivot,
2272 const float strength,
2286 subdiv_ccg, vert_factors, grids, tls.
factors);
2301 orig_data.
positions, twist_pivot_position, twist_axis, factors, new_positions);
2318 cache.
cloth_sim->deformation_pos.as_mutable_span());
2328 const float3 twist_pivot_position,
2332 const float3 symmetry_pivot,
2333 const float strength,
2361 calc_twist_position(orig_positions, twist_pivot_position, twist_axis, factors, new_positions);
2386 const float strength,
2390 switch (pbvh.
type()) {
2401 boundary.edit_info.propagation_steps_num,
2402 boundary.edit_info.strength_factor,
2416 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
2426 boundary.edit_info.propagation_steps_num,
2427 boundary.edit_info.strength_factor,
2447 boundary.edit_info.propagation_steps_num,
2448 boundary.edit_info.strength_factor,
2481 const float3 to_smooth = average_position[
i] - positions[
i];
2482 new_positions[
i] = positions[
i] + (to_smooth * factors[
i]);
2499 average_positions[
i] =
float3(0.0f);
2500 int valid_neighbors = 0;
2501 for (
const int neighbor : neighbors[
i]) {
2502 if (propagation_steps[
i] == vert_propagation_steps[neighbor]) {
2503 average_positions[
i] += vert_positions[neighbor];
2508 if (valid_neighbors == 0) {
2525 average_positions[
i] =
float3(0.0f);
2526 int valid_neighbors = 0;
2527 for (
BMVert *neighbor : neighbors[
i]) {
2529 if (propagation_steps[
i] == vert_propagation_steps[neighbor_idx]) {
2530 average_positions[
i] += neighbor->co;
2535 if (valid_neighbors == 0) {
2551 const float3 symmetry_pivot,
2552 const float strength,
2586 vert_propagation_steps,
2619 const float3 symmetry_pivot,
2620 const float strength,
2634 subdiv_ccg, vert_factors, grids, tls.
factors);
2650 vert_propagation_steps,
2676 cache.
cloth_sim->deformation_pos.as_mutable_span());
2687 const float3 symmetry_pivot,
2688 const float strength,
2718 vert_propagation_steps, neighbors, propagation_steps, factors, average_positions);
2747 const float strength,
2751 switch (pbvh.
type()) {
2771 boundary.edit_info.propagation_steps_num,
2772 boundary.edit_info.strength_factor,
2784 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
2793 boundary.edit_info.propagation_steps_num,
2794 boundary.edit_info.strength_factor,
2811 boundary.edit_info.propagation_steps_num,
2812 boundary.edit_info.strength_factor,
2847 const float boundary_distance =
boundary.distance.lookup_default(index, 0.0f);
2848 float falloff_distance = 0.0f;
2849 float direction = 1.0f;
2853 falloff_distance = boundary_distance;
2856 const int div = boundary_distance / radius;
2857 const float mod =
fmodf(boundary_distance, radius);
2858 falloff_distance = div % 2 == 0 ?
mod : radius -
mod;
2862 const int div = boundary_distance / radius;
2863 const float mod =
fmodf(boundary_distance, radius);
2864 falloff_distance = div % 2 == 0 ?
mod : radius -
mod;
2866 if (((div - 1) & 2) == 0) {
2877 return {falloff_distance, direction};
2890 boundary.edit_info.propagation_steps_num.size());
2892 boundary.edit_info.strength_factor.size());
2894 const int num_elements =
boundary.edit_info.strength_factor.size();
2899 const float mask_factor =
mask.is_empty() ? 1.0f : 1.0f -
mask[
i];
2900 boundary.edit_info.strength_factor[
i] = mask_factor *
2903 boundary.edit_info.propagation_steps_num[
i],
2916 if (!use_boundary_distances) {
2925 &brush, falloff_distance, radius);
2935 boundary.edit_info.propagation_steps_num.size());
2937 boundary.edit_info.strength_factor.size());
2946 const float mask_factor = subdiv_ccg.
masks.
is_empty() ? 1.0f :
2947 1.0f - subdiv_ccg.
masks[index];
2948 boundary.edit_info.strength_factor[index] =
2950 boundary.edit_info.propagation_steps_num[index],
2954 if (
boundary.edit_info.original_vertex_i[index] ==
boundary.initial_vert_i) {
2963 if (!use_boundary_distances) {
2971 boundary.edit_info.strength_factor[index] *= direction *
2973 &brush, falloff_distance, radius);
2984 boundary.edit_info.propagation_steps_num.size());
2986 boundary.edit_info.strength_factor.size());
2988 const int num_elements =
boundary.edit_info.strength_factor.size();
2997 const float mask_factor = mask_offset == -1 ? 1.0f :
3000 boundary.edit_info.strength_factor[
i] = mask_factor *
3003 boundary.edit_info.propagation_steps_num[
i],
3016 if (!use_boundary_distances) {
3025 &brush, falloff_distance, radius);
3037 const Mesh &
mesh = *
static_cast<const Mesh *
>(
object.data);
3046 if (std::holds_alternative<std::monostate>(initial_vert_ref)) {
3050 std::optional<int> initial_vert;
3052 initial_vert = std::get<int>(initial_vert_ref);
3055 float3 location =
symmetry_flip(positions_eval[std::get<int>(initial_vert_ref)], symm_area);
3060 if (!initial_vert) {
3101 if (std::holds_alternative<std::monostate>(initial_vert_ref)) {
3105 std::optional<SubdivCCGCoord> initial_vert;
3110 const int active_vert = std::get<int>(initial_vert_ref);
3116 if (!initial_vert) {
3156 if (std::holds_alternative<std::monostate>(initial_vert_ref)) {
3160 std::optional<BMVert *> initial_vert;
3162 initial_vert = std::get<BMVert *>(initial_vert_ref);
3165 BMVert *active_vert = std::get<BMVert *>(initial_vert_ref);
3170 if (!initial_vert) {
3212 angle_factor =
floorf(angle_factor * 10) / 10.0f;
3214 return angle_factor *
M_PI;
3229 angle_factor =
floorf(angle_factor * 10) / 10.0f;
3231 return angle_factor *
M_PI;
3252 switch (pbvh.
type()) {
3339 const int initial_vert,
3347 switch (pbvh.
type()) {
3369 const int initial_vert,
3396 if (!boundary_initial_vert) {
3416 std::unique_ptr<SculptBoundary>
boundary = std::make_unique<SculptBoundary>();
3419 const int boundary_initial_vert_index = *boundary_initial_vert;
3420 boundary->initial_vert_i = boundary_initial_vert_index;
3421 boundary->initial_vert_position = positions_eval[boundary_initial_vert_index];
3431 *boundary_initial_vert,
3434 const float boundary_radius = brush ? radius * (1.0f + brush->
boundary_offset) : radius;
3441 boundary_initial_vert_index,
3467 if (!boundary_initial_vert) {
3479 std::unique_ptr<SculptBoundary>
boundary = std::make_unique<SculptBoundary>();
3483 const int boundary_initial_vert_index = boundary_vert.
to_index(key);
3484 boundary->initial_vert_i = boundary_initial_vert_index;
3485 boundary->initial_vert_position = positions[boundary_initial_vert_index];
3490 const float boundary_radius = brush ? radius * (1.0f + brush->
boundary_offset) : radius;
3507 object, ss.
bm, *initial_vert, radius);
3509 if (!boundary_initial_vert) {
3519 std::unique_ptr<SculptBoundary>
boundary = std::make_unique<SculptBoundary>();
3522 const int boundary_initial_vert_index =
BM_elem_index_get(*boundary_initial_vert);
3523 boundary->initial_vert_i = boundary_initial_vert_index;
3524 boundary->initial_vert_position = (*boundary_initial_vert)->co;
3528 const float boundary_radius = brush ? radius * (1.0f + brush->
boundary_offset) : radius;
3550 if (std::holds_alternative<std::monostate>(initial_vert)) {
3556 std::unique_ptr<SculptBoundary>
boundary =
nullptr;
3557 switch (pbvh.
type()) {
3576 std::unique_ptr<SculptBoundaryPreview> preview = std::make_unique<SculptBoundaryPreview>();
3578 preview->pivot_position =
boundary->pivot_position;
3579 preview->initial_vert_position =
boundary->initial_vert_position;
3586 const float outline_col[3],
3587 const float outline_alpha)
float BKE_brush_curve_strength(eBrushCurvePreset preset, const CurveMapping *cumap, float distance, float brush_radius)
int CCG_grid_xy_to_index(const int grid_size, const int x, const int y)
int CustomData_get_offset_named(const CustomData *data, eCustomDataType type, blender::StringRef name)
std::variant< std::monostate, int, BMVert * > ActiveVert
const Brush * BKE_paint_brush_for_read(const Paint *paint)
A BVH for high poly meshes.
const blender::Set< BMVert *, 0 > & BKE_pbvh_bmesh_node_unique_verts(blender::bke::pbvh::BMeshNode *node)
CCGKey BKE_subdiv_ccg_key_top_level(const SubdivCCG &subdiv_ccg)
void BKE_subdiv_ccg_neighbor_coords_get(const SubdivCCG &subdiv_ccg, const SubdivCCGCoord &coord, bool include_duplicates, SubdivCCGNeighbors &r_neighbors)
#define BLI_assert_unreachable()
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
float dist_signed_to_plane_v3(const float p[3], const float plane[4])
void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], float angle)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
@ BRUSH_DEFORM_TARGET_CLOTH_SIM
@ BRUSH_DEFORM_TARGET_GEOMETRY
@ BRUSH_BOUNDARY_DEFORM_GRAB
@ BRUSH_BOUNDARY_DEFORM_TWIST
@ BRUSH_BOUNDARY_DEFORM_BEND
@ BRUSH_BOUNDARY_DEFORM_EXPAND
@ BRUSH_BOUNDARY_DEFORM_INFLATE
@ BRUSH_BOUNDARY_DEFORM_SMOOTH
@ BRUSH_BOUNDARY_FALLOFF_CONSTANT
@ BRUSH_BOUNDARY_FALLOFF_LOOP
@ BRUSH_BOUNDARY_FALLOFF_LOOP_INVERT
@ BRUSH_BOUNDARY_FALLOFF_RADIUS
Object is a sort of wrapper for general info.
void GPU_line_width(float width)
#define BM_ELEM_CD_GET_FLOAT(ele, offset)
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
int BM_mesh_elem_count(BMesh *bm, const char htype)
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
BPy_StructRNA * depsgraph
MutableSpan< T > as_mutable_span()
IndexRange index_range() const
constexpr int64_t size() const
constexpr Span< T > as_span() const
constexpr IndexRange index_range() const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
GAttributeReader lookup(const StringRef attribute_id) const
void tag_positions_changed(const IndexMask &node_mask)
Span< NodeT > nodes() const
void flush_bounds_to_parents()
void foreach_index(Fn &&fn) const
static float normals[][3]
VecBase< float, D > constexpr mod(VecOp< float, D >, VecOp< float, D >) RET
float distance(VecOp< float, D >, VecOp< float, D >) RET
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, int64_t grain_size=4096)
IndexRange grid_range(const int grid_area, const int grid)
pbvh::Tree * pbvh_get(Object &object)
void update_node_bounds_bmesh(BMeshNode &node)
void update_node_bounds_mesh(Span< float3 > positions, MeshNode &node)
Span< float3 > vert_normals_eval(const Depsgraph &depsgraph, const Object &object_orig)
void update_node_bounds_grids(int grid_area, Span< float3 > positions, GridsNode &node)
Span< float3 > vert_positions_eval(const Depsgraph &depsgraph, const Object &object_orig)
void calc_vert_factors(const Depsgraph &depsgraph, const Object &object, const Cache &automasking, const bke::pbvh::MeshNode &node, Span< int > verts, MutableSpan< float > factors)
void calc_grids_factors(const Depsgraph &depsgraph, const Object &object, const Cache &automasking, const bke::pbvh::GridsNode &node, Span< int > grids, MutableSpan< float > factors)
static void slide_data_init_bmesh(BMesh *bm, SculptBoundary &boundary)
static BLI_NOINLINE void calc_inflate_position(const Span< float3 > positions, const Span< float3 > normals, const Span< float > factors, const MutableSpan< float3 > new_positions)
static void slide_data_init_grids(const SubdivCCG &subdiv_ccg, SculptBoundary &boundary)
static void twist_data_init_grids(const SubdivCCG &subdiv_ccg, SculptBoundary &boundary)
static void calc_slide_bmesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const Span< float3 > vert_slide_directions, bke::pbvh::BMeshNode &node, LocalDataBMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static BLI_NOINLINE void calc_slide_position(const Span< float3 > positions, const Span< float3 > directions, const Span< float > factors, const MutableSpan< float3 > new_positions)
static void calc_twist_bmesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const float3 twist_pivot_position, const float3 twist_axis, bke::pbvh::BMeshNode &node, LocalDataBMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static std::optional< SubdivCCGCoord > get_closest_boundary_vert_grids(Object &object, const OffsetIndices< int > faces, const Span< int > corner_verts, const SubdivCCG &subdiv_ccg, const BitSpan boundary, const SubdivCCGCoord initial_vert, const float radius)
void pivot_line_preview_draw(const uint gpuattr, SculptSession &ss)
static void indices_init_bmesh(Object &object, BMesh *bm, BMVert &initial_boundary_vert, SculptBoundary &boundary)
static void init_boundary_grids(Object &object, const Brush &brush, const ePaintSymmetryFlags symm_area)
static void edit_data_init_grids(const SubdivCCG &subdiv_ccg, const int initial_vert_i, const float radius, SculptBoundary &boundary)
static BLI_NOINLINE void calc_average_position(const Span< float3 > vert_positions, const Span< int > vert_propagation_steps, const GroupedSpan< int > neighbors, const Span< int > propagation_steps, const MutableSpan< float > factors, const MutableSpan< float3 > average_positions)
static void calc_twist_mesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const bke::pbvh::MeshNode &node, LocalDataMesh &tls, const float3 twist_pivot_position, const float3 twist_axis, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target, const PositionDeformData &position_data)
static void calc_inflate_mesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const bke::pbvh::MeshNode &node, LocalDataMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target, const PositionDeformData &position_data)
static bool is_vert_in_editable_boundary_mesh(const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_vert, const Span< bool > hide_poly, const BitSpan boundary, const int initial_vert)
std::unique_ptr< SculptBoundary > data_init_bmesh(Object &object, const Brush *brush, BMVert *initial_vert, const float radius)
static void init_falloff_bmesh(BMesh *bm, const Brush &brush, const float radius, SculptBoundary &boundary)
static bool check_counts(const int neighbor_count, const int boundary_vertex_count)
std::unique_ptr< SculptBoundaryPreview > preview_data_init(const Depsgraph &depsgraph, Object &object, const Brush *brush, const float radius)
static void calc_bend_mesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const Span< float3 > vert_pivot_positions, const Span< float3 > vert_pivot_axes, const bke::pbvh::MeshNode &node, LocalDataMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target, const PositionDeformData &position_data)
static void indices_init_mesh(Object &object, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_vert, const Span< bool > hide_poly, const BitSpan boundary_verts, const Span< float3 > vert_positions, const int initial_boundary_vert, SculptBoundary &boundary)
static void calc_smooth_bmesh(const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, bke::pbvh::BMeshNode &node, LocalDataBMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static void twist_data_init_bmesh(BMesh *bm, SculptBoundary &boundary)
static BLI_NOINLINE void calc_smooth_position(const Span< float3 > positions, const Span< float3 > average_position, const Span< float > factors, const MutableSpan< float3 > new_positions)
static float get_mesh_strength(const SculptSession &ss, const Brush &brush)
static void calc_smooth_grids(const Sculpt &sd, Object &object, SubdivCCG &subdiv_ccg, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const bke::pbvh::GridsNode &node, LocalDataGrids &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static void calc_slide_mesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const Span< float3 > vert_slide_directions, const bke::pbvh::MeshNode &node, LocalDataMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target, const PositionDeformData &position_data)
static void do_slide_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask, const SculptBoundary &boundary, const float strength, const eBrushDeformTarget deform_target)
static void init_boundary_mesh(const Depsgraph &depsgraph, Object &object, const Brush &brush, const ePaintSymmetryFlags symm_area)
static BLI_NOINLINE void calc_twist_position(const Span< float3 > positions, const float3 pivot_point, const float3 pivot_axis, const Span< float > factors, const MutableSpan< float3 > new_positions)
static void bend_data_init_grids(const SubdivCCG &subdiv_ccg, SculptBoundary &boundary)
static void calc_bend_grids(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, SubdivCCG &subdiv_ccg, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const Span< float3 > vert_pivot_positions, const Span< float3 > vert_pivot_axes, const bke::pbvh::GridsNode &node, LocalDataGrids &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static bool is_vert_in_editable_boundary_bmesh(BMVert &initial_vert)
static void init_boundary_bmesh(Object &object, const Brush &brush, const ePaintSymmetryFlags symm_area)
static BLI_NOINLINE void calc_bend_position(const Span< float3 > positions, const Span< float3 > pivot_positions, const Span< float3 > pivot_axes, const Span< float > factors, const MutableSpan< float3 > new_positions)
static BLI_NOINLINE void filter_uninitialized_verts(const Span< int > propagation_steps, const MutableSpan< float > factors)
static void bend_data_init_mesh(const Span< float3 > vert_positions, const Span< float3 > vert_normals, SculptBoundary &boundary)
static void edit_data_init_bmesh(BMesh *bm, const int initial_vert_i, const float radius, SculptBoundary &boundary)
static void calc_inflate_grids(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, SubdivCCG &subdiv_ccg, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const bke::pbvh::GridsNode &node, LocalDataGrids &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static void populate_twist_data(const Span< float3 > positions, SculptBoundary &boundary)
static std::pair< float, float > calc_boundary_falloff(const SculptBoundary &boundary, const Brush &brush, const float radius, const int index)
static void twist_data_init_mesh(const Span< float3 > vert_positions, SculptBoundary &boundary)
static void calc_grab_bmesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, bke::pbvh::BMeshNode &node, LocalDataBMesh &tls, const float3 grab_delta_symmetry, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
std::unique_ptr< SculptBoundary > data_init(const Depsgraph &depsgraph, Object &object, const Brush *brush, const int initial_vert, const float radius)
bool vert_is_boundary(const GroupedSpan< int > vert_to_face_map, const Span< bool > hide_poly, const BitSpan boundary, const int vert)
static void do_grab_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask, const SculptBoundary &boundary, const float strength, const eBrushDeformTarget deform_target)
static void do_bend_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask, const SculptBoundary &boundary, const float strength, const eBrushDeformTarget deform_target)
static void calc_grab_mesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const bke::pbvh::MeshNode &node, LocalDataMesh &tls, const float3 grab_delta_symmetry, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target, const PositionDeformData &position_data)
void edges_preview_draw(const uint gpuattr, SculptSession &ss, const float outline_col[3], const float outline_alpha)
static bool is_vert_in_editable_boundary_grids(const OffsetIndices< int > faces, const Span< int > corner_verts, const SubdivCCG &subdiv_ccg, const BitSpan boundary, const SubdivCCGCoord initial_vert)
static float displacement_from_grab_delta_get(const SculptSession &ss, const SculptBoundary &boundary)
static void calc_twist_grids(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, SubdivCCG &subdiv_ccg, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const float3 twist_pivot_position, const float3 twist_axis, const bke::pbvh::GridsNode &node, LocalDataGrids &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static std::optional< BMVert * > get_closest_boundary_vert_bmesh(Object &object, BMesh *bm, BMVert &initial_vert, const float radius)
std::unique_ptr< SculptBoundary > data_init_mesh(const Depsgraph &depsgraph, Object &object, const Brush *brush, const int initial_vert, const float radius)
static void bend_data_init_bmesh(BMesh *bm, SculptBoundary &boundary)
static void calc_inflate_bmesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, bke::pbvh::BMeshNode &node, LocalDataBMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static void calc_bend_bmesh(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const Span< float3 > vert_pivot_positions, const Span< float3 > vert_pivot_axes, bke::pbvh::BMeshNode &node, LocalDataBMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static void calc_grab_grids(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, SubdivCCG &subdiv_ccg, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const bke::pbvh::GridsNode &node, LocalDataGrids &tls, const float3 grab_delta_symmetry, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
void do_boundary_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask)
static void calc_smooth_mesh(const Sculpt &sd, Object &object, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_poly, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const bke::pbvh::MeshNode &node, LocalDataMesh &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target, const PositionDeformData &position_data)
static void edit_data_init_mesh(OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, Span< float3 > vert_positions, Span< bool > hide_vert, Span< bool > hide_poly, const int initial_vert_i, const float radius, SculptBoundary &boundary)
constexpr int BOUNDARY_INDICES_BLOCK_SIZE
static void do_inflate_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask, const SculptBoundary &boundary, const float strength, const eBrushDeformTarget deform_target)
static void calc_slide_grids(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, SubdivCCG &subdiv_ccg, const Span< int > vert_propagation_steps, const Span< float > vert_factors, const Span< float3 > vert_slide_directions, const bke::pbvh::GridsNode &node, LocalDataGrids &tls, const float3 symmetry_pivot, const float strength, const eBrushDeformTarget deform_target)
static void do_twist_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask, const SculptBoundary &boundary, const float strength, const eBrushDeformTarget deform_target)
void ensure_boundary_info(Object &object)
static void init_falloff_mesh(const Span< float > mask, const Brush &brush, const float radius, SculptBoundary &boundary)
static void init_falloff_grids(const SubdivCCG &subdiv_ccg, const Brush &brush, const float radius, SculptBoundary &boundary)
static void do_smooth_brush(const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const IndexMask &node_mask, const SculptBoundary &boundary, const float strength, const eBrushDeformTarget deform_target)
static void add_index(SculptBoundary &boundary, const int new_index, const float distance, Set< int, BOUNDARY_INDICES_BLOCK_SIZE > &included_verts)
static void indices_init_grids(Object &object, const OffsetIndices< int > faces, const Span< int > corner_verts, const SubdivCCG &subdiv_ccg, const BitSpan boundary_verts, const SubdivCCGCoord initial_vert, SculptBoundary &boundary)
static std::optional< int > get_closest_boundary_vert_mesh(Object &object, const GroupedSpan< int > vert_to_face, const Span< float3 > vert_positions, const Span< bool > hide_vert, const Span< bool > hide_poly, const BitSpan boundary, const int initial_vert, const float radius)
static BLI_NOINLINE void calc_grab_position(const Span< float3 > positions, const float3 grab_delta, const Span< float > factors, const MutableSpan< float3 > new_positions)
std::unique_ptr< SculptBoundary > data_init_grids(Object &object, const Brush *brush, const SubdivCCGCoord initial_vert, const float radius)
static void slide_data_init_mesh(const Span< float3 > vert_positions, SculptBoundary &boundary)
MutableSpan< float3 > gather_grids_positions(const SubdivCCG &subdiv_ccg, const Span< int > grids, Vector< float3 > &positions)
void scatter_data_bmesh(Span< T > node_data, const Set< BMVert *, 0 > &verts, MutableSpan< T > dst)
void gather_bmesh_positions(const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions)
void gather_data_grids(const SubdivCCG &subdiv_ccg, Span< T > src, Span< int > grids, MutableSpan< T > node_data)
void vert_random_access_ensure(Object &object)
std::optional< int > nearest_vert_calc_mesh(const bke::pbvh::Tree &pbvh, const Span< float3 > vert_positions, const Span< bool > hide_vert, const float3 &location, const float max_distance, const bool use_original)
GroupedSpan< int > calc_vert_neighbors(OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, Span< bool > hide_poly, Span< int > verts, Vector< int > &r_offset_data, Vector< int > &r_data)
Vector< BMVert *, 64 > BMeshNeighborVerts
void gather_data_bmesh(Span< T > src, const Set< BMVert *, 0 > &verts, MutableSpan< T > node_data)
float3 symmetry_flip(const float3 &src, const ePaintSymmetryFlags symm)
void orig_position_data_gather_bmesh(const BMLog &bm_log, const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions, MutableSpan< float3 > normals)
void filter_verts_outside_symmetry_area(Span< float3 > positions, const float3 &pivot, ePaintSymmetryFlags symm, MutableSpan< float > factors)
void scale_factors(MutableSpan< float > factors, float strength)
void translations_from_new_positions(Span< float3 > new_positions, Span< int > verts, Span< float3 > old_positions, MutableSpan< float3 > translations)
void clip_and_lock_translations(const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, Span< int > verts, MutableSpan< float3 > translations)
void scatter_data_mesh(Span< T > src, Span< int > indices, MutableSpan< T > dst)
Span< BMVert * > vert_neighbors_get_bmesh(BMVert &vert, BMeshNeighborVerts &r_neighbors)
void apply_translations(Span< float3 > translations, Span< int > verts, MutableSpan< float3 > positions)
OrigPositionData orig_position_data_get_mesh(const Object &object, const bke::pbvh::MeshNode &node)
void gather_data_mesh(Span< T > src, Span< int > indices, MutableSpan< T > dst)
OrigPositionData orig_position_data_get_grids(const Object &object, const bke::pbvh::GridsNode &node)
std::optional< BMVert * > nearest_vert_calc_bmesh(const bke::pbvh::Tree &pbvh, const float3 &location, const float max_distance, const bool use_original)
std::optional< SubdivCCGCoord > nearest_vert_calc_grids(const bke::pbvh::Tree &pbvh, const SubdivCCG &subdiv_ccg, const float3 &location, const float max_distance, const bool use_original)
Span< int > vert_neighbors_get_mesh(const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_poly, const int vert, Vector< int > &r_neighbors)
void scatter_data_grids(const SubdivCCG &subdiv_ccg, Span< T > node_data, Span< int > grids, MutableSpan< T > dst)
T distance(const T &a, const T &b)
AxisSigned cross(const AxisSigned a, const AxisSigned b)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
T distance_squared(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
float3 rotate_around_axis(const float3 &vector, const float3 ¢er, const float3 &axis, float angle)
VecBase< float, 4 > float4
VecBase< float, 3 > float3
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(const blender::ed::sculpt_paint::StrokeCache &cache)
ePaintSymmetryFlags SCULPT_mesh_symmetry_xyz_get(const Object &object)
#define BOUNDARY_STEPS_NONE
#define BOUNDARY_VERTEX_NONE
struct CurveMapping * curve
int boundary_falloff_type
struct SculptSession * sculpt
blender::ed::sculpt_paint::StrokeCache * cache
SculptVertexInfo vertex_info
std::unique_ptr< SculptBoundaryPreview > boundary_preview
ActiveVert active_vert() const
blender::BitVector boundary
int to_index(const CCGKey &key) const
static SubdivCCGCoord from_index(const CCGKey &key, int index)
SubdivCCGNeighborCoords coords
blender::Span< SubdivCCGCoord > duplicates() const
blender::Span< SubdivCCGCoord > unique() const
blender::Array< blender::float3 > normals
blender::BitGroupVector grid_hidden
blender::Array< float > masks
blender::Array< blender::float3 > positions
Span< int > grids() const
Span< int > verts() const
std::unique_ptr< auto_mask::Cache > automasking
float3 initial_location_symm
ePaintSymmetryFlags mirror_symmetry_pass
std::unique_ptr< cloth::SimulationData > cloth_sim
std::array< std::unique_ptr< boundary::SculptBoundary >, PAINT_SYMM_AREAS > boundaries
Vector< float3 > translations
Vector< float3 > average_positions
Vector< float3 > pivot_positions
Vector< float3 > new_positions
Vector< float3 > pivot_axes
Vector< float3 > positions
Vector< BMVert * > neighbor_data
Vector< float3 > slide_directions
Vector< int > neighbor_offsets
Vector< int > propagation_steps
Vector< int > neighbor_data
Vector< float3 > average_positions
Vector< float3 > slide_directions
Vector< float3 > positions
Vector< int > propagation_steps
Vector< float3 > pivot_axes
Vector< float3 > translations
Vector< float3 > new_positions
Vector< int > neighbor_offsets
Vector< float3 > pivot_positions
Vector< float3 > new_positions
Vector< float3 > translations
Vector< float3 > positions
Vector< float3 > average_positions
Vector< int > neighbor_data
Vector< float3 > pivot_positions
Vector< int > neighbor_offsets
Vector< int > propagation_steps
Vector< float3 > slide_directions
Vector< float3 > pivot_axes
IndexRange index_range() const