Use MEM_new
and MEM_delete
for LineartModifierRuntime
.
Use a pointer here to avoid making a copy of the Set
.
While it's nice to use IndexMask
where possible, it does feel like this adds lots of unnecessary complexity here..
It seems like just iterating over the bezier curves and updating them in a…
The patch has a formatting issue right now (see the failed lint
check). Can you run make format
?
https://developer.blender.org/docs/handbook/tooling/clangformat/
Looks more ok now, got a few smaller comments.
Better also use a Set
here for potentially much better performance in scenes with many objects.
Think it would be nice to add a GreasePencilLineartModifierRuntime
struct to lineart_intern.hh
and have it as void *runtime
field here.
Calling contains
on a span is inefficient here. Better use a Set
instead of a Span
so that this check can be O(1).
Should specify whether the Object pointers are for original or evaluated data-blocks.
Can you provide a simple test .blend file that shows the bug?
Right now it's only instantiated for different kinds of inputs. But it's not impossible to also instantiate for different kinds of outputs if that ever becomes necessary.
I think it's perfectly fine to do that right now to avoid all the boilerplate. We could potentially investigate optimizations that avoid the computation of unnecessary outputs if necessary.
Looks pretty good and works well in my test with the supported nodes.