Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/gizmo/intern/wm_gizmo.c
| Show First 20 Lines • Show All 424 Lines • ▼ Show 20 Lines | if (false) { | ||||
| wm_gizmomap_modal_set(gzmap, C, gz, event, true); | wm_gizmomap_modal_set(gzmap, C, gz, event, true); | ||||
| } | } | ||||
| else { | else { | ||||
| /* WEAK: but it works. */ | /* WEAK: but it works. */ | ||||
| WM_operator_name_call(C, "GIZMOGROUP_OT_gizmo_tweak", WM_OP_INVOKE_DEFAULT, NULL, event); | WM_operator_name_call(C, "GIZMOGROUP_OT_gizmo_tweak", WM_OP_INVOKE_DEFAULT, NULL, event); | ||||
| } | } | ||||
| } | } | ||||
| void WM_gizmo_modal_set_from_setup_weak(struct wmGizmoMap *gzmap, | |||||
| struct bContext *C, | |||||
| struct wmGizmo *gz, | |||||
| const wmEvent *event) | |||||
| { | |||||
| if (gz) { | |||||
| const int highlight_part = gz->highlight_part; | |||||
| gz->highlight_part = -1; | |||||
| wm_gizmomap_modal_set(gzmap, C, gz, event, true); | |||||
| gz->highlight_part = highlight_part; | |||||
| } | |||||
| else { | |||||
| wm_gizmomap_modal_set(gzmap, C, gzmap->gzmap_context.modal, event, false); | |||||
| } | |||||
| } | |||||
| void wm_gizmo_calculate_scale(wmGizmo *gz, const bContext *C) | void wm_gizmo_calculate_scale(wmGizmo *gz, const bContext *C) | ||||
| { | { | ||||
| const RegionView3D *rv3d = CTX_wm_region_view3d(C); | const RegionView3D *rv3d = CTX_wm_region_view3d(C); | ||||
| float scale = UI_DPI_FAC; | float scale = UI_DPI_FAC; | ||||
| if ((gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_SCALE) == 0) { | if ((gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_SCALE) == 0) { | ||||
| scale *= U.gizmo_size; | scale *= U.gizmo_size; | ||||
| if (rv3d) { | if (rv3d) { | ||||
| ▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines | |||||