Fix #143420: Grease Pencil: Handle empty result in dash modifier
The dash modifier creates final result by combining filtered/processed and unfiltered strokes, but this result could be empty. The code assumes valid joined geometry when it's sometimes not the case. This patch did a null check and it worked as it should. Pull Request: https://projects.blender.org/blender/blender/pulls/143424
This commit is contained in:
@@ -358,7 +358,12 @@ static void modify_drawing(const GreasePencilDashModifierData &dmd,
|
||||
bke::GeometrySet unselected_geo = bke::GeometrySet::from_curves(unselected_curves_id);
|
||||
bke::GeometrySet joined_geo = geometry::join_geometries({unselected_geo, masked_geo}, {});
|
||||
|
||||
drawing.strokes_for_write() = std::move(joined_geo.get_curves_for_write()->geometry.wrap());
|
||||
if (joined_geo.has_curves()) {
|
||||
drawing.strokes_for_write() = {};
|
||||
}
|
||||
else {
|
||||
drawing.strokes_for_write() = std::move(joined_geo.get_curves_for_write()->geometry.wrap());
|
||||
}
|
||||
drawing.tag_topology_changed();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user