From 266fc1c1ff57c40566055e9191ce2afb357d0a27 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Jun 2018 09:24:17 +0200 Subject: Revert "COW Fix: Lamp manipulators" This reverts commit 33e45658ebc2a79acda259f7be748ad64780e982. No longer needed. --- .../editors/space_view3d/view3d_manipulator_lamp.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c index e659c67396d..88c36fc2c0b 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c @@ -45,8 +45,6 @@ #include "WM_api.h" #include "WM_types.h" -#include "DEG_depsgraph_query.h" - #include "view3d_intern.h" /* own include */ /* -------------------------------------------------------------------- */ @@ -82,18 +80,16 @@ static void WIDGETGROUP_lamp_spot_setup(const bContext *UNUSED(C), wmManipulator static void WIDGETGROUP_lamp_spot_refresh(const bContext *C, wmManipulatorGroup *mgroup) { - const Depsgraph *depsgraph = CTX_data_depsgraph(C); wmManipulatorWrapper *wwrapper = mgroup->customdata; wmManipulator *mpr = wwrapper->manipulator; Object *ob = CTX_data_active_object(C); - const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); Lamp *la = ob->data; float dir[3]; - negate_v3_v3(dir, ob_eval->obmat[2]); + negate_v3_v3(dir, ob->obmat[2]); WM_manipulator_set_matrix_rotation_from_z_axis(mpr, dir); - WM_manipulator_set_matrix_location(mpr, ob_eval->obmat[3]); + WM_manipulator_set_matrix_location(mpr, ob->obmat[3]); /* need to set property here for undo. TODO would prefer to do this in _init */ PointerRNA lamp_ptr; @@ -183,13 +179,11 @@ static void WIDGETGROUP_lamp_area_setup(const bContext *UNUSED(C), wmManipulator static void WIDGETGROUP_lamp_area_refresh(const bContext *C, wmManipulatorGroup *mgroup) { wmManipulatorWrapper *wwrapper = mgroup->customdata; - const Depsgraph *depsgraph = CTX_data_depsgraph(C); Object *ob = CTX_data_active_object(C); - const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); - Lamp *la = ob_eval->data; + Lamp *la = ob->data; wmManipulator *mpr = wwrapper->manipulator; - copy_m4_m4(mpr->matrix_basis, ob_eval->obmat); + copy_m4_m4(mpr->matrix_basis, ob->obmat); int flag = ED_MANIPULATOR_CAGE2D_XFORM_FLAG_SCALE; if (ELEM(la->area_shape, LA_AREA_SQUARE, LA_AREA_DISK)) { @@ -272,12 +266,10 @@ static void WIDGETGROUP_lamp_target_setup(const bContext *UNUSED(C), wmManipulat static void WIDGETGROUP_lamp_target_draw_prepare(const bContext *C, wmManipulatorGroup *mgroup) { wmManipulatorWrapper *wwrapper = mgroup->customdata; - const Depsgraph *depsgraph = CTX_data_depsgraph(C); Object *ob = CTX_data_active_object(C); - const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); wmManipulator *mpr = wwrapper->manipulator; - copy_m4_m4(mpr->matrix_basis, ob_eval->obmat); + copy_m4_m4(mpr->matrix_basis, ob->obmat); unit_m4(mpr->matrix_offset); mpr->matrix_offset[3][2] = -2.4f / mpr->scale_basis; WM_manipulator_set_flag(mpr, WM_MANIPULATOR_DRAW_OFFSET_SCALE, true); -- cgit v1.2.3