diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-27 20:05:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-27 20:05:46 +0300 |
commit | cc8c064f11060dc7157d49282f769d49d30b9439 (patch) | |
tree | e7af5bb1e6b21241983a4bfa727c8a9638f92334 /source/blender/blenkernel/BKE_paint.h | |
parent | 16edfc516e97042afdc3e35d46ebafcca8cd1bd9 (diff) | |
parent | 6c98859b7740343cc75be7e4c568a686dfd20d0c (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 3f4941f222e..cf4542e4824 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -162,6 +162,14 @@ void paint_update_brush_rake_rotation(struct UnifiedPaintSettings *ups, struct B void BKE_paint_stroke_get_average(struct Scene *scene, struct Object *ob, float stroke[3]); +/* Used for both vertex color and weight paint */ +struct SculptVertexPaintGeomMap { + int *vert_map_mem; + struct MeshElemMap *vert_to_loop; + int *poly_map_mem; + struct MeshElemMap *vert_to_poly; +}; + /* Session data (mode-specific) */ typedef struct SculptSession { @@ -207,10 +215,38 @@ typedef struct SculptSession { struct SculptStroke *stroke; struct StrokeCache *cache; + + union { + struct { + struct SculptVertexPaintGeomMap gmap; + + /* For non-airbrush painting to re-apply from the original (MLoop aligned). */ + unsigned int *previous_color; + } vpaint; + + struct { + struct SculptVertexPaintGeomMap gmap; + + /* Vertex aligned arrays of weights. */ + /* For non-airbrush painting to re-apply from the original. */ + float *previous_weight; + /* Keep track of how much each vertex has been painted (non-airbrush only). */ + float *alpha_weight; + } wpaint; + + //struct { + //ToDo: identify sculpt-only fields + //} sculpt; + } mode; + int mode_type; + + /* This flag prevents PBVH from being freed when creating the vp_handle for texture paint. */ + bool building_vp_handle; } SculptSession; void BKE_sculptsession_free(struct Object *ob); void BKE_sculptsession_free_deformMats(struct SculptSession *ss); +void BKE_sculptsession_free_vwpaint_data(struct SculptSession *ss); void BKE_sculptsession_bm_to_me(struct Object *ob, bool reorder); void BKE_sculptsession_bm_to_me_for_render(struct Object *object); void BKE_sculpt_update_mesh_elements( |