diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-12-29 14:34:46 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-12-29 14:35:03 +0300 |
commit | 18854a65065456d9a92ad9408b7b32f1a70cafae (patch) | |
tree | 985bb6ab498f507cbb3c544355751a6cde163d63 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 51a66a5a6e3e409f9e6d08f8b771d8e25e6a498e (diff) |
Rotate around selection now will work on last stroke position in texture
paint too.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index a6e1a198d61..dbb29997102 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3109,6 +3109,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe add_v3_v3(ups->average_stroke_accum, location); ups->average_stroke_counter++; + /* update last stroke position */ + ups->last_stroke_valid = true; } } @@ -4107,7 +4109,6 @@ static void sculpt_brush_init_tex(const Scene *scene, Sculpt *sd, SculptSession static bool sculpt_brush_stroke_init(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; Object *ob = CTX_data_active_object(C); Sculpt *sd = CTX_data_tool_settings(C)->sculpt; SculptSession *ss = CTX_data_active_object(C)->sculpt; @@ -4126,9 +4127,6 @@ static bool sculpt_brush_stroke_init(bContext *C, wmOperator *op) is_smooth = sculpt_any_smooth_mode(brush, NULL, mode); BKE_sculpt_update_mesh_elements(scene, sd, ob, is_smooth, need_mask); - zero_v3(ups->average_stroke_accum); - ups->average_stroke_counter = 0; - return 1; } @@ -4335,9 +4333,6 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str } } - /* update last stroke position */ - ups->last_stroke_valid = true; - sculpt_cache_free(ss->cache); ss->cache = NULL; |