Paint: Orbit around selection/stroke: remove redundant case

Since rB8014180720d8, all paint modes support orbiting around last
stroke, so [a] the comment there is out of date and [b] the fallback
case of orbiting around the center will never be used (unless there is
no stroke information - but BKE_paint_stroke_get_average handles that
anyways).

Spotted while looking into T101766.

Maniphest Tasks: T101766

Differential Revision: https://developer.blender.org/D16779
This commit is contained in:
Philipp Oeser 2022-12-15 10:53:46 +01:00
parent e0ef5f3602
commit 0e1440eefd
Notes: blender-bot 2023-02-14 02:41:05 +01:00
Referenced by issue #101766, Curves sculptmode: orbit around selection does not orbit around last stroke
1 changed files with 1 additions and 13 deletions

View File

@ -174,19 +174,7 @@ bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
if (ob_act && (ob_act->mode & OB_MODE_ALL_PAINT) &&
/* with weight-paint + pose-mode, fall through to using calculateTransformCenter */
((ob_act->mode & OB_MODE_WEIGHT_PAINT) && BKE_object_pose_armature_get(ob_act)) == 0) {
/* in case of sculpting use last average stroke position as a rotation
* center, in other cases it's not clear what rotation center shall be
* so just rotate around object origin
*/
if (ob_act->mode &
(OB_MODE_SCULPT | OB_MODE_TEXTURE_PAINT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
float stroke[3];
BKE_paint_stroke_get_average(scene, ob_act_eval, stroke);
copy_v3_v3(lastofs, stroke);
}
else {
copy_v3_v3(lastofs, ob_act_eval->object_to_world[3]);
}
BKE_paint_stroke_get_average(scene, ob_act_eval, lastofs);
is_set = true;
}
else if (ob_act && (ob_act->mode & OB_MODE_EDIT) && (ob_act->type == OB_FONT)) {