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-10-19 21:39:23 +0300
committerHans Goudey <h.goudey@me.com>2022-10-19 21:39:23 +0300
commitd046c8c9d756d5a22ed9aa5a8d0bf0b69d9deba6 (patch)
treeddfa4064e3f5df977059a62d4535eec3b1648e37 /source/blender/blenkernel/intern/curves_geometry.cc
parent193b456d2db87ac578a4dae25d654454ea0c03a0 (diff)
Fix T101926: Curves: Remove type-specific attributes when deleting
Remove NURBS or Bezier specific attributes after removing points or curves. In theory we could avoid copying those attributes in the first place, but that doesn't seem worth the extra complexity here, since we don't necessarily know the result curve type counts before copying attributes.
Diffstat (limited to 'source/blender/blenkernel/intern/curves_geometry.cc')
-rw-r--r--source/blender/blenkernel/intern/curves_geometry.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc
index d65c31139fc..7c338480c71 100644
--- a/source/blender/blenkernel/intern/curves_geometry.cc
+++ b/source/blender/blenkernel/intern/curves_geometry.cc
@@ -1224,6 +1224,10 @@ static CurvesGeometry copy_with_removed_points(const CurvesGeometry &curves,
attribute.dst.finish();
}
+ if (new_curves.curves_num() != curves.curves_num()) {
+ new_curves.remove_attributes_based_on_types();
+ }
+
return new_curves;
}
@@ -1329,6 +1333,8 @@ static CurvesGeometry copy_with_removed_curves(const CurvesGeometry &curves,
attribute.dst.finish();
}
+ new_curves.remove_attributes_based_on_types();
+
return new_curves;
}