diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-01 10:48:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-01 10:48:40 +0300 |
commit | 3cefb27830f13889ae4a4fbfdec03f5b8de281c5 (patch) | |
tree | 58c554015b57140185fc964f42f681f7cc073280 /source/blender | |
parent | 266fc1c1ff57c40566055e9191ce2afb357d0a27 (diff) |
Partial Revert of COW/Camera manipulator changes
d64fbe94568e5 3e26b84397fcb
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_manipulator_camera.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_camera.c b/source/blender/editors/space_view3d/view3d_manipulator_camera.c index d3fe17123a0..b680818dc14 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_camera.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_camera.c @@ -47,8 +47,6 @@ #include "WM_types.h" #include "WM_message.h" -#include "DEG_depsgraph_query.h" - #include "view3d_intern.h" /* own include */ @@ -78,9 +76,7 @@ static bool WIDGETGROUP_camera_poll(const bContext *C, wmManipulatorGroupType *U static void WIDGETGROUP_camera_setup(const bContext *C, wmManipulatorGroup *mgroup) { - const Depsgraph *depsgraph = CTX_data_depsgraph(C); Object *ob = CTX_data_active_object(C); - const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); float dir[3]; const wmManipulatorType *wt_arrow = WM_manipulatortype_find("MANIPULATOR_WT_arrow_3d", true); @@ -88,7 +84,7 @@ static void WIDGETGROUP_camera_setup(const bContext *C, wmManipulatorGroup *mgro struct CameraWidgetGroup *camgroup = MEM_callocN(sizeof(struct CameraWidgetGroup), __func__); mgroup->customdata = camgroup; - negate_v3_v3(dir, ob_eval->obmat[2]); + negate_v3_v3(dir, ob->obmat[2]); /* dof distance */ { @@ -128,28 +124,26 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmManipulatorGroup *mg if (!mgroup->customdata) return; - const Depsgraph *depsgraph = CTX_data_depsgraph(C); struct CameraWidgetGroup *camgroup = mgroup->customdata; Object *ob = CTX_data_active_object(C); - const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); - Camera *ca = ob_eval->data; + Camera *ca = ob->data; PointerRNA camera_ptr; float dir[3]; const float ob_scale_inv[3] = { - 1.0f / len_v3(ob_eval->obmat[0]), - 1.0f / len_v3(ob_eval->obmat[1]), - 1.0f / len_v3(ob_eval->obmat[2]), + 1.0f / len_v3(ob->obmat[0]), + 1.0f / len_v3(ob->obmat[1]), + 1.0f / len_v3(ob->obmat[2]), }; const float ob_scale_uniform_inv = (ob_scale_inv[0] + ob_scale_inv[1] + ob_scale_inv[2]) / 3.0f; RNA_pointer_create(&ca->id, &RNA_Camera, ca, &camera_ptr); - negate_v3_v3(dir, ob_eval->obmat[2]); + negate_v3_v3(dir, ob->obmat[2]); if (ca->flag & CAM_SHOWLIMITS) { - WM_manipulator_set_matrix_location(camgroup->dop_dist, ob_eval->obmat[3]); - WM_manipulator_set_matrix_rotation_from_yz_axis(camgroup->dop_dist, ob_eval->obmat[1], dir); + WM_manipulator_set_matrix_location(camgroup->dop_dist, ob->obmat[3]); + WM_manipulator_set_matrix_rotation_from_yz_axis(camgroup->dop_dist, ob->obmat[1], dir); WM_manipulator_set_scale(camgroup->dop_dist, ca->drawsize); WM_manipulator_set_flag(camgroup->dop_dist, WM_MANIPULATOR_HIDDEN, false); @@ -186,8 +180,8 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmManipulatorGroup *mg aspect[1] = (sensor_fit == CAMERA_SENSOR_FIT_HOR) ? aspy / aspx : 1.0f; unit_m4(widget->matrix_basis); - WM_manipulator_set_matrix_location(widget, ob_eval->obmat[3]); - WM_manipulator_set_matrix_rotation_from_yz_axis(widget, ob_eval->obmat[1], dir); + WM_manipulator_set_matrix_location(widget, ob->obmat[3]); + WM_manipulator_set_matrix_rotation_from_yz_axis(widget, ob->obmat[1], dir); if (is_ortho) { scale_matrix = ca->ortho_scale * 0.5f; |