diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_camera_control.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_camera_control.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c index 1d5b33e7b90..bce0e49d60a 100644 --- a/source/blender/editors/space_view3d/view3d_camera_control.c +++ b/source/blender/editors/space_view3d/view3d_camera_control.c @@ -127,8 +127,7 @@ Object *ED_view3d_cameracontrol_object_get(View3DCameraControl *vctrl) struct View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph, Scene *scene, View3D *v3d, - RegionView3D *rv3d, - const bool use_parent_root) + RegionView3D *rv3d) { View3DCameraControl *vctrl; @@ -139,7 +138,7 @@ struct View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph vctrl->ctx_v3d = v3d; vctrl->ctx_rv3d = rv3d; - vctrl->use_parent_root = use_parent_root; + vctrl->use_parent_root = v3d->camera->transflag & OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK; vctrl->persp_backup = rv3d->persp; vctrl->dist_backup = rv3d->dist; @@ -153,7 +152,7 @@ struct View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph if (rv3d->persp == RV3D_CAMOB) { Object *ob_back; - if (use_parent_root && (vctrl->root_parent = v3d->camera->parent)) { + if (vctrl->use_parent_root && (vctrl->root_parent = v3d->camera->parent)) { while (vctrl->root_parent->parent) { vctrl->root_parent = vctrl->root_parent->parent; } |