|
Blender V4.3
|
#include "DNA_screen_types.h"#include "DNA_userdef_types.h"#include "DNA_vec_types.h"#include "DNA_windowmanager_types.h"#include "MEM_guardedalloc.h"#include "BLI_bitmap_draw_2d.h"#include "BLI_blenlib.h"#include "BLI_lasso_2d.hh"#include "BLI_utildefines.h"#include "WM_api.hh"#include "WM_types.hh"#include "wm.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_state.hh"#include "BIF_glutil.hh"Go to the source code of this file.
Classes | |
| struct | LassoFillData |
Gestures (cursor motions) creating, evaluating and drawing, shared between operators.
Definition in file wm_gesture.cc.
|
static |
Definition at line 301 of file wm_gesture.cc.
References BLI_bitmap_draw_2d_poly_v2i_n(), BLI_lasso_boundbox(), BLI_rcti_is_empty(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), BLI_rcti_translate(), wmGesture::customdata, draw_filled_lasso_px_cb(), GPU_blend(), GPU_BLEND_ADDITIVE_PREMULT, GPU_BLEND_NONE, GPU_R8, GPU_SHADER_2D_IMAGE_SHUFFLE_COLOR, GPU_shader_bind(), GPU_shader_get_uniform(), GPU_shader_unbind(), GPU_shader_uniform_float_ex(), immDrawPixelsTexSetup(), immDrawPixelsTexTiled(), MEM_callocN, MEM_freeN(), wmGesture::points, red, state, w(), wmGesture::winrct, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by wm_gesture_draw_lasso(), and wm_gesture_draw_polyline().
Definition at line 356 of file wm_gesture.cc.
References wmGesture::customdata, float, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, imm_draw_circle_wire_2d(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4f(), immVertex2f(), mul_v3_v3fl(), wmGesture::mval, and wmGesture::points.
Referenced by wm_gesture_draw_lasso().
Definition at line 438 of file wm_gesture.cc.
References wmGesture::customdata, float, GPU_SHADER_3D_UNIFORM_COLOR, imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor4f(), interpf(), len_v2v2(), wmGesture::mval, wmGesture::points, blender::wm::gesture::POLYLINE_CLICK_RADIUS, pow2f(), smoothstep(), and UI_SCALE_FAC.
Referenced by wm_gesture_draw_polyline().
| void wm_gesture_draw | ( | wmWindow * | win | ) |
Definition at line 554 of file wm_gesture.cc.
References ListBase::first, wmWindow::gesture, GPU_line_width(), wmGesture::is_active, wmGesture::next, wmGesture::type, wmGesture::winrct, WM_GESTURE_CIRCLE, WM_GESTURE_CROSS_RECT, wm_gesture_draw_circle(), wm_gesture_draw_cross(), wm_gesture_draw_lasso(), wm_gesture_draw_line(), wm_gesture_draw_polyline(), wm_gesture_draw_rect(), WM_GESTURE_LASSO, WM_GESTURE_LINES, WM_GESTURE_POLYLINE, WM_GESTURE_RECT, WM_GESTURE_STRAIGHTLINE, and wmViewport().
Referenced by wm_draw_window_onscreen().
|
static |
Definition at line 254 of file wm_gesture.cc.
References wmGesture::customdata, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), imm_draw_circle_fill_2d(), imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immUniformColor4f(), immVertexFormat(), rcti::xmax, rcti::xmin, and rcti::ymin.
Referenced by wm_gesture_draw().
Definition at line 509 of file wm_gesture.cc.
References wmGesture::customdata, float, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immVertex2f(), immVertexFormat(), WM_window_native_pixel_size(), rcti::xmin, and rcti::ymin.
Referenced by wm_gesture_draw().
|
static |
Definition at line 393 of file wm_gesture.cc.
References wmGesture::customdata, draw_filled_lasso(), draw_lasso_smooth_stroke_indicator(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINE_LOOP, GPU_PRIM_LINE_STRIP, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immVertex2f(), immVertexFormat(), wmGesture::points, wmGesture::type, wmGesture::use_smooth, and WM_GESTURE_LASSO.
Referenced by wm_gesture_draw().
|
static |
Definition at line 179 of file wm_gesture.cc.
References wmGesture::customdata, wmGesture::draw_active_side, float, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immVertex2f(), immVertexFormat(), wmGesture::use_flip, wm_gesture_draw_line_active_side(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by wm_gesture_draw().
|
static |
Definition at line 130 of file wm_gesture.cc.
References add_v2_v2v2(), float, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_SHADER_3D_SMOOTH_COLOR, GPU_vertformat_attr_add(), immAttr4f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), mul_v2_fl(), normalize_v2(), ortho_v2_v2(), sub_v2_v2v2(), UNPACK4, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by wm_gesture_draw_line().
|
static |
Definition at line 470 of file wm_gesture.cc.
References wmGesture::customdata, draw_filled_lasso(), draw_start_vertex_circle(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINE_LOOP, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immVertex2f(), immVertexFormat(), wmGesture::mval, and wmGesture::points.
Referenced by wm_gesture_draw().
|
static |
Definition at line 213 of file wm_gesture.cc.
References wmGesture::customdata, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_COMP_I32, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immUniformColor4f(), immVertexFormat(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by wm_gesture_draw().
Definition at line 98 of file wm_gesture.cc.
References BLI_remlink(), wmGesture::customdata, wmWindow::gesture, MEM_freeN(), wmGesture::user_data, and WM_generic_user_data_free().
Referenced by gesture_modal_end(), WM_gestures_free_all(), and WM_gestures_remove().
| bool WM_gesture_is_modal_first | ( | const wmGesture * | gesture | ) |
Definition at line 120 of file wm_gesture.cc.
References wmGesture::is_active_prev.
Referenced by action_circle_select_exec(), circle_select_exec(), circle_select_exec(), graph_circle_select_exec(), blender::ed::space_node::node_circleselect_exec(), uv_circle_select_exec(), and view3d_circle_select_exec().
| wmGesture * WM_gesture_new | ( | wmWindow * | window, |
| const ARegion * | region, | ||
| const wmEvent * | event, | ||
| int | type ) |
Context checked on having screen, window and area.
Definition at line 37 of file wm_gesture.cc.
References BLI_addtail(), wmGesture::customdata, ELEM, wmGesture::event_keymodifier, wmGesture::event_modifier, wmGesture::event_type, wmWindow::gesture, GESTURE_MODAL_NOP, MEM_callocN, MEM_mallocN, wmGesture::modal_state, wmGesture::move, wmGesture::mval, wmGesture::points, wmGesture::points_alloc, wmGesture::type, wmGenericUserData::use_free, wmGesture::user_data, wmGesture::winrct, WM_event_drag_start_xy(), WM_GESTURE_CIRCLE, WM_GESTURE_CROSS_RECT, WM_GESTURE_LASSO, WM_GESTURE_LINES, WM_GESTURE_POLYLINE, WM_GESTURE_RECT, WM_GESTURE_STRAIGHTLINE, rcti::xmax, rcti::xmin, xy, rcti::ymax, and rcti::ymin.
Referenced by WM_gesture_box_invoke(), WM_gesture_circle_invoke(), WM_gesture_lasso_invoke(), WM_gesture_lines_invoke(), WM_gesture_polyline_invoke(), and WM_gesture_straightline_invoke().
| void wm_gesture_tag_redraw | ( | wmWindow * | win | ) |
Use for line gesture.
Definition at line 592 of file wm_gesture.cc.
References WM_window_get_active_screen().
Referenced by WM_gesture_box_invoke(), WM_gesture_box_modal(), WM_gesture_circle_invoke(), WM_gesture_circle_modal(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), WM_gesture_lines_invoke(), WM_gesture_polyline_invoke(), WM_gesture_polyline_modal(), WM_gesture_straightline_invoke(), WM_gesture_straightline_modal(), and WM_gesture_straightline_oneshot_modal().
| void WM_gestures_free_all | ( | wmWindow * | win | ) |
Definition at line 106 of file wm_gesture.cc.
References ListBase::first, wmWindow::gesture, and WM_gesture_end().
Referenced by wm_window_free().
| void WM_gestures_remove | ( | wmWindow * | win | ) |
Definition at line 113 of file wm_gesture.cc.
References ListBase::first, wmWindow::gesture, and WM_gesture_end().
Referenced by ui_but_drag_init().