OK I cleaned this up to use ensure_no_bezier_curves
I now std::move(curves)
to the drawing after conversion, so should be alright now.
Sure, yeah, except for
for_write
which doesn't really make sense in this context.for_write
is meant for functions that give mutable access to a shared resource.
Then I guess just…
Like this:
const bke::CurvesGeometry src_curves = modifier::modifier::greasepencil::convert_to_poly_curves(drawing.strokes());
Ah ok so no need to have a &
when getting the…
Maybe naming it ensure_poly_curves_for_write()
make it more clear on what it does? 🤔
I see. What I wanted to do there is to have the function convert curves to poly and write it to src_curves_for_write
when it needs to, and also return that same thing so at the places where…