Gizmo: press shift key to scale area lights uniformly #104418

Closed
Weizhen Huang wants to merge 13 commits from weizhen:shift_uniform_scale into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 46bd037076 - Show all commits

View File

@ -468,7 +468,8 @@ static void WIDGETGROUP_light_area_refresh(const bContext *C, wmGizmoGroup *gzgr
copy_m4_m4(gz->matrix_basis, ob->object_to_world);
int flag = ED_GIZMO_CAGE_XFORM_FLAG_SCALE;
if (ELEM(la->area_shape, LA_AREA_SQUARE, LA_AREA_DISK)) {
const wmEvent *event = CTX_wm_window(C)->eventstate;
if (ELEM(la->area_shape, LA_AREA_SQUARE, LA_AREA_DISK) || (event->modifier & KM_SHIFT)) {
flag |= ED_GIZMO_CAGE_XFORM_FLAG_SCALE_UNIFORM;
}
RNA_enum_set(gz->ptr, "transform", flag);