Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-08-06 02:30:34 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-08-06 18:27:57 +0300
commit5f51438185915a2f45dd2c0ddf2a0773c6c39ffd (patch)
treef46bd2da11ba4d8973975c50b7c62497d2a3bbe0 /source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
parent56af04d31f6aeab518e7cdc41ea29be73d621948 (diff)
Cleanup: Paint Cursor Refactor
The paint_draw_cursor function was handling the cursor drawing for 2D and 3D views of all paint modes, calculating the brush radius, updating the SculptSession data and updating and drawing all sculpt cursor overlays for different tools. It was almost impossible to understand when and what was being drawn and in which state the GPU matrix was. Now everyting is organized into different functions, with clear separation between modes, sculpt tool overlays and different drawing setups. Update and drawing functions are also separated (this allows to skip one PBVH query on each cursor drawing). Reviewed By: sergey Differential Revision: https://developer.blender.org/D8206
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
index bc3f8537289..35f916c8f90 100644
--- a/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
+++ b/source/blender/editors/sculpt_paint/sculpt_multiplane_scrape.c
@@ -399,10 +399,15 @@ void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes,
}
void SCULPT_multiplane_scrape_preview_draw(const uint gpuattr,
+ Brush *brush,
SculptSession *ss,
const float outline_col[3],
const float outline_alpha)
{
+ if (!(brush->flag2 & BRUSH_MULTIPLANE_SCRAPE_PLANES_PREVIEW)) {
+ return;
+ }
+
float local_mat_inv[4][4];
invert_m4_m4(local_mat_inv, ss->cache->stroke_local_mat);
GPU_matrix_mul(local_mat_inv);