diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-16 02:55:30 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-16 02:55:30 +0400 |
commit | 837d0ac2e0882bc63da15c96f41fa76da2486bf6 (patch) | |
tree | a7e9ac451f910823d63710c79cd44b9213d85913 /source/blender/editors/sculpt_paint/paint_stroke.c | |
parent | b97397cae3fb74078e496d58cf0e37383732977c (diff) |
Fix #35372: sculpting/painting long brush strokes with small brush size would
take up a lot of memory.
The operator was recording an array with all stroke points. However this was not
particularly useful, only sculpt mode had exec() implemented to redo the stroke,
but it was not registering the operator anyway so there was no way to access the
data after the operator was done. So no one was using this anyway.
I did now implement exec for the paint modes so you can call the operator with
stroke points from a script.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 90c0d7e3a7a..d3cb53c94fc 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -328,6 +328,10 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEve stroke->update_step(C, stroke, &itemptr); + /* don't record this for now, it takes up a lot of memory when doing long + * strokes with small brush size, and operators have register disabled */ + RNA_collection_clear(op->ptr, "stroke"); + /* always redraw region if brush is shown */ if (ar && (paint->flags & PAINT_SHOW_BRUSH)) WM_paint_cursor_tag_redraw(window, ar); |