Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
| Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | static int gizmo_move_modal(bContext *C, | ||||
| wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset"); | wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset"); | ||||
| if (WM_gizmo_target_property_is_valid(gz_prop)) { | if (WM_gizmo_target_property_is_valid(gz_prop)) { | ||||
| WM_gizmo_target_property_float_set_array(C, gz, gz_prop, move->prop_co); | WM_gizmo_target_property_float_set_array(C, gz, gz_prop, move->prop_co); | ||||
| } | } | ||||
| else { | else { | ||||
| zero_v3(move->prop_co); | zero_v3(move->prop_co); | ||||
| } | } | ||||
| ED_region_tag_redraw(ar); | ED_region_tag_redraw_editor_overlays(ar); | ||||
| inter->prev.tweak_flag = tweak_flag; | inter->prev.tweak_flag = tweak_flag; | ||||
| return OPERATOR_RUNNING_MODAL; | return OPERATOR_RUNNING_MODAL; | ||||
| } | } | ||||
| static void gizmo_move_exit(bContext *C, wmGizmo *gz, const bool cancel) | static void gizmo_move_exit(bContext *C, wmGizmo *gz, const bool cancel) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines | |||||