diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 6c39163661b..a7b7c351fdf 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -630,28 +630,28 @@ static bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3]) bool is_set = false; Scene *scene = CTX_data_scene(C); - Object *ob = OBACT; + Object *ob_act = OBACT; - if (ob && (ob->mode & OB_MODE_ALL_PAINT) && + if (ob_act && (ob_act->mode & OB_MODE_ALL_PAINT) && /* with weight-paint + pose-mode, fall through to using calculateTransformCenter */ - ((ob->mode & OB_MODE_WEIGHT_PAINT) && BKE_object_pose_armature_get(ob)) == 0) + ((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->mode & (OB_MODE_SCULPT | OB_MODE_TEXTURE_PAINT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) { + 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, stroke); + BKE_paint_stroke_get_average(scene, ob_act, stroke); copy_v3_v3(lastofs, stroke); } else { - copy_v3_v3(lastofs, ob->obmat[3]); + copy_v3_v3(lastofs, ob_act->obmat[3]); } is_set = true; } - else if (ob && (ob->mode & OB_MODE_EDIT) && (ob->type == OB_FONT)) { - Curve *cu = ob->data; + else if (ob_act && (ob_act->mode & OB_MODE_EDIT) && (ob_act->type == OB_FONT)) { + Curve *cu = ob_act->data; EditFont *ef = cu->editfont; int i; @@ -661,11 +661,11 @@ static bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3]) } mul_v2_fl(lastofs, 1.0f / 4.0f); - mul_m4_v3(ob->obmat, lastofs); + mul_m4_v3(ob_act->obmat, lastofs); is_set = true; } - else if (ob == NULL || ob->mode == OB_MODE_OBJECT) { + else if (ob_act == NULL || ob_act->mode == OB_MODE_OBJECT) { /* object mode use boundbox centers */ View3D *v3d = CTX_wm_view3d(C); Base *base; |