Curves: Add support for proportional editing #104620

Closed
Falk David wants to merge 15 commits from filedescriptor:curves-proportional-editing into blender-v3.5-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 4 additions and 2 deletions
Showing only changes of commit dc54a8328e - Show all commits

View File

@ -27,7 +27,7 @@ namespace blender::ed::transform::curves {
static void calculate_curve_point_distances_for_proportional_editing(
const Span<float3> positions, MutableSpan<float> r_distances)
{
Array<bool> visited(positions.size(), false);
Array<bool, 32> visited(positions.size(), false);
filedescriptor marked this conversation as resolved
Review

prop -> proportional? Curious what you think about that-- saving a few characters doesn't help so much here.

`prop` -> `proportional`? Curious what you think about that-- saving a few characters doesn't help so much here.
InplacePriorityQueue<float, std::less<float>> queue(r_distances);
while (!queue.is_empty()) {
@ -104,6 +104,7 @@ static void createTransCurvesVerts(bContext * /*C*/, TransInfo *t)
const VArray<bool> selection = curves.attributes().lookup_or_default<bool>(
".selection", ATTR_DOMAIN_POINT, true);
threading::parallel_for(curves.curves_range(), 512, [&](const IndexRange range) {
Vector<float> closest_distances;
for (const int curve_i : range) {
const IndexRange points = points_by_curve[curve_i];
const bool has_any_selected = ed::curves::has_anything_selected(selection, points);
@ -118,7 +119,8 @@ static void createTransCurvesVerts(bContext * /*C*/, TransInfo *t)
}
}
filedescriptor marked this conversation as resolved
Review

for (const int point_i : points) {

`for (const int point_i : points) {`
Array<float> closest_distances(points.size(), FLT_MAX);
closest_distances.reinitialize(points.size());
closest_distances.fill(std::numeric_limits<float>::max());
for (const int i : IndexRange(points.size())) {
const int point_i = points[i];