From 427fbc879e18608cc24e448b37e39c8413df988a Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 29 Dec 2014 11:35:22 +0100 Subject: Move average stroke from sculpt session to unified paint settings so it can be reused by other paint systems too. --- source/blender/blenkernel/BKE_paint.h | 10 +++------- 1 file changed, 3 insertions(+), 7 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 ff1305b9182..9ad99f726ff 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -109,7 +109,7 @@ void BKE_palette_cleanup(struct Palette *palette); struct PaintCurve *BKE_paint_curve_add(struct Main *bmain, const char *name); void BKE_paint_curve_free(struct PaintCurve *pc); -void BKE_paint_init(struct Paint *p, const char col[3]); +void BKE_paint_init(struct UnifiedPaintSettings *ups, struct Paint *p, const char col[3]); void BKE_paint_free(struct Paint *p); void BKE_paint_copy(struct Paint *src, struct Paint *tar); @@ -145,6 +145,8 @@ float paint_grid_paint_mask(const struct GridPaintMask *gpm, unsigned level, /* stroke related */ void paint_calculate_rake_rotation(struct UnifiedPaintSettings *ups, struct Brush *brush, const float mouse_pos[2]); +void BKE_paint_stroke_get_average(struct Scene *scene, struct Object *ob, float stroke[3]); + /* Session data (mode-specific) */ typedef struct SculptSession { @@ -191,12 +193,6 @@ typedef struct SculptSession { struct SculptStroke *stroke; struct StrokeCache *cache; - - /* last paint/sculpt stroke location */ - bool last_stroke_valid; - - float average_stroke_accum[3]; - int average_stroke_counter; } SculptSession; void BKE_free_sculptsession(struct Object *ob); -- cgit v1.2.3