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>2019-09-30 16:56:12 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-09-30 16:58:03 +0300
commite8f6f70846e57be81d5d4e28556f7a12d291f5db (patch)
treed86a3780a58439f185e580b16372faa5a3b427c4 /source/blender/blenkernel/BKE_pbvh.h
parent3dc027add3976557e120a1afdb58e80628ae32b0 (diff)
PBVH: PBVH_FullyMasked and PBVH_FullyUnmasked flags
This commit introduces flags to tag the PBVH nodes as fully masked or unmasked. This is used in do_brush_actions to filter fully masked nodes during a stroke. Other tools can also be updated to use this flags. Sculpt updates now require a flag to update the mask or the vertex coordinates. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5935
Diffstat (limited to 'source/blender/blenkernel/BKE_pbvh.h')
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 426f81d889a..0d3b00cf927 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -50,18 +50,21 @@ typedef struct {
} PBVHProxyNode;
typedef enum {
- PBVH_Leaf = 1,
+ PBVH_Leaf = 1 << 0,
- PBVH_UpdateNormals = 2,
- PBVH_UpdateBB = 4,
- PBVH_UpdateOriginalBB = 8,
- PBVH_UpdateDrawBuffers = 16,
- PBVH_UpdateRedraw = 32,
+ PBVH_UpdateNormals = 1 << 1,
+ PBVH_UpdateBB = 1 << 2,
+ PBVH_UpdateOriginalBB = 1 << 3,
+ PBVH_UpdateDrawBuffers = 1 << 4,
+ PBVH_UpdateRedraw = 1 << 5,
+ PBVH_UpdateMask = 1 << 6,
- PBVH_RebuildDrawBuffers = 64,
- PBVH_FullyHidden = 128,
+ PBVH_RebuildDrawBuffers = 1 << 7,
+ PBVH_FullyHidden = 1 << 8,
+ PBVH_FullyMasked = 1 << 9,
+ PBVH_FullyUnmasked = 1 << 10,
- PBVH_UpdateTopology = 256,
+ PBVH_UpdateTopology = 1 << 11,
} PBVHNodeFlags;
typedef struct PBVHFrustumPlanes {
@@ -229,11 +232,16 @@ bool BKE_pbvh_bmesh_update_topology(PBVH *bvh,
/* Node Access */
void BKE_pbvh_node_mark_update(PBVHNode *node);
+void BKE_pbvh_node_mark_update_mask(PBVHNode *node);
void BKE_pbvh_node_mark_rebuild_draw(PBVHNode *node);
void BKE_pbvh_node_mark_redraw(PBVHNode *node);
void BKE_pbvh_node_mark_normals_update(PBVHNode *node);
void BKE_pbvh_node_mark_topology_update(PBVHNode *node);
void BKE_pbvh_node_fully_hidden_set(PBVHNode *node, int fully_hidden);
+void BKE_pbvh_node_fully_masked_set(PBVHNode *node, int fully_masked);
+bool BKE_pbvh_node_fully_masked_get(PBVHNode *node);
+void BKE_pbvh_node_fully_unmasked_set(PBVHNode *node, int fully_masked);
+bool BKE_pbvh_node_fully_unmasked_get(PBVHNode *node);
void BKE_pbvh_node_get_grids(PBVH *bvh,
PBVHNode *node,
@@ -267,6 +275,7 @@ void BKE_pbvh_bmesh_after_stroke(PBVH *bvh);
/* Update Bounding Box/Redraw and clear flags */
void BKE_pbvh_update_bounds(PBVH *bvh, int flags);
+void BKE_pbvh_update_vertex_data(PBVH *bvh, int flags);
void BKE_pbvh_update_normals(PBVH *bvh, struct SubdivCCG *subdiv_ccg);
void BKE_pbvh_redraw_BB(PBVH *bvh, float bb_min[3], float bb_max[3]);
void BKE_pbvh_get_grid_updates(PBVH *bvh, bool clear, void ***r_gridfaces, int *r_totface);