|
Blender V4.3
|
#include "BKE_context.hh"#include "BLI_rect.h"#include "BLI_time.h"#include "ED_screen.hh"#include "MEM_guardedalloc.h"#include "RNA_access.hh"#include "RNA_define.hh"#include "UI_view2d.hh"#include "WM_api.hh"#include "WM_types.hh"#include "view2d_intern.hh"Go to the source code of this file.
|
static |
Definition at line 180 of file view2d_edge_pan.cc.
References View2DEdgePanData::area, CTX_wm_window(), View2D::cur, ED_region_tag_redraw_no_rebuild(), View2DEdgePanData::facx, View2DEdgePanData::facy, View2D::keepofs, View2DEdgePanData::region, View2DEdgePanData::screen, UI_view2d_curRect_changed(), UI_view2d_sync(), View2DEdgePanData::v2d, V2D_LOCK_COPY, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, WM_event_add_mousemove(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by UI_view2d_edge_pan_apply().
|
static |
Reset the edge pan timers if the mouse isn't in the scroll zone and start the timers when the mouse enters a scroll zone.
Definition at line 109 of file view2d_edge_pan.cc.
References View2DEdgePanData::edge_pan_start_time_x, and View2DEdgePanData::edge_pan_start_time_y.
Referenced by UI_view2d_edge_pan_apply().
|
static |
Definition at line 140 of file view2d_edge_pan.cc.
References BLI_assert_msg, BLI_rctf_size_x(), BLI_rcti_size_x(), CLAMP, View2DEdgePanData::delay, View2DEdgePanData::edge_pan_start_time_x, View2DEdgePanData::edge_pan_start_time_y, float, View2DEdgePanData::inside_pad, max, View2DEdgePanData::max_speed, min, pad, View2DEdgePanData::region, smootherstep(), View2DEdgePanData::speed_ramp, UI_SCALE_FAC, and View2DEdgePanData::zoom_influence.
Referenced by UI_view2d_edge_pan_apply().
Used to calculate a "fade in" factor for edge panning to make the interaction feel smooth and more purposeful.
Definition at line 134 of file view2d_edge_pan.cc.
References clamp_f().
Referenced by edge_pan_speed().
| void UI_view2d_edge_pan_apply | ( | bContext * | C, |
| View2DEdgePanData * | vpd, | ||
| const int | xy[2] ) |
Definition at line 215 of file view2d_edge_pan.cc.
References BLI_rcti_isect_pt_v(), BLI_rcti_pad(), BLI_time_now_seconds(), View2D::cur, edge_pan_apply_delta(), View2DEdgePanData::edge_pan_last_time, edge_pan_manage_delay_timers(), edge_pan_speed(), View2DEdgePanData::enabled, float, View2DEdgePanData::inside_pad, View2DEdgePanData::limit, View2DEdgePanData::outside_pad, View2DEdgePanData::region, View2DEdgePanData::v2d, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, xy, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by UI_view2d_edge_pan_apply_event().
| void UI_view2d_edge_pan_apply_event | ( | bContext * | C, |
| View2DEdgePanData * | vpd, | ||
| const wmEvent * | event ) |
Apply transform to view using mouse events.
Definition at line 273 of file view2d_edge_pan.cc.
References MOUSEMOVE, wmEvent::type, UI_view2d_edge_pan_apply(), and wmEvent::xy.
Referenced by blender::ed::space_node::node_link_modal(), and view_edge_pan_modal().
| void UI_view2d_edge_pan_cancel | ( | bContext * | C, |
| View2DEdgePanData * | vpd ) |
Definition at line 283 of file view2d_edge_pan.cc.
References View2DEdgePanData::area, CTX_wm_window(), View2D::cur, ED_region_tag_redraw_no_rebuild(), View2DEdgePanData::initial_rect, View2DEdgePanData::region, View2DEdgePanData::screen, UI_view2d_curRect_changed(), UI_view2d_sync(), View2DEdgePanData::v2d, V2D_LOCK_COPY, and WM_event_add_mousemove().
Referenced by blender::ed::transform::flushTransNodes(), blender::ed::space_node::node_link_cancel(), and view2d_edge_pan_loc_compensate().
| void UI_view2d_edge_pan_init | ( | bContext * | C, |
| View2DEdgePanData * | vpd, | ||
| float | inside_pad, | ||
| float | outside_pad, | ||
| float | speed_ramp, | ||
| float | max_speed, | ||
| float | delay, | ||
| float | zoom_influence ) |
Definition at line 52 of file view2d_edge_pan.cc.
References View2DEdgePanData::area, BLI_assert, BLI_rctf_init(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), View2D::cur, View2DEdgePanData::delay, View2DEdgePanData::enabled, View2DEdgePanData::facx, View2DEdgePanData::facy, float, FLT_MAX, View2DEdgePanData::inside_pad, View2DEdgePanData::limit, View2DEdgePanData::max_speed, View2DEdgePanData::outside_pad, View2DEdgePanData::region, View2DEdgePanData::screen, View2DEdgePanData::speed_ramp, UI_view2d_edge_pan_reset(), ARegion::v2d, View2DEdgePanData::v2d, view2d_edge_pan_poll(), ARegion::winrct, and View2DEdgePanData::zoom_influence.
Referenced by blender::ed::transform::createTransNodeData(), createTransSeqData(), and UI_view2d_edge_pan_operator_init().
| void UI_view2d_edge_pan_operator_init | ( | bContext * | C, |
| View2DEdgePanData * | vpd, | ||
| wmOperator * | op ) |
Initialize panning data with operator settings.
Definition at line 382 of file view2d_edge_pan.cc.
References wmOperator::ptr, RNA_float_get(), and UI_view2d_edge_pan_init().
Referenced by blender::ed::space_node::node_link_invoke(), and view_edge_pan_invoke().
| void UI_view2d_edge_pan_operator_properties | ( | wmOperatorType * | ot | ) |
Definition at line 304 of file view2d_edge_pan.cc.
References ot, and UI_view2d_edge_pan_operator_properties_ex().
Referenced by VIEW2D_OT_edge_pan().
| void UI_view2d_edge_pan_operator_properties_ex | ( | wmOperatorType * | ot, |
| float | inside_pad, | ||
| float | outside_pad, | ||
| float | speed_ramp, | ||
| float | max_speed, | ||
| float | delay, | ||
| float | zoom_influence ) |
Definition at line 316 of file view2d_edge_pan.cc.
References ot, RNA_def_float(), and wmOperatorType::srna.
Referenced by blender::ed::space_node::NODE_OT_link(), and UI_view2d_edge_pan_operator_properties().
| void UI_view2d_edge_pan_reset | ( | View2DEdgePanData * | vpd | ) |
Definition at line 97 of file view2d_edge_pan.cc.
References BLI_time_now_seconds(), View2D::cur, View2DEdgePanData::edge_pan_last_time, View2DEdgePanData::edge_pan_start_time_x, View2DEdgePanData::edge_pan_start_time_y, View2DEdgePanData::initial_rect, View2DEdgePanData::region, and ARegion::v2d.
Referenced by UI_view2d_edge_pan_init().
| void UI_view2d_edge_pan_set_limits | ( | View2DEdgePanData * | vpd, |
| float | xmin, | ||
| float | xmax, | ||
| float | ymin, | ||
| float | ymax ) |
Set area which can be panned
Definition at line 91 of file view2d_edge_pan.cc.
References BLI_rctf_init(), and View2DEdgePanData::limit.
Referenced by createTransSeqData().
| bool view2d_edge_pan_poll | ( | bContext * | C | ) |
Definition at line 32 of file view2d_edge_pan.cc.
References CTX_wm_region(), View2D::keepofs, V2D_LOCKOFS_X, and V2D_LOCKOFS_Y.
Referenced by UI_view2d_edge_pan_init(), and VIEW2D_OT_edge_pan().