From 692891f69ea42af0ba890f5f92cbd1a3260442c9 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 31 May 2019 14:04:16 +0200 Subject: Fix sculpt mode drawing with modifiers still being wrong in some cases Centralize logic for when to use the PBVH for drawing, fix missing tests in mask drawing, fix missing tests for multiple windows, only do more expensive update for all viewports at end of the stroke. --- source/blender/blenkernel/BKE_paint.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/BKE_paint.h') diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 56c92b731b7..b92ce8a001f 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -54,6 +54,7 @@ struct SubdivCCG; struct Tex; struct ToolSettings; struct UnifiedPaintSettings; +struct View3D; struct ViewLayer; struct bContext; struct bToolRef; @@ -250,9 +251,6 @@ typedef struct SculptSession { float (*deform_cos)[3]; /* coords of deformed mesh but without stroke displacement */ float (*deform_imats)[3][3]; /* crazyspace deformation matrices */ - /* Partial redraw */ - bool partial_redraw; - /* Used to cache the render of the active texture */ unsigned int texcache_side, *texcache, texcache_actual; struct ImagePool *tex_pool; @@ -308,6 +306,8 @@ struct PBVH *BKE_sculpt_object_pbvh_ensure(struct Depsgraph *depsgraph, struct O void BKE_sculpt_bvh_update_from_ccg(struct PBVH *pbvh, struct SubdivCCG *subdiv_ccg); +bool BKE_sculptsession_use_pbvh_draw(const struct Object *ob, const struct View3D *v3d); + enum { SCULPT_MASK_LAYER_CALC_VERT = (1 << 0), SCULPT_MASK_LAYER_CALC_LOOP = (1 << 1), -- cgit v1.2.3