mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
fa007002b1
commit
272178d001
1 changed files with 6 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue