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>2021-06-22 19:32:50 +0300
committerHans Goudey <h.goudey@me.com>2021-06-22 19:32:50 +0300
commitf3eecfe386098cf0a18df7ff4d8ffda9a43e9495 (patch)
tree52a9429269c803ae3a4f0bb8a6c235850c12f124 /source/blender/nodes
parent026de343e3528fe2b2f8d8daba7fa2fd4b807337 (diff)
Cleanup: Refactor spline copying functions
Make the virtual functions protected and simpler, so that the logic is better contained in the base class's implementation. Also introduce a `copy_without_attributes` method to be used for realizing instances.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc
index fdb01fa07cf..3de2604cd0a 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc
@@ -329,7 +329,7 @@ static SplinePtr subdivide_spline(const Spline &spline,
* point facilitates subdividing in parallel later. */
Array<int> offsets = get_subdivided_offsets(spline, cuts, spline_offset);
const int result_size = offsets.last() + int(!spline.is_cyclic());
- SplinePtr new_spline = spline.copy_settings();
+ SplinePtr new_spline = spline.copy_only_settings();
new_spline->resize(result_size);
subdivide_builtin_attributes(spline, offsets, *new_spline);
subdivide_dynamic_attributes(spline, offsets, *new_spline);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
index 910adc467d6..b1da2dcd3c4 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
@@ -120,7 +120,7 @@ static void copy_dynamic_attributes(const CustomDataAttributes &src,
static SplinePtr spline_delete(const Spline &spline, const IndexMask mask)
{
- SplinePtr new_spline = spline.copy_settings();
+ SplinePtr new_spline = spline.copy_only_settings();
new_spline->resize(mask.size());
spline_copy_builtin_attributes(spline, *new_spline, mask);