Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_windowmanager_types.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BKE_context.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm.h"
#include "wm_event_system.h"
#include "wm_event_types.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "UI_interface.h"
#include "RNA_access.h"
#include "RNA_define.h"
Go to the source code of this file.
Functions | |
Internal Gesture Utilities | |
Border gesture has two types:
It stores 4 values (xmin, xmax, ymin, ymax) and event it ended with (event_type). | |
static void | gesture_modal_end (bContext *C, wmOperator *op) |
static void | gesture_modal_state_to_operator (wmOperator *op, int modal_state) |
static int UNUSED_FUNCTION() | gesture_modal_state_from_operator (wmOperator *op) |
Border Gesture | |
Border gesture has two types:
It stores 4 values (xmin, xmax, ymin, ymax) and event it ended with (event_type). | |
static bool | gesture_box_apply_rect (wmOperator *op) |
static bool | gesture_box_apply (bContext *C, wmOperator *op) |
int | WM_gesture_box_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
int | WM_gesture_box_modal (bContext *C, wmOperator *op, const wmEvent *event) |
void | WM_gesture_box_cancel (bContext *C, wmOperator *op) |
Circle Gesture | |
Currently only used for selection or modal paint stuff, calls wmOperatorType.exec while hold mouse, exits on release (with no difference between cancel and confirm). | |
static void | gesture_circle_apply (bContext *C, wmOperator *op) |
int | WM_gesture_circle_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
int | WM_gesture_circle_modal (bContext *C, wmOperator *op, const wmEvent *event) |
void | WM_gesture_circle_cancel (bContext *C, wmOperator *op) |
Lasso Gesture | |
int | WM_gesture_lasso_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
int | WM_gesture_lines_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static int | gesture_lasso_apply (bContext *C, wmOperator *op) |
int | WM_gesture_lasso_modal (bContext *C, wmOperator *op, const wmEvent *event) |
int | WM_gesture_lines_modal (bContext *C, wmOperator *op, const wmEvent *event) |
void | WM_gesture_lasso_cancel (bContext *C, wmOperator *op) |
void | WM_gesture_lines_cancel (bContext *C, wmOperator *op) |
const int(* | WM_gesture_lasso_path_to_array (bContext *UNUSED(C), wmOperator *op, int *r_mcoords_len))[2] |
Straight Line Gesture | |
Gesture defined by the start and end points of a line that is created between the position of the initial event and the position of the current event. Straight Line Gesture has two modal callbacks depending on the tool that is being implemented: a regular modal callback intended to update the data during the execution of the gesture and a one-shot callback that only updates the data once when the gesture finishes. It stores 4 values: | |
#define | STRAIGHTLINE_SNAP_DEG 15.0f |
static bool | gesture_straightline_apply (bContext *C, wmOperator *op) |
int | WM_gesture_straightline_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
int | WM_gesture_straightline_active_side_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static void | wm_gesture_straightline_do_angle_snap (rcti *rect) |
int | WM_gesture_straightline_modal (bContext *C, wmOperator *op, const wmEvent *event) |
int | WM_gesture_straightline_oneshot_modal (bContext *C, wmOperator *op, const wmEvent *event) |
void | WM_gesture_straightline_cancel (bContext *C, wmOperator *op) |
Default operator callbacks for use with gestures (border/circle/lasso/straightline). Operators themselves are defined elsewhere.
wm_operators.c
.wm_operator_props.c
. Definition in file wm_gesture_ops.c.
#define STRAIGHTLINE_SNAP_DEG 15.0f |
Definition at line 768 of file wm_gesture_ops.c.
|
static |
Definition at line 143 of file wm_gesture_ops.c.
References C, wmOperator::customdata, wmOperatorType::exec, gesture_box_apply_rect(), gesture_modal_state_to_operator(), wmGesture::modal_state, OPERATOR_RETVAL_CHECK, wmOperator::type, and wmGesture::wait_for_input.
Referenced by WM_gesture_box_modal().
|
static |
Definition at line 125 of file wm_gesture_ops.c.
References wmOperator::customdata, wmGesture::customdata, max_ii(), min_ii(), wmOperator::ptr, RNA_int_set(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by gesture_box_apply(), and WM_gesture_box_modal().
|
static |
Definition at line 317 of file wm_gesture_ops.c.
References C, wmOperator::customdata, wmGesture::customdata, wmOperatorType::exec, GESTURE_MODAL_NOP, gesture_modal_state_to_operator(), wmGesture::modal_state, OPERATOR_RETVAL_CHECK, wmOperator::ptr, RNA_int_set(), wmOperator::type, wmGesture::wait_for_input, rcti::xmax, rcti::xmin, and rcti::ymin.
Referenced by WM_gesture_circle_invoke(), and WM_gesture_circle_modal().
|
static |
Definition at line 515 of file wm_gesture_ops.c.
References C, wmOperator::customdata, wmGesture::customdata, wmOperatorType::exec, gesture_modal_end(), OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, wmGesture::points, wmOperator::ptr, RNA_collection_add(), RNA_collection_clear(), RNA_float_set_array(), and wmOperator::type.
Referenced by WM_gesture_lasso_modal().
|
static |
Definition at line 49 of file wm_gesture_ops.c.
References C, CTX_wm_area(), CTX_wm_window(), wmOperator::customdata, ED_area_tag_redraw(), NULL, wmOperator::ptr, RNA_struct_find_property(), WM_cursor_modal_restore(), and WM_gesture_end().
Referenced by gesture_lasso_apply(), WM_gesture_box_cancel(), WM_gesture_box_modal(), WM_gesture_circle_cancel(), WM_gesture_circle_modal(), WM_gesture_lasso_cancel(), WM_gesture_lasso_modal(), WM_gesture_lines_cancel(), WM_gesture_straightline_cancel(), WM_gesture_straightline_modal(), and WM_gesture_straightline_oneshot_modal().
|
static |
Definition at line 88 of file wm_gesture_ops.c.
References GESTURE_MODAL_DESELECT, GESTURE_MODAL_IN, GESTURE_MODAL_NOP, GESTURE_MODAL_OUT, GESTURE_MODAL_SELECT, RNA_property_boolean_get(), RNA_property_enum_get(), RNA_property_is_set(), RNA_struct_find_property(), and SEL_OP_SUB.
|
static |
Definition at line 64 of file wm_gesture_ops.c.
References GESTURE_MODAL_DESELECT, GESTURE_MODAL_IN, GESTURE_MODAL_OUT, GESTURE_MODAL_SELECT, wmOperator::ptr, RNA_property_boolean_set(), RNA_property_enum_set(), RNA_struct_find_property(), SEL_OP_ADD, and SEL_OP_SUB.
Referenced by gesture_box_apply(), and gesture_circle_apply().
|
static |
Definition at line 712 of file wm_gesture_ops.c.
References C, wmOperator::customdata, wmGesture::customdata, wmOperatorType::exec, OPERATOR_RETVAL_CHECK, wmOperator::ptr, RNA_boolean_set(), RNA_int_set(), wmOperator::type, wmGesture::use_flip, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by WM_gesture_straightline_modal(), and WM_gesture_straightline_oneshot_modal().
void WM_gesture_box_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) |
Definition at line 268 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by ACTION_OT_select_box(), ANIM_OT_channels_select_box(), ANIM_OT_previewrange_set(), FILE_OT_select_box(), GPENCIL_OT_select_box(), GRAPH_OT_select_box(), IMAGE_OT_render_border(), IMAGE_OT_view_zoom_border(), INFO_OT_select_box(), MARKER_OT_select_box(), NLA_OT_select_box(), blender::ed::space_node::NODE_OT_select_box(), blender::ed::space_node::NODE_OT_viewer_border(), OUTLINER_OT_select_box(), SEQUENCER_OT_select_box(), SEQUENCER_OT_view_ghost_border(), UV_OT_select_box(), VIEW2D_OT_zoom_border(), VIEW3D_OT_clip_border(), VIEW3D_OT_render_border(), VIEW3D_OT_select_box(), and VIEW3D_OT_zoom_border().
int WM_gesture_box_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 163 of file wm_gesture_ops.c.
References C, CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_boolean_get(), wmGesture::wait_for_input, WM_event_add_modal_handler(), WM_event_is_mouse_drag_or_press(), WM_GESTURE_CROSS_RECT, WM_gesture_new(), WM_GESTURE_RECT, and wm_gesture_tag_redraw().
Referenced by actkeys_box_select_invoke(), ANIM_OT_channels_select_box(), ANIM_OT_previewrange_set(), CLIP_OT_graph_select_box(), CLIP_OT_select_box(), ed_marker_box_select_invoke(), FILE_OT_select_box(), GPENCIL_OT_select_box(), graphkeys_box_select_invoke(), hide_show_invoke(), IMAGE_OT_render_border(), IMAGE_OT_view_zoom_border(), INFO_OT_select_box(), MASK_OT_select_box(), nlaedit_box_select_invoke(), blender::ed::space_node::node_box_select_invoke(), blender::ed::space_node::NODE_OT_viewer_border(), outliner_box_select_invoke(), PAINT_OT_mask_box_gesture(), SCULPT_OT_face_set_box_gesture(), sculpt_trim_gesture_box_invoke(), sequencer_box_select_invoke(), SEQUENCER_OT_view_ghost_border(), UV_OT_select_box(), VIEW2D_OT_zoom_border(), view3d_clipping_invoke(), VIEW3D_OT_render_border(), VIEW3D_OT_select_box(), and VIEW3D_OT_zoom_border().
int WM_gesture_box_modal | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 190 of file wm_gesture_ops.c.
References BLI_rcti_translate(), C, CTX_wm_window(), wmOperator::customdata, wmGesture::customdata, EVT_MODAL_MAP, gesture_box_apply(), gesture_box_apply_rect(), GESTURE_MODAL_BEGIN, GESTURE_MODAL_CANCEL, GESTURE_MODAL_DESELECT, gesture_modal_end(), GESTURE_MODAL_IN, GESTURE_MODAL_MOVE, GESTURE_MODAL_OUT, GESTURE_MODAL_SELECT, wmGesture::is_active, wmGesture::is_active_prev, wmGesture::modal_state, MOUSEMOVE, wmGesture::move, NDOF_MOTION, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmGesture::type, wmEvent::type, wmEvent::val, wmGesture::wait_for_input, wmGesture::winrct, WM_GESTURE_CROSS_RECT, wm_gesture_tag_redraw(), rcti::xmax, rcti::xmin, wmEvent::xy, rcti::ymax, and rcti::ymin.
Referenced by ACTION_OT_select_box(), ANIM_OT_channels_select_box(), ANIM_OT_previewrange_set(), CLIP_OT_graph_select_box(), CLIP_OT_select_box(), file_box_select_modal(), GPENCIL_OT_select_box(), GRAPH_OT_select_box(), IMAGE_OT_render_border(), IMAGE_OT_view_zoom_border(), INFO_OT_select_box(), MARKER_OT_select_box(), MASK_OT_select_box(), NLA_OT_select_box(), blender::ed::space_node::NODE_OT_select_box(), blender::ed::space_node::NODE_OT_viewer_border(), OUTLINER_OT_select_box(), PAINT_OT_hide_show(), PAINT_OT_mask_box_gesture(), SCULPT_OT_face_set_box_gesture(), SCULPT_OT_trim_box_gesture(), SEQUENCER_OT_select_box(), SEQUENCER_OT_view_ghost_border(), UV_OT_select_box(), VIEW2D_OT_zoom_border(), VIEW3D_OT_clip_border(), VIEW3D_OT_render_border(), VIEW3D_OT_select_box(), and VIEW3D_OT_zoom_border().
void WM_gesture_circle_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) |
Definition at line 449 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by ACTION_OT_select_circle(), GPENCIL_OT_select_circle(), GRAPH_OT_select_circle(), UV_OT_select_circle(), and view3d_circle_select_cancel().
int WM_gesture_circle_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 286 of file wm_gesture_ops.c.
References C, CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, wmGesture::customdata, gesture_circle_apply(), wmGesture::is_active, wmGesture::is_active_prev, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), wmGesture::wait_for_input, WM_event_add_modal_handler(), WM_event_is_mouse_drag_or_press(), WM_GESTURE_CIRCLE, WM_gesture_new(), wm_gesture_tag_redraw(), and rcti::xmax.
Referenced by ACTION_OT_select_circle(), CLIP_OT_select_circle(), GPENCIL_OT_select_circle(), GRAPH_OT_select_circle(), MASK_OT_select_circle(), blender::ed::space_node::NODE_OT_select_circle(), UV_OT_select_circle(), and VIEW3D_OT_select_circle().
int WM_gesture_circle_modal | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 345 of file wm_gesture_ops.c.
References C, ceil(), CTX_wm_window(), wmOperator::customdata, wmGesture::customdata, EVT_MODAL_MAP, blender::math::floor(), gesture_circle_apply(), GESTURE_MODAL_CANCEL, GESTURE_MODAL_CIRCLE_ADD, GESTURE_MODAL_CIRCLE_SIZE, GESTURE_MODAL_CIRCLE_SUB, GESTURE_MODAL_CONFIRM, GESTURE_MODAL_DESELECT, gesture_modal_end(), GESTURE_MODAL_NOP, GESTURE_MODAL_SELECT, wmGesture::is_active, wmGesture::is_active_prev, wmGesture::modal_state, MOUSEMOVE, NDOF_MOTION, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_int_set(), wmEvent::type, wmEvent::val, wmGesture::wait_for_input, wmGesture::winrct, wm_gesture_tag_redraw(), rcti::xmax, rcti::xmin, and rcti::ymin.
Referenced by ACTION_OT_select_circle(), CLIP_OT_select_circle(), GPENCIL_OT_select_circle(), GRAPH_OT_select_circle(), MASK_OT_select_circle(), blender::ed::space_node::NODE_OT_select_circle(), UV_OT_select_circle(), and view3d_circle_select_modal().
void WM_gesture_lasso_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) |
Definition at line 615 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by ACTION_OT_select_lasso(), CLIP_OT_select_lasso(), GPENCIL_OT_select_lasso(), GPENCIL_OT_stroke_cutter(), GRAPH_OT_select_lasso(), MASK_OT_select_lasso(), blender::ed::space_node::NODE_OT_select_lasso(), UV_OT_select_lasso(), and VIEW3D_OT_select_lasso().
int WM_gesture_lasso_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 477 of file wm_gesture_ops.c.
References C, CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_property_int_get(), RNA_struct_find_property(), WM_cursor_modal_set(), WM_event_add_modal_handler(), WM_GESTURE_LASSO, WM_gesture_new(), and wm_gesture_tag_redraw().
Referenced by ACTION_OT_select_lasso(), CLIP_OT_select_lasso(), GPENCIL_OT_select_lasso(), GPENCIL_OT_stroke_cutter(), GRAPH_OT_select_lasso(), MASK_OT_select_lasso(), blender::ed::space_node::node_lasso_select_invoke(), PAINT_OT_mask_lasso_gesture(), SCULPT_OT_face_set_lasso_gesture(), sculpt_trim_gesture_lasso_invoke(), UV_OT_select_lasso(), and VIEW3D_OT_select_lasso().
int WM_gesture_lasso_modal | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 544 of file wm_gesture_ops.c.
References C, CTX_wm_window(), wmOperator::customdata, wmGesture::customdata, EVT_ESCKEY, EVT_MODAL_MAP, gesture_lasso_apply(), gesture_modal_end(), GESTURE_MODAL_MOVE, INBETWEEN_MOUSEMOVE, wmGesture::is_active, wmGesture::is_active_prev, KM_RELEASE, LEFTMOUSE, MEM_reallocN, MIDDLEMOUSE, MOUSEMOVE, wmGesture::move, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmGesture::points, wmGesture::points_alloc, pow2f(), RIGHTMOUSE, wmEvent::type, UI_DPI_FAC, wmEvent::val, wmGesture::winrct, wm_gesture_tag_redraw(), x, rcti::xmin, y, and rcti::ymin.
Referenced by ACTION_OT_select_lasso(), CLIP_OT_select_lasso(), GPENCIL_OT_select_lasso(), GPENCIL_OT_stroke_cutter(), GRAPH_OT_select_lasso(), MASK_OT_select_lasso(), blender::ed::space_node::NODE_OT_select_lasso(), PAINT_OT_mask_lasso_gesture(), SCULPT_OT_face_set_lasso_gesture(), SCULPT_OT_trim_lasso_gesture(), UV_OT_select_lasso(), VIEW3D_OT_select_lasso(), and WM_gesture_lines_modal().
const int(* WM_gesture_lasso_path_to_array | ( | bContext * | UNUSEDC, |
wmOperator * | op, | ||
int * | r_mcoords_len | ||
) | )[2] |
Definition at line 625 of file wm_gesture_ops.c.
References BLI_assert, len, MEM_mallocN, NULL, RNA_float_get_array(), RNA_PROP_BEGIN, RNA_PROP_END, RNA_property_collection_length(), and RNA_struct_find_property().
Referenced by actkeys_lassoselect_exec(), clip_lasso_select_exec(), gpencil_cutter_exec(), gpencil_lasso_select_exec(), graphkeys_lassoselect_exec(), blender::ed::space_node::node_lasso_select_exec(), sculpt_gesture_init_from_lasso(), uv_lasso_select_exec(), and view3d_lasso_select_exec().
void WM_gesture_lines_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) |
Definition at line 620 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by blender::ed::space_node::NODE_OT_add_reroute(), blender::ed::space_node::NODE_OT_links_cut(), and blender::ed::space_node::NODE_OT_links_mute().
int WM_gesture_lines_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 496 of file wm_gesture_ops.c.
References C, CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_property_int_get(), RNA_struct_find_property(), WM_cursor_modal_set(), WM_event_add_modal_handler(), WM_GESTURE_LINES, WM_gesture_new(), and wm_gesture_tag_redraw().
Referenced by MESH_OT_knife_cut(), blender::ed::space_node::NODE_OT_add_reroute(), blender::ed::space_node::NODE_OT_links_cut(), and blender::ed::space_node::NODE_OT_links_mute().
int WM_gesture_lines_modal | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 610 of file wm_gesture_ops.c.
References C, and WM_gesture_lasso_modal().
Referenced by MESH_OT_knife_cut(), blender::ed::space_node::NODE_OT_add_reroute(), blender::ed::space_node::NODE_OT_links_cut(), and blender::ed::space_node::NODE_OT_links_mute().
int WM_gesture_straightline_active_side_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 759 of file wm_gesture_ops.c.
References C, wmOperator::customdata, wmGesture::draw_active_side, OPERATOR_RUNNING_MODAL, wmGesture::use_flip, and WM_gesture_straightline_invoke().
Referenced by mesh_bisect_invoke(), PAINT_OT_mask_line_gesture(), and SCULPT_OT_project_line_gesture().
void WM_gesture_straightline_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) |
Definition at line 956 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by IMAGE_OT_sample_line(), MESH_OT_bisect(), PAINT_OT_weight_gradient(), and paint_weight_gradient_modal().
Definition at line 769 of file wm_gesture_ops.c.
References add_v2_v2(), angle(), angle_signed_v2v2(), DEG2RAD, floorf, mul_v2_fl(), normalize_v2(), RAD2DEG, rotate_v2_v2fl(), STRAIGHTLINE_SNAP_DEG, sub_v2_v2v2(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by WM_gesture_straightline_modal(), and WM_gesture_straightline_oneshot_modal().
int WM_gesture_straightline_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 736 of file wm_gesture_ops.c.
References C, CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, wmGesture::is_active, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_property_int_get(), RNA_struct_find_property(), WM_cursor_modal_set(), WM_event_add_modal_handler(), WM_event_is_mouse_drag_or_press(), WM_gesture_new(), WM_GESTURE_STRAIGHTLINE, and wm_gesture_tag_redraw().
Referenced by image_sample_line_invoke(), mesh_bisect_invoke(), paint_weight_gradient_invoke(), and WM_gesture_straightline_active_side_invoke().
int WM_gesture_straightline_modal | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 794 of file wm_gesture_ops.c.
References BLI_rcti_translate(), C, CTX_wm_window(), wmOperator::customdata, wmGesture::customdata, EVT_MODAL_MAP, GESTURE_MODAL_BEGIN, GESTURE_MODAL_CANCEL, gesture_modal_end(), GESTURE_MODAL_FLIP, GESTURE_MODAL_MOVE, GESTURE_MODAL_SELECT, GESTURE_MODAL_SNAP, gesture_straightline_apply(), wmGesture::is_active, wmGesture::is_active_prev, MOUSEMOVE, wmGesture::move, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::type, wmGesture::use_flip, wmGesture::use_snap, wmEvent::val, wmGesture::winrct, wm_gesture_straightline_do_angle_snap(), wm_gesture_tag_redraw(), rcti::xmax, rcti::xmin, wmEvent::xy, rcti::ymax, and rcti::ymin.
Referenced by IMAGE_OT_sample_line(), mesh_bisect_modal(), and paint_weight_gradient_modal().
int WM_gesture_straightline_oneshot_modal | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | event | ||
) |
Definition at line 874 of file wm_gesture_ops.c.
References BLI_rcti_translate(), C, CTX_wm_window(), wmOperator::customdata, wmGesture::customdata, EVT_MODAL_MAP, GESTURE_MODAL_BEGIN, GESTURE_MODAL_CANCEL, GESTURE_MODAL_DESELECT, gesture_modal_end(), GESTURE_MODAL_FLIP, GESTURE_MODAL_IN, GESTURE_MODAL_MOVE, GESTURE_MODAL_OUT, GESTURE_MODAL_SELECT, GESTURE_MODAL_SNAP, gesture_straightline_apply(), wmGesture::is_active, wmGesture::is_active_prev, wmGesture::modal_state, MOUSEMOVE, wmGesture::move, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::type, wmGesture::use_flip, wmGesture::use_snap, wmEvent::val, wmGesture::wait_for_input, wmGesture::winrct, wm_gesture_straightline_do_angle_snap(), wm_gesture_tag_redraw(), rcti::xmax, rcti::xmin, wmEvent::xy, rcti::ymax, and rcti::ymin.
Referenced by PAINT_OT_mask_line_gesture(), and SCULPT_OT_project_line_gesture().