Page MenuHome

Fix paint cursor drawing asserts
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 18 2019, 12:31 PM.

Details

Summary

The new paint cursor (introduced in rBe0c792135adf) mixed 3d and 2d
drawing leading to asserts [e.g. when tablet pressure sensitivity was
enabled for size, see D5820 also].

We could get away with always drawing in 3D [using vertformat with
comp_len 3 / GPU_SHADER_3D_UNIFORM_COLOR / imm_draw_circle_wire_3d],
even if in the Image Editor, but this patch clearly separates what is
drawn in 3d and what is in 2d.

part of T69957

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested changes to this revision.Sep 19 2019, 12:32 PM

Code is much more readable! just some small remarks.

source/blender/editors/sculpt_paint/paint_cursor.c
1236

clang format

projection painting implementation is 2D we should add this one also. Better add
add a static bool paint_use_2d_cursor(ePaintMode) function to hide these details.

This revision now requires changes to proceed.Sep 19 2019, 12:32 PM

split out paint_use_2d_cursor()

  • not sure even if _all_ modes except sculpt should return true here?
This revision is now accepted and ready to land.Sep 20 2019, 11:38 AM
This revision was automatically updated to reflect the committed changes.