diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-13 06:57:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-13 06:57:46 +0300 |
commit | 7a633d7c4f9fdc271bae7b7c83116c5ce61f4b1a (patch) | |
tree | c7d694ff38db5d058e9eb804fcf33e38ae17b333 | |
parent | eb04908ccdf0cafbae292c736543bc089ea10f02 (diff) |
Vertex/Weight Paint: Support view-selected on last-stroke
D1875 by @lichtwerk
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 3bcd610150c..7b296473f31 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2380,9 +2380,8 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P swap_m4m4(vc->rv3d->persmat, mat); /* calculate pivot for rotation around seletion if needed */ - if (U.uiflag & USER_ORBIT_SELECTION) { - paint_last_stroke_update(scene, vc->ar, mval); - } + /* also needed for "View Selected" on last stroke */ + paint_last_stroke_update(scene, vc->ar, mval); DAG_id_tag_update(ob->data, 0); ED_region_tag_redraw(vc->ar); @@ -2858,9 +2857,8 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P } /* calculate pivot for rotation around seletion if needed */ - if (U.uiflag & USER_ORBIT_SELECTION) { - paint_last_stroke_update(scene, vc->ar, mval); - } + /* also needed for "View Selected" on last stroke */ + paint_last_stroke_update(scene, vc->ar, mval); ED_region_tag_redraw(vc->ar); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 90f79f0ff69..b117a5e68d8 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3079,7 +3079,9 @@ static int viewselected_exec(bContext *C, wmOperator *op) else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)) { ok = PE_minmax(scene, min, max); } - else if (ob && (ob->mode & (OB_MODE_SCULPT | OB_MODE_TEXTURE_PAINT))) { + else if (ob && + (ob->mode & (OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) + { BKE_paint_stroke_get_average(scene, ob, min); copy_v3_v3(max, min); ok = true; |