Sietse Brouwer SietseB
  • Joined on 2023-02-08
Sietse Brouwer commented on pull request blender/blender#119302 2024-03-13 19:49:52 +01:00
GPv3: Create weights on draw for new strokes.

Nitpick: Capital N.

Sietse Brouwer commented on pull request blender/blender#119302 2024-03-13 19:49:51 +01:00
GPv3: Create weights on draw for new strokes.

reinterpret_cast<GreasePencilArmatureModifierData *>(md)

Sietse Brouwer commented on pull request blender/blender#119302 2024-03-13 19:49:50 +01:00
GPv3: Create weights on draw for new strokes.

Here and below: NULL -> nullptr

Sietse Brouwer commented on pull request blender/blender#119302 2024-03-13 19:49:49 +01:00
GPv3: Create weights on draw for new strokes.

Any reason to switch here from IndexRange to IndexMask? Ignore my question when there is 🔕

Sietse Brouwer commented on pull request blender/blender#119302 2024-03-13 19:49:48 +01:00
GPv3: Create weights on draw for new strokes.

In case there is no vertex group:

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-13 11:57:50 +01:00
GPv3: Tint tool

I'm sorry, you're right! I bothered you with wrong comments! It's confusing, because there are 3 falloff curves at play here: brush->gpencil_settings->curve_sensitivity, must be applied to the…

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 16:49:22 +01:00
GPv3: Tint tool

A few remarks on brush falloff, among others.

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 16:49:21 +01:00
GPv3: Tint tool

Nitpick: /* Tint only on the drawings of the active layer. */

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 16:49:20 +01:00
GPv3: Tint tool

BKE_brush_curve_strength is using brush->curve for the falloff and that is not the curve you want. So here you have to use something like BKE_curvemapping_evaluateF(brush->gpencil_settings->curve_strength, 0.0f, distance / radius). But avoid division by zero, of course.

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 16:49:19 +01:00
GPv3: Tint tool

.premultiply_alpha() returns the new color, it isn't changing the existing one. So this statement is doing nothing at the moment.

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 16:49:18 +01:00
GPv3: Tint tool

The brush falloff should only be used once (see below), when you calculate the influence.

Sietse Brouwer commented on pull request blender/blender#118347 2024-03-12 12:26:02 +01:00
GPv3: Weight Paint tools (Draw, Blur, Average, Smear, Sample weight)

And override it is ☺️

Sietse Brouwer pushed to gpv3-weight-paint-tools at SietseB/blender 2024-03-12 12:24:13 +01:00
74366cc2c4 Cleanup: Class methods from 'final' to 'override'
4d0ee3bc72 Merge branch 'main' into gpv3-weight-paint-tools
6a016ce255 Cleanup: Remove unnecessary check
24f7074c6c Merge branch 'blender-v4.1-release'
6e29b4ffcf Merge branch 'blender-v4.1-release'
Compare 175 commits »
Sietse Brouwer pushed to gpv3-weight-paint-tools at SietseB/blender 2024-03-12 11:43:52 +01:00
68a8885ad0 Cleanup: Mark override methods as 'final'
Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 00:05:38 +01:00
GPv3: Tint tool

I know it's only a WIP, but I couldn't help noticing a few things ;-)

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 00:05:37 +01:00
GPv3: Tint tool

Perhaps we should discuss this? I would say this has to take the multi frame editing settings into account. For that, you could use retrieve_editable_drawings_from_layer() and apply execute_tint_on_drawing to all drawings in the returned vector. Now only the current frame is affected.

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 00:05:36 +01:00
GPv3: Tint tool

Should be outside the if block.

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 00:05:36 +01:00
GPv3: Tint tool

In curves code this is commonly used:

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 00:05:35 +01:00
GPv3: Tint tool

For performance/efficiency, perhaps an idea to move this to TintOperation::on_stroke_begin? That's possible, because the curve positions stay the same during the tint operation.

Sietse Brouwer commented on pull request blender/blender#119323 2024-03-12 00:05:34 +01:00
GPv3: Tint tool

this->strength = BKE_brush_alpha_get(scene, brush);