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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user