diff options
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh_intern.h')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_intern.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index a4ac2744a73..b848327b7a9 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -123,6 +123,11 @@ struct PBVHNode { /* Used to store the brush color during a stroke and composite it over the original color */ PBVHColorBufferNode color_buffer; PBVHPixelsNode pixels; + + /* Used to flash colors of updated node bounding boxes in + * debug draw mode (when G.debug_value / bpy.app.debug_value is 889). + */ + int debug_draw_gen; }; typedef enum { PBVH_DYNTOPO_SMOOTH_SHADING = 1 } PBVHFlags; @@ -130,7 +135,7 @@ typedef enum { PBVH_DYNTOPO_SMOOTH_SHADING = 1 } PBVHFlags; typedef struct PBVHBMeshLog PBVHBMeshLog; struct PBVH { - PBVHType type; + struct PBVHPublic header; PBVHFlags flags; PBVHNode *nodes; @@ -144,12 +149,15 @@ struct PBVH { int leaf_limit; /* Mesh data */ - const struct Mesh *mesh; + struct Mesh *mesh; /* NOTE: Normals are not `const` because they can be updated for drawing by sculpt code. */ float (*vert_normals)[3]; + bool *hide_vert; struct MVert *verts; const struct MPoly *mpoly; + /** Material indices. Only valid for polygon meshes. */ + const int *material_indices; const struct MLoop *mloop; const struct MLoopTri *looptri; CustomData *vdata; @@ -183,7 +191,6 @@ struct PBVH { bool respect_hide; /* Dynamic topology */ - BMesh *bm; float bm_max_edge_len; float bm_min_edge_len; int cd_vert_node_offset; @@ -265,7 +272,7 @@ bool pbvh_bmesh_node_raycast(PBVHNode *node, struct IsectRayPrecalc *isect_precalc, float *dist, bool use_original, - int *r_active_vertex_index, + PBVHVertRef *r_active_vertex, float *r_face_normal); bool pbvh_bmesh_node_nearest_to_ray(PBVHNode *node, const float ray_start[3], |