Revert "COW Fix: Lamp manipulators"
This reverts commit 33e45658eb
.
No longer needed.
This commit is contained in:
parent
5736157b5e
commit
266fc1c1ff
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue