diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_pbvh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_pbvh.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 692c935ae5f..1ef1c98ce83 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -110,7 +110,7 @@ PBVH *BKE_pbvh_new(void); * (which means it may rewrite it if needed, see #BKE_pbvh_vert_coords_apply(). */ void BKE_pbvh_build_mesh(PBVH *pbvh, - const struct Mesh *mesh, + struct Mesh *mesh, const struct MPoly *mpoly, const struct MLoop *mloop, struct MVert *verts, @@ -397,6 +397,7 @@ typedef struct PBVHVertexIter { /* mesh */ struct MVert *mverts; + float (*vert_normals)[3]; int totvert; const int *vert_indices; struct MPropCol *vcol; @@ -413,7 +414,7 @@ typedef struct PBVHVertexIter { struct MVert *mvert; struct BMVert *bm_vert; float *co; - short *no; + float *no; float *fno; float *mask; float *col; @@ -467,7 +468,7 @@ void pbvh_vertex_iter_init(PBVH *pbvh, PBVHNode *node, PBVHVertexIter *vi, int m BLI_assert(vi.visible); \ } \ vi.co = vi.mvert->co; \ - vi.no = vi.mvert->no; \ + vi.no = vi.vert_normals[vi.vert_indices[vi.gx]]; \ vi.index = vi.vert_indices[vi.i]; \ if (vi.vmask) { \ vi.mask = &vi.vmask[vi.index]; \ @@ -533,6 +534,7 @@ void BKE_pbvh_parallel_range_settings(struct TaskParallelSettings *settings, int totnode); struct MVert *BKE_pbvh_get_verts(const PBVH *pbvh); +const float (*BKE_pbvh_get_vert_normals(const PBVH *pbvh))[3]; PBVHColorBufferNode *BKE_pbvh_node_color_buffer_get(PBVHNode *node); void BKE_pbvh_node_color_buffer_free(PBVH *pbvh); |