[Bf-blender-cvs] [266fc1c1ff5] blender2.8: Revert "COW Fix: Lamp manipulators"
Campbell Barton
noreply at git.blender.org
Fri Jun 1 09:25:34 CEST 2018
Commit: 266fc1c1ff57c40566055e9191ce2afb357d0a27
Author: Campbell Barton
Date: Fri Jun 1 09:24:17 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB266fc1c1ff57c40566055e9191ce2afb357d0a27
Revert "COW Fix: Lamp manipulators"
This reverts commit 33e45658ebc2a79acda259f7be748ad64780e982.
No longer needed.
===================================================================
M source/blender/editors/space_view3d/view3d_manipulator_lamp.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list