diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-20 17:01:35 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-20 18:01:12 +0300 |
commit | c85144934a7df525367e2b0db32038dc0a248797 (patch) | |
tree | ea9f2985005cd0f6551f8b72fc06ed5b80da79ef /source | |
parent | d74c495838355abb32a299adc145975bf7b148b1 (diff) |
Fix T79924: Update the view rotation origin after setting the sculpt pivot
This updates the view navigation origin after modifying the pivot
position.
Reviewed By: sergey
Maniphest Tasks: T79924
Differential Revision: https://developer.blender.org/D8632
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_transform.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_transform.c b/source/blender/editors/sculpt_paint/sculpt_transform.c index bdada4d2565..b52b04eba3a 100644 --- a/source/blender/editors/sculpt_paint/sculpt_transform.c +++ b/source/blender/editors/sculpt_paint/sculpt_transform.c @@ -326,6 +326,12 @@ static int sculpt_set_pivot_position_exec(bContext *C, wmOperator *op) MEM_SAFE_FREE(nodes); } + /* Update the viewport navigation rotation origin. */ + UnifiedPaintSettings *ups = &CTX_data_tool_settings(C)->unified_paint_settings; + copy_v3_v3(ups->average_stroke_accum, ss->pivot_pos); + ups->average_stroke_counter = 1; + ups->last_stroke_valid = true; + ED_region_tag_redraw(region); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); |