Fix: GPv3: Wrong cursor radius for Tint tool and Weight Paint tools
Fix: GPv3: Wrong cursor radius for Tint tool and Weight Paint tools The brush cursor size (the circle in the viewport) of the Tint tool and the Weight Paint tools didn't match the brush radius, because: - The radius unit `Scene` calculation was also applied to the Tint tool brush, while it's only relevant for Draw brushes. - The Weight Paint tools use unified paint settings and the Draw tool doesn't any more since #122886, causing a mismatch in cursor size. In this PR the cursor size is fixed. Pull Request: https://projects.blender.org/blender/blender/pulls/124100
This commit is contained in:
parent
477897c5c1
commit
e9da9a90bb
@ -1538,7 +1538,7 @@ static void grease_pencil_brush_cursor_draw(PaintCursorContext *pcontext)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((brush->flag & BRUSH_LOCK_SIZE) != 0) {
|
||||
if (brush->gpencil_tool == GPAINT_TOOL_DRAW && (brush->flag & BRUSH_LOCK_SIZE) != 0) {
|
||||
const bke::greasepencil::Layer *layer = grease_pencil->get_active_layer();
|
||||
const ed::greasepencil::DrawingPlacement placement(
|
||||
*pcontext->scene, *pcontext->region, *pcontext->vc.v3d, *object, layer);
|
||||
@ -1574,9 +1574,6 @@ static void grease_pencil_brush_cursor_draw(PaintCursorContext *pcontext)
|
||||
color = scale * float3(paint->paint_cursor_col);
|
||||
}
|
||||
}
|
||||
else if (pcontext->mode == PaintMode::WeightGPencil) {
|
||||
copy_v3_v3(color, brush->add_col);
|
||||
}
|
||||
|
||||
GPU_line_width(1.0f);
|
||||
/* Inner Ring: Color from UI panel */
|
||||
@ -1592,8 +1589,7 @@ static void grease_pencil_brush_cursor_draw(PaintCursorContext *pcontext)
|
||||
static void paint_draw_2D_view_brush_cursor(PaintCursorContext *pcontext)
|
||||
{
|
||||
switch (pcontext->mode) {
|
||||
case PaintMode::GPencil:
|
||||
case PaintMode::WeightGPencil: {
|
||||
case PaintMode::GPencil: {
|
||||
grease_pencil_brush_cursor_draw(pcontext);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user