Fix spin rotate axis

Also disable lamp-target for cameras (might enable later).
This commit is contained in:
Campbell Barton 2017-08-08 17:15:41 +10:00
parent 00f22403ac
commit f0d4420cc0
2 changed files with 3 additions and 1 deletions

View File

@ -880,7 +880,7 @@ static void manipulator_mesh_spin_update_from_op(ManipulatorSpinGroup *man)
normalize_v3(man->data.rotate_up);
WM_manipulator_set_matrix_rotation_from_z_axis(man->translate_c, plane_no);
WM_manipulator_set_matrix_rotation_from_yz_axis(man->rotate_c, man->data.rotate_axis, plane_no);
WM_manipulator_set_matrix_rotation_from_yz_axis(man->rotate_c, plane_no, man->data.rotate_axis);
/* show the axis instead of mouse cursor */
RNA_enum_set(man->rotate_c->ptr, "draw_options",

View File

@ -240,9 +240,11 @@ static bool WIDGETGROUP_lamp_target_poll(const bContext *C, wmManipulatorGroupTy
Lamp *la = ob->data;
return (ELEM(la->type, LA_SUN, LA_SPOT, LA_HEMI, LA_AREA));
}
#if 0
else if (ob->type == OB_CAMERA) {
return true;
}
#endif
}
return false;
}