I made an attempt to improve the comment 🙂
Sorry I keep bothering you 😺 A small thing about the threaded looping over drawings_
.
A grain size of 128 on drawings isn't very useful (who has more than 128 layers or selected keyframes?). I'd say it's better to have something like you had before:
I would still say it's far more efficient to do the computation of screen space positions only once, in on_stroke_begin
. The tint tool is deliberately slow (due to the 'attenuate factor') to give the user fine control over the tinting. It means that the on_stroke_extended
while be fired often. So: a drawing of 500 points, 20 times on_stroke_extended
-> already 10.000 screen space calculations. It adds up pretty quickly.
This block should be outside the for (const int curve_point...)
loop. Now it is doing the same inside-the-curve check for every point of that curve. That's a bit inefficient 😉 And it has an odd side effect: curves with many points would tint much faster than curves with only a few points...
Still the case in latest main.
When I look at the code, I see that there is a use_vertex_color_fill
[commented out](https://projects.blender.org/blender/blender/src/commit/58eab5e3be99d505e44555…
You are really on fire, I see a lot of great PRs from your hand – very nice!