Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-25 04:48:08 +0300
committerHans Goudey <h.goudey@me.com>2022-03-25 04:48:08 +0300
commit6e72e3fdb295fdfd3e252bd48be96e2d832e43f2 (patch)
tree70e439dfb872a2bb6dc2be33163f5fa13f82c434 /source/blender/editors/sculpt_paint
parentd3999683ff5ac8b42de74cb453b459096f76f542 (diff)
Cleanup: Further renaming in new curves code
A follow-up to e253f9f66d6f. Follow the policy from T85728 completely (using "num" as a prefix) and rename another function.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_add.cc10
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_comb.cc2
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc10
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
index e444b3de2d5..809511d0106 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
@@ -174,8 +174,8 @@ struct AddOperationExecutor {
use_interpolation_ = interpolate_length_ || interpolate_shape_;
new_curve_length_ = curves_sculpt_->curve_length;
- tot_old_curves_ = curves_->num_curves();
- tot_old_points_ = curves_->num_points();
+ tot_old_curves_ = curves_->curves_num();
+ tot_old_points_ = curves_->points_num();
if (add_amount_ == 0) {
return;
@@ -216,8 +216,8 @@ struct AddOperationExecutor {
const int tot_added_curves = added_points.bary_coords.size();
const int tot_added_points = tot_added_curves * points_per_curve_;
- curves_->resize(curves_->num_points() + tot_added_points,
- curves_->num_curves() + tot_added_curves);
+ curves_->resize(curves_->points_num() + tot_added_points,
+ curves_->curves_num() + tot_added_curves);
threading::parallel_invoke([&]() { this->initialize_curve_offsets(tot_added_curves); },
[&]() { this->initialize_attributes(added_points); });
@@ -515,7 +515,7 @@ struct AddOperationExecutor {
void ensure_curve_roots_kdtree()
{
if (self_->curve_roots_kdtree_ == nullptr) {
- self_->curve_roots_kdtree_ = BLI_kdtree_3d_new(curves_->num_curves());
+ self_->curve_roots_kdtree_ = BLI_kdtree_3d_new(curves_->curves_num());
for (const int curve_i : curves_->curves_range()) {
const int root_point_i = curves_->offsets()[curve_i];
const float3 &root_pos_cu = curves_->positions()[root_point_i];
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc b/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc
index 16cb8c8c60c..d062fe32cfe 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_comb.cc
@@ -324,7 +324,7 @@ struct CombOperationExecutor {
void initialize_segment_lengths()
{
const Span<float3> positions_cu = curves_->positions();
- self_->segment_lengths_cu_.reinitialize(curves_->num_points());
+ self_->segment_lengths_cu_.reinitialize(curves_->points_num());
threading::parallel_for(curves_->curves_range(), 128, [&](const IndexRange range) {
for (const int curve_i : range) {
const IndexRange points = curves_->points_for_curve(curve_i);
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index 94d31e1985d..382f0529daa 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -304,7 +304,7 @@ class DensityAddOperation : public CurvesSculptStrokeOperation {
if (old_kdtree_ == nullptr && minimum_distance > 0.0f) {
old_kdtree_ = this->kdtree_from_curve_roots_and_positions(curves, curves.curves_range(), {});
- old_kdtree_size_ = curves.num_curves();
+ old_kdtree_size_ = curves.curves_num();
}
float density;
@@ -525,7 +525,7 @@ class DensityAddOperation : public CurvesSculptStrokeOperation {
{
Array<bool> elimination_mask(points.positions.size(), false);
- const int curves_added_previously = curves.num_curves() - old_kdtree_size_;
+ const int curves_added_previously = curves.curves_num() - old_kdtree_size_;
KDTree_3d *new_points_kdtree = this->kdtree_from_curve_roots_and_positions(
curves, IndexRange(old_kdtree_size_, curves_added_previously), points.positions);
@@ -589,14 +589,14 @@ class DensityAddOperation : public CurvesSculptStrokeOperation {
const int tot_new_curves = new_points.positions.size();
const int points_per_curve = 8;
- curves.resize(curves.num_points() + tot_new_curves * points_per_curve,
- curves.num_curves() + tot_new_curves);
+ curves.resize(curves.points_num() + tot_new_curves * points_per_curve,
+ curves.curves_num() + tot_new_curves);
MutableSpan<int> offsets = curves.offsets();
MutableSpan<float3> positions = curves.positions();
for (const int i : IndexRange(tot_new_curves)) {
- const int curve_i = curves.num_curves() - tot_new_curves + i;
+ const int curve_i = curves.curves_num() - tot_new_curves + i;
const int first_point_i = offsets[curve_i];
offsets[curve_i + 1] = offsets[curve_i] + points_per_curve;