|
Blender V4.3
|
#include <cstring>#include "BLI_buffer.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BLI_math_bits.h"#include "BLI_math_vector.h"#include "BLI_math_vector_types.hh"#include "BLI_rect.h"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_main.hh"#include "ED_screen.hh"#include "ED_select_utils.hh"#include "ED_view3d.hh"#include "GPU_framebuffer.hh"#include "GPU_matrix.hh"#include "GPU_platform.hh"#include "GPU_select.hh"#include "GPU_state.hh"#include "GPU_viewport.hh"#include "MEM_guardedalloc.h"#include "WM_api.hh"#include "WM_types.hh"#include "wm_event_system.hh"#include "UI_interface.hh"#include "DEG_depsgraph.hh"#include "wm_gizmo_intern.hh"#include "wm_gizmo_wmapi.hh"Go to the source code of this file.
Enumerations | |
| enum | eWM_GizmoFlagGroupTypeGlobalFlag { WM_GIZMOMAPTYPE_GLOBAL_UPDATE_INIT = (1 << 0) , WM_GIZMOMAPTYPE_GLOBAL_UPDATE_REMOVE = (1 << 1) , WM_GIZMOTYPE_GLOBAL_UPDATE_REMOVE = (1 << 2) , WM_GIZMOTYPE_GLOBAL_REINIT_ALL = (1 << 3) } |
| enum | { GIZMOMAP_IS_PREPARE_DRAW = (1 << 0) , GIZMOMAP_IS_REFRESH_CALLBACK = (1 << 1) } |
Variables | |
| static ListBase | gizmomaptypes = {nullptr, nullptr} |
| static eWM_GizmoFlagGroupTypeGlobalFlag | wm_gzmap_type_update_flag |
| anonymous enum |
Gizmo-map update tagging.
| Enumerator | |
|---|---|
| GIZMOMAP_IS_PREPARE_DRAW | gizmomap_prepare_drawing has run. |
| GIZMOMAP_IS_REFRESH_CALLBACK | |
Definition at line 86 of file wm_gizmo_map.cc.
Update when gizmo-map types change.
Definition at line 59 of file wm_gizmo_map.cc.
|
static |
Definition at line 513 of file wm_gizmo_map.cc.
References wmGizmoType::draw_select, wmGizmo::flag, wmGizmoGroupType::flag, GPU_DEPTH_LESS_EQUAL, GPU_depth_mask(), GPU_DEPTH_NONE, GPU_depth_test(), wmGizmo::parent_gzgroup, wmGizmo::select_bias, wmGizmo::type, wmGizmoGroup::type, WM_GIZMO_SELECT_BACKGROUND, and WM_GIZMOGROUPTYPE_DEPTH_3D.
Referenced by gizmo_find_intersected_3d_intern().
|
static |
Try to find a 3D gizmo at screen-space coordinate co. Uses OpenGL picking.
Definition at line 652 of file wm_gizmo_map.cc.
References ARRAY_SIZE, BLI_assert, CTX_wm_region(), wmGizmoType::draw_select, gizmo_find_intersected_3d_intern(), GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE, GPU_framebuffer_bind(), GPU_framebuffer_ensure_config, GPU_framebuffer_free(), GPU_framebuffer_restore(), GPU_viewport_depth_texture(), int, result, wmGizmoType::test_select, wmGizmo::type, view3d_operator_needs_opengl(), and WM_draw_region_get_viewport().
Referenced by wm_gizmomap_highlight_find().
|
static |
Definition at line 569 of file wm_gizmo_map.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BLI_assert, BLI_rcti_init_pt_radius(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), depsgraph, dot_v3v3(), ED_view3d_draw_setup_view(), ED_view3d_win_to_vector(), wmGizmo::flag, float, FLT_MAX, gizmo_draw_select_3d_loop(), GPU_matrix_unproject_3fv(), GPU_select_begin(), GPU_select_buffer_near(), GPU_select_end(), GPU_SELECT_NEAREST_FIRST_PASS, GPU_SELECT_NEAREST_SECOND_PASS, GPUSelectResult::id, wmGizmo::scale_final, wmGizmo::select_bias, GPUSelectBuffer::storage, sub_v3_v3(), UINT_MAX, and WM_GIZMO_DRAW_NO_SCALE.
Referenced by gizmo_find_intersected_3d().
|
static |
Definition at line 340 of file wm_gizmo_map.cc.
References BLI_addhead(), BLI_genericNodeN(), GIZMOMAP_IS_PREPARE_DRAW, wmGizmoMap::update_flag, wm_gizmo_is_visible(), WM_GIZMO_IS_VISIBLE_DRAW, WM_GIZMO_IS_VISIBLE_UPDATE, and wm_gizmo_update().
Referenced by gizmomap_prepare_drawing().
|
static |
Definition at line 894 of file wm_gizmo_map.cc.
References wmGizmoGroupType::flag, wmGizmo::parent_gzgroup, wmGizmoGroup::type, and WM_GIZMOGROUPTYPE_SELECT.
Referenced by wm_gizmomap_select_all_intern().
|
static |
Update gizmos of gzmap to prepare for drawing. Adds all gizmos that should be drawn to list draw_gizmos, note that added items need freeing.
Definition at line 369 of file wm_gizmo_map.cc.
References BLI_listbase_is_empty(), gizmo_prepare_drawing(), GIZMOMAP_IS_REFRESH_CALLBACK, wmGizmoMap::groups, wmGizmoMap::gzmap_context, wmGizmoMap::is_init, LISTBASE_FOREACH, wmGizmoMap::modal, wmGizmo::parent_gzgroup, wmGizmoMap::update_flag, WM_gizmo_group_type_poll(), WM_gizmogroup_ensure_init(), wm_gizmogroup_is_visible_in_drawstep(), WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL, and WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE.
Referenced by WM_gizmomap_draw().
|
static |
Draw all visible gizmos in gzmap. Uses global draw_gizmos listbase.
Definition at line 439 of file wm_gizmo_map.cc.
References BLI_freelinkN(), BLI_listbase_is_empty(), wmGizmoType::draw, ListBase::first, wmGizmoGroupType::flag, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_line_smooth(), GPU_polygon_smooth(), wmGizmoMap::groups, wmGizmo::next, wmGizmo::parent_gzgroup, wmGizmo::state, wmGizmo::type, wmGizmoGroup::type, WM_GIZMO_STATE_HIGHLIGHT, and WM_GIZMOGROUPTYPE_DEPTH_3D.
Referenced by WM_gizmomap_draw().
| void WM_gizmoconfig_update | ( | Main * | bmain | ) |
Run in case new types have been added (runs often, early exit where possible). Follows WM_keyconfig_update conventions.
Definition at line 1338 of file wm_gizmo_map.cc.
References ED_region_tag_redraw_editor_overlays(), ListBase::first, G, gizmomaptypes, wmGizmoMap::groups, LISTBASE_FOREACH, Main::screens, wmGizmoMap::tag_remove_group, wm_gizmogroup_free(), WM_GIZMOMAPTYPE_GLOBAL_UPDATE_INIT, WM_GIZMOMAPTYPE_GLOBAL_UPDATE_REMOVE, WM_gizmomaptype_group_init_runtime(), WM_gizmomaptype_group_init_runtime_keymap(), WM_gizmomaptype_group_unlink(), WM_GIZMOMAPTYPE_KEYMAP_INIT, WM_GIZMOMAPTYPE_UPDATE_INIT, WM_GIZMOMAPTYPE_UPDATE_REMOVE, WM_GIZMOTYPE_GLOBAL_REINIT_ALL, WM_GIZMOTYPE_GLOBAL_UPDATE_REMOVE, wm_gzmap_type_update_flag, and WM_reinit_gizmomap_all().
Referenced by wm_event_do_handlers().
| void WM_gizmoconfig_update_tag_group_remove | ( | wmGizmoMap * | gzmap | ) |
Definition at line 1326 of file wm_gizmo_map.cc.
References wmGizmoMap::tag_remove_group, WM_GIZMOTYPE_GLOBAL_UPDATE_REMOVE, and wm_gzmap_type_update_flag.
Referenced by WM_gizmo_group_tag_remove().
| void WM_gizmoconfig_update_tag_group_type_init | ( | wmGizmoMapType * | gzmap_type, |
| wmGizmoGroupType * | gzgt ) |
Definition at line 1307 of file wm_gizmo_map.cc.
References wmGizmoGroupType::type_update_flag, wmGizmoMapType::type_update_flag, WM_GIZMOMAPTYPE_GLOBAL_UPDATE_INIT, WM_GIZMOMAPTYPE_KEYMAP_INIT, WM_GIZMOMAPTYPE_UPDATE_INIT, and wm_gzmap_type_update_flag.
Referenced by toolsystem_ref_link(), and WM_gizmo_group_type_add_ptr_ex().
| void WM_gizmoconfig_update_tag_group_type_remove | ( | wmGizmoMapType * | gzmap_type, |
| wmGizmoGroupType * | gzgt ) |
Definition at line 1316 of file wm_gizmo_map.cc.
References wmGizmoGroupType::type_update_flag, wmGizmoMapType::type_update_flag, WM_GIZMOMAPTYPE_GLOBAL_UPDATE_REMOVE, WM_GIZMOMAPTYPE_UPDATE_REMOVE, and wm_gzmap_type_update_flag.
Referenced by WM_gizmo_group_type_unlink_delayed_ptr_ex().
| void WM_gizmoconfig_update_tag_reinit_all | ( | ) |
Definition at line 1333 of file wm_gizmo_map.cc.
References WM_GIZMOTYPE_GLOBAL_REINIT_ALL, and wm_gzmap_type_update_flag.
Referenced by WM_script_tag_reload().
| void WM_gizmomap_add_handlers | ( | ARegion * | region, |
| wmGizmoMap * | gzmap ) |
Definition at line 809 of file wm_gizmo_map.cc.
References BLI_addtail(), BLI_assert, wmEventHandler_Gizmo::gizmo_map, wmEventHandler_Gizmo::head, LISTBASE_FOREACH, MEM_callocN, wmEventHandler::type, and WM_HANDLER_TYPE_GIZMO.
Referenced by ed_default_handlers().
| bool WM_gizmomap_cursor_set | ( | const wmGizmoMap * | gzmap, |
| wmWindow * | win ) |
Definition at line 993 of file wm_gizmo_map.cc.
References wmGizmoType::cursor_get, wmGizmoMap::gzmap_context, wmGizmoMap::highlight, wmGizmo::type, and WM_cursor_set().
Referenced by ED_region_cursor_set().
| bool wm_gizmomap_deselect_all | ( | wmGizmoMap * | gzmap | ) |
Deselect all selected gizmos in gzmap.
Definition at line 875 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmoMap::select, wm_gizmo_select_set_ex(), and wm_gizmomap_select_array_clear().
Referenced by gizmo_select_invoke(), and WM_gizmomap_select_all().
| void WM_gizmomap_draw | ( | wmGizmoMap * | gzmap, |
| const bContext * | C, | ||
| const eWM_GizmoFlagMapDrawStep | drawstep ) |
Definition at line 498 of file wm_gizmo_map.cc.
References BLI_assert, BLI_listbase_is_empty(), gizmomap_prepare_drawing(), gizmos_draw_list(), and WM_gizmo_context_check_drawstep().
Referenced by action_main_region_draw(), clip_main_region_draw(), draw_timeline_gizmos(), DRW_draw_gizmo_2d(), DRW_draw_gizmo_3d(), image_main_region_draw(), blender::ed::space_node::node_draw_space(), and sequencer_preview_region_draw().
| eWM_GizmoFlagMapDrawStep WM_gizmomap_drawstep_from_gizmo_group | ( | const wmGizmoGroup * | gzgroup | ) |
Definition at line 301 of file wm_gizmo_map.cc.
References wmGizmoGroupType::flag, wmGizmoGroup::type, WM_GIZMOGROUPTYPE_3D, WM_GIZMOMAP_DRAWSTEP_2D, and WM_GIZMOMAP_DRAWSTEP_3D.
Referenced by WM_gizmo_group_refresh(), wm_gizmomap_highlight_find(), and wm_gizmomap_modal_set().
|
static |
Definition at line 189 of file wm_gizmo_map.cc.
References BLI_assert, BLI_listbase_is_empty(), ListBase::first, wmGizmoMap::groups, wm_gizmogroup_free(), and wm_gizmomap_select_array_clear().
Referenced by WM_gizmomap_reinit(), and wm_gizmomap_remove().
| wmGizmo * WM_gizmomap_get_modal | ( | const wmGizmoMap * | gzmap | ) |
Definition at line 248 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, and wmGizmoMap::modal.
Referenced by gizmogroup_xform_find(), transform_gizmo_3d_model_from_constraint_and_mode_init(), transform_gizmo_3d_model_from_constraint_and_mode_set(), transform_mode_snap_source_init(), WIDGETGROUP_gizmo_draw_prepare(), and WIDGETGROUP_gizmo_refresh().
|
static |
Creates and returns idname hash table for (visible) gizmos in gzmap
| poll | Polling function for excluding gizmos. |
| data | Custom data passed to poll |
TODO(@ideasman42): this uses unreliable order, best we use an iterator function instead of a hash.
Definition at line 278 of file wm_gizmo_map.cc.
References BLI_ghash_insert(), BLI_ghash_ptr_new(), wmGizmoMap::groups, hash, LISTBASE_FOREACH, and WM_gizmo_group_type_poll().
Referenced by wm_gizmomap_select_all_intern().
| wmGizmoGroup * WM_gizmomap_group_find | ( | wmGizmoMap * | gzmap, |
| const char * | idname ) |
Definition at line 219 of file wm_gizmo_map.cc.
References WM_gizmogrouptype_find(), and WM_gizmomap_group_find_ptr().
Referenced by edbm_preselect_or_active(), gizmo_mesh_spin_redo_setup(), ringcut_invoke(), transform_from_gizmo_invoke(), UNUSED_FUNCTION_WITH_RETURN_TYPE(), view3d_ruler_add_invoke(), view3d_ruler_remove_invoke(), and wm_event_get_keymap_from_toolsystem_ex().
| wmGizmoGroup * WM_gizmomap_group_find_ptr | ( | wmGizmoMap * | gzmap, |
| const wmGizmoGroupType * | gzgt ) |
Definition at line 228 of file wm_gizmo_map.cc.
References wmGizmoMap::groups, and LISTBASE_FOREACH.
Referenced by snap_cursor_poll(), snap_cursor_poll(), and WM_gizmomap_group_find().
| const ListBase * WM_gizmomap_group_list | ( | wmGizmoMap * | gzmap | ) |
Definition at line 238 of file wm_gizmo_map.cc.
References wmGizmoMap::groups.
Referenced by gizmo_find_from_properties(), gizmogroup_xform_find(), wm_handlers_do_gizmo_handler(), and wm_region_test_gizmo_do_draw().
| ListBase * wm_gizmomap_groups_get | ( | wmGizmoMap * | gzmap | ) |
Definition at line 1180 of file wm_gizmo_map.cc.
References wmGizmoMap::groups.
| void wm_gizmomap_handler_context_gizmo | ( | bContext * | C, |
| wmEventHandler_Gizmo * | handler ) |
Definition at line 988 of file wm_gizmo_map.cc.
Referenced by wm_handlers_do_gizmo_handler().
| void wm_gizmomap_handler_context_op | ( | bContext * | C, |
| wmEventHandler_Op * | handler ) |
Prepare context for gizmo handling (but only if area/region is part of screen). Version of wm_handler_op_context for gizmos.
Definition at line 954 of file wm_gizmo_map.cc.
References wmEventHandler_Op::area, wmEventHandler_Op::context, CTX_wm_area_set(), CTX_wm_region_set(), CTX_wm_screen(), printf, and wmEventHandler_Op::region.
Referenced by wm_gizmomaps_handled_modal_update().
| wmGizmo * wm_gizmomap_highlight_find | ( | wmGizmoMap * | gzmap, |
| bContext * | C, | ||
| const wmEvent * | event, | ||
| int * | r_part ) |
Try to find a gizmo under the mouse position. 2D intersections have priority over 3D ones (could check for smallest screen-space distance but not needed right now).
Definition at line 738 of file wm_gizmo_map.cc.
References ARRAY_SIZE, BLI_buffer_declare_static, BLI_buffer_free, BLI_BUFFER_NOP, copy_v2_v2_int(), CTX_wm_manager(), CTX_wm_region(), gizmo_find_intersected_3d(), GIZMOMAP_IS_REFRESH_CALLBACK, wmGizmoMap::groups, KM_CLICK_DRAG, LISTBASE_FOREACH, wmEvent::modifier, wmEvent::mval, wmGizmoMap::update_flag, wmEvent::val, WM_event_drag_start_mval(), WM_gizmo_context_check_drawstep(), WM_gizmo_group_refresh(), WM_gizmo_group_type_poll(), wm_gizmogroup_find_intersected_gizmo(), WM_GIZMOGROUP_INIT_SETUP, wm_gizmogroup_intersectable_gizmos_to_list(), WM_GIZMOMAP_DRAWSTEP_2D, WM_GIZMOMAP_DRAWSTEP_3D, WM_gizmomap_drawstep_from_gizmo_group(), and WM_GIZMOMAP_DRAWSTEP_MAX.
Referenced by wm_handlers_do_gizmo_handler().
| wmGizmo * wm_gizmomap_highlight_get | ( | wmGizmoMap * | gzmap | ) |
Definition at line 1051 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, and wmGizmoMap::highlight.
Referenced by wm_event_get_keymap_from_toolsystem_ex(), WM_gizmo_group_refresh(), wm_handler_operator_call(), and wm_handlers_do_gizmo_handler().
| bool wm_gizmomap_highlight_set | ( | wmGizmoMap * | gzmap, |
| const bContext * | C, | ||
| wmGizmo * | gz, | ||
| int | part ) |
Definition at line 1004 of file wm_gizmo_map.cc.
References CTX_wm_region(), CTX_wm_window(), wmWindow::cursor, wmGizmoType::cursor_get, ED_region_tag_redraw_editor_overlays(), wmGizmoMap::gzmap_context, wmGizmoMap::highlight, wmGizmo::highlight_part, wmGizmoMap::last_cursor, wmGizmo::state, wmGizmo::type, WM_cursor_set(), and WM_GIZMO_STATE_HIGHLIGHT.
Referenced by WM_gizmo_highlight_set(), wm_gizmo_select_and_highlight(), WM_gizmo_unlink(), wm_gizmogroup_free(), wm_gizmomap_select_all_intern(), wm_gizmomaps_handled_modal_update(), WM_gizmomaptype_group_init_runtime_with_region(), and wm_handlers_do_gizmo_handler().
| bool WM_gizmomap_is_any_selected | ( | const wmGizmoMap * | gzmap | ) |
Definition at line 243 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::len, and wmGizmoMap::select.
Referenced by viewselected_exec(), and wm_handlers_do_gizmo_handler().
| void WM_gizmomap_message_subscribe | ( | const bContext * | C, |
| wmGizmoMap * | gzmap, | ||
| ARegion * | region, | ||
| wmMsgBus * | mbus ) |
Definition at line 1185 of file wm_gizmo_map.cc.
References wmGizmoMap::groups, LISTBASE_FOREACH, WM_gizmo_group_type_poll(), WM_GIZMO_HIDDEN, WM_gizmo_target_property_subscribe_all(), and WM_GIZMOGROUP_INIT_SETUP.
Referenced by ED_region_message_subscribe().
| bool WM_gizmomap_minmax | ( | const wmGizmoMap * | gzmap, |
| bool | use_hidden, | ||
| bool | use_select, | ||
| float | r_min[3], | ||
| float | r_max[3] ) |
Definition at line 253 of file wm_gizmo_map.cc.
References BLI_assert_msg, wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmo::matrix_basis, minmax_v3v3_v3(), and wmGizmoMap::select.
Referenced by viewselected_exec().
| wmGizmo * wm_gizmomap_modal_get | ( | wmGizmoMap * | gzmap | ) |
Definition at line 1169 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, and wmGizmoMap::modal.
Referenced by wm_gizmomaps_handled_modal_update(), and wm_handlers_do_gizmo_handler().
| void wm_gizmomap_modal_set | ( | wmGizmoMap * | gzmap, |
| bContext * | C, | ||
| wmGizmo * | gz, | ||
| const wmEvent * | event, | ||
| bool | enable ) |
Caller should call exit when (enable == False).
Definition at line 1056 of file wm_gizmo_map.cc.
References BLI_assert, copy_v2_v2_int(), CTX_wm_region(), CTX_wm_window(), wmGizmo::custom_modal, ED_region_tag_redraw_editor_overlays(), ELEM, wmGizmoMap::event_grabcursor, wmGizmoMap::event_xy, wmGizmo::flag, GIZMOMAP_IS_REFRESH_CALLBACK, wmWindow::grabcursor, wmGizmoMap::groups, wmGizmoMap::gzmap_context, wmGizmo::highlight_part, wmGizmo::interaction_data, wmGizmoType::invoke, wmGizmoGroupType::invoke_prepare, wmTabletData::is_motion_absolute, LISTBASE_FOREACH, MEM_SAFE_FREE, wmGizmoMap::modal, wmGizmoType::modal, OPERATOR_RUNNING_MODAL, wmGizmo::parent_gzgroup, wmGizmo::state, wmEvent::tablet, wmGizmo::type, wmGizmoGroup::type, wmGizmoOpElem::type, UNPACK2, wmGizmoMap::update_flag, WM_cursor_grab_disable(), WM_cursor_grab_enable(), WM_cursor_warp(), WM_CURSOR_WRAP_XY, WM_event_add_mousemove(), WM_GIZMO_MOVE_CURSOR, WM_gizmo_operator_get(), WM_gizmo_operator_invoke(), WM_GIZMO_STATE_MODAL, wm_gizmogroup_is_visible_in_drawstep(), WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL, WM_gizmomap_drawstep_from_gizmo_group(), WM_GIZMOMAP_DRAWSTEP_MAX, wm_gizmomap_modal_set(), WM_tooltip_clear(), and wmEvent::xy.
Referenced by gizmo_tweak_finish(), gizmo_tweak_start(), gizmo_tweak_start_and_finish(), WM_gizmo_modal_set_from_setup(), WM_gizmo_modal_set_while_modal(), WM_gizmo_unlink(), wm_gizmogroup_free(), wm_gizmomap_modal_set(), and wm_gizmomaps_handled_modal_update().
| wmGizmoMap * WM_gizmomap_new_from_type | ( | const wmGizmoMapType_Params * | gzmap_params | ) |
Creates a gizmo-map with all registered gizmos for that type
Definition at line 181 of file wm_gizmo_map.cc.
References MEM_callocN, wm_gizmomap_new_from_type_ex(), and WM_gizmomaptype_ensure().
Referenced by ed_default_handlers().
|
static |
Definition at line 166 of file wm_gizmo_map.cc.
References wmGizmoMapType::grouptype_refs, wmGizmoMap::is_init, LISTBASE_FOREACH, wmGizmoMap::type, wm_gizmogroup_new_from_type(), and WM_gizmomap_tag_refresh().
Referenced by WM_gizmomap_new_from_type(), and WM_gizmomap_reinit().
| void WM_gizmomap_reinit | ( | wmGizmoMap * | gzmap | ) |
Re-create the gizmos (use when changing theme settings).
Definition at line 211 of file wm_gizmo_map.cc.
References wmGizmoMap::type, wm_gizmomap_free_data(), and wm_gizmomap_new_from_type_ex().
Referenced by WM_reinit_gizmomap_all().
| void wm_gizmomap_remove | ( | wmGizmoMap * | gzmap | ) |
Definition at line 205 of file wm_gizmo_map.cc.
References MEM_freeN(), and wm_gizmomap_free_data().
Referenced by WM_init().
| bool WM_gizmomap_select_all | ( | bContext * | C, |
| wmGizmoMap * | gzmap, | ||
| int | action ) |
Select/Deselect all selectable gizmos in gzmap.
TODO: select all by type.
Definition at line 931 of file wm_gizmo_map.cc.
References BLI_assert_unreachable, CTX_wm_window(), SEL_DESELECT, SEL_SELECT, WM_event_add_mousemove(), wm_gizmomap_deselect_all(), and wm_gizmomap_select_all_intern().
|
static |
Select all selectable gizmos in gzmap.
Definition at line 903 of file wm_gizmo_map.cc.
References BLI_assert, BLI_ghash_free(), BLI_ghash_len(), BLI_ghashIterator_getValue(), GHASH_ITER_INDEX, gizmo_selectable_poll(), wmGizmoMap::gzmap_context, hash, wmGizmo::highlight_part, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmoMap::select, WM_GIZMO_HIDDEN, WM_GIZMO_HIDDEN_SELECT, WM_gizmo_select_set(), WM_gizmomap_gizmo_hash_new(), wm_gizmomap_highlight_set(), and wm_gizmomap_select_array_ensure_len_alloc().
Referenced by WM_gizmomap_select_all().
| void wm_gizmomap_select_array_clear | ( | wmGizmoMap * | gzmap | ) |
Definition at line 109 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmoMapSelectState::len_alloc, MEM_SAFE_FREE, and wmGizmoMap::select.
Referenced by wm_gizmomap_deselect_all(), wm_gizmomap_free_data(), and wm_gizmomap_select_array_shrink().
|
static |
Definition at line 99 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, len, len_alloc, wmGizmoMapSelectState::len_alloc, MEM_reallocN, and wmGizmoMap::select.
Referenced by wm_gizmomap_select_all_intern().
| void wm_gizmomap_select_array_push_back | ( | wmGizmoMap * | gzmap, |
| wmGizmo * | gz ) |
Definition at line 133 of file wm_gizmo_map.cc.
References BLI_assert, wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmoMapSelectState::len_alloc, MEM_reallocN, and wmGizmoMap::select.
Referenced by wm_gizmo_select_set_ex().
| void wm_gizmomap_select_array_remove | ( | wmGizmoMap * | gzmap, |
| wmGizmo * | gz ) |
Definition at line 145 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmoMap::select, and wm_gizmomap_select_array_shrink().
Referenced by wm_gizmo_select_set_ex().
| void wm_gizmomap_select_array_shrink | ( | wmGizmoMap * | gzmap, |
| int | len_subtract ) |
Definition at line 117 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmoMapSelectState::len_alloc, MEM_reallocN, wmGizmoMap::select, and wm_gizmomap_select_array_clear().
Referenced by wm_gizmomap_select_array_remove().
| wmGizmo ** wm_gizmomap_selected_get | ( | wmGizmoMap * | gzmap, |
| int * | r_selected_len ) |
Definition at line 1174 of file wm_gizmo_map.cc.
References wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, and wmGizmoMap::select.
| bool WM_gizmomap_tag_delay_refresh_for_tweak_check | ( | wmGizmoMap * | gzmap | ) |
Definition at line 330 of file wm_gizmo_map.cc.
References wmGizmoMap::groups, and LISTBASE_FOREACH.
Referenced by wm_region_tag_draw_on_gizmo_delay_refresh_for_tweak().
| void WM_gizmomap_tag_refresh | ( | wmGizmoMap * | gzmap | ) |
Definition at line 321 of file wm_gizmo_map.cc.
References GIZMOMAP_IS_PREPARE_DRAW, GIZMOMAP_IS_REFRESH_CALLBACK, wmGizmoMap::update_flag, and WM_GIZMOMAP_DRAWSTEP_MAX.
Referenced by image_main_region_listener(), blender::ed::space_node::node_area_listener(), blender::ed::space_node::node_main_region_init(), blender::ed::space_node::node_region_listener(), sequencer_main_region_listener(), sequencer_preview_region_listener(), view3d_main_region_listener(), WM_gizmo_do_msg_notify_tag_refresh(), wm_gizmomap_new_from_type_ex(), wm_handlers_do_gizmo_handler(), and WM_init().
| void WM_gizmomap_tag_refresh_drawstep | ( | wmGizmoMap * | gzmap, |
| const eWM_GizmoFlagMapDrawStep | drawstep ) |
Definition at line 313 of file wm_gizmo_map.cc.
References BLI_assert, GIZMOMAP_IS_PREPARE_DRAW, GIZMOMAP_IS_REFRESH_CALLBACK, wmGizmoMap::update_flag, and WM_GIZMOMAP_DRAWSTEP_MAX.
Referenced by WM_gizmo_group_refresh().
| ARegion * WM_gizmomap_tooltip_init | ( | bContext * | C, |
| ARegion * | region, | ||
| int * | pass, | ||
| double * | pass_delay, | ||
| bool * | r_exit_on_event ) |
Definition at line 1214 of file wm_gizmo_map.cc.
References wmGizmoGroupType::flag, wmGizmoMap::gzmap_context, wmGizmoMap::highlight, wmGizmo::parent_gzgroup, wmGizmoGroup::type, UI_tooltip_create_from_gizmo(), and WM_GIZMOGROUPTYPE_3D.
Referenced by wm_handlers_do_gizmo_handler().
| void wm_gizmomaps_handled_modal_update | ( | bContext * | C, |
| wmEvent * | event, | ||
| wmEventHandler_Op * | handler ) |
Definition at line 828 of file wm_gizmo_map.cc.
References BLI_assert, wmEventHandler_Op::context, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), wmGizmo::custom_modal, wmGizmoType::exit, ARegion::gizmo_map, wmGizmo::highlight_part, wmGizmoType::modal, wmEventHandler_Op::op, OPERATOR_RUNNING_MODAL, wmEventHandler_Op::region, wmGizmo::type, wmGizmoOpElem::type, wmOperator::type, UNUSED_VARS_NDEBUG, WM_gizmo_operator_get(), wm_gizmomap_handler_context_op(), wm_gizmomap_highlight_set(), wm_gizmomap_modal_get(), and wm_gizmomap_modal_set().
Referenced by wm_handler_operator_call().
| wmGizmoMapType * WM_gizmomaptype_ensure | ( | const wmGizmoMapType_Params * | gzmap_params | ) |
Definition at line 1252 of file wm_gizmo_map.cc.
References BLI_addhead(), gizmomaptypes, MEM_callocN, wmGizmoMapType::regionid, wmGizmoMapType_Params::regionid, wmGizmoMapType::spaceid, wmGizmoMapType_Params::spaceid, and WM_gizmomaptype_find().
Referenced by clip_gizmos(), ED_gizmo_poll_or_unlink_delayed_from_tool_ex(), image_widgets(), blender::ed::space_node::node_widgets(), sequencer_gizmos(), toolsystem_ref_link(), view3d_widgets(), WM_gizmo_group_type_add_ptr(), WM_gizmo_group_type_ensure_ptr(), WM_gizmo_group_type_reinit_ptr(), WM_gizmo_group_type_remove_ptr(), WM_gizmo_group_type_unlink_delayed_ptr(), WM_gizmomap_new_from_type(), and wm_handler_operator_call().
| wmGizmoMapType * WM_gizmomaptype_find | ( | const wmGizmoMapType_Params * | gzmap_params | ) |
Definition at line 1239 of file wm_gizmo_map.cc.
References gizmomaptypes, LISTBASE_FOREACH, wmGizmoMapType_Params::regionid, and wmGizmoMapType_Params::spaceid.
Referenced by WM_gizmo_group_remove_by_tool(), and WM_gizmomaptype_ensure().
| void wm_gizmomaptypes_free | ( | ) |
Definition at line 1269 of file wm_gizmo_map.cc.
References ListBase::first, gizmomaptypes, MEM_freeN(), wmGizmoMapType::next, and WM_gizmomaptype_group_free().
Referenced by WM_exit_ex().
| void wm_gizmos_keymap | ( | wmKeyConfig * | keyconf | ) |
Initialize key-maps for all existing gizmo-groups
Definition at line 1290 of file wm_gizmo_map.cc.
References gizmomaptypes, LISTBASE_FOREACH, wm_gizmogroup_tweak_modal_keymap(), and wm_gizmogrouptype_setup_keymap().
Referenced by wm_window_keymap().
| void WM_reinit_gizmomap_all | ( | Main * | bmain | ) |
Definition at line 1439 of file wm_gizmo_map.cc.
References ED_region_tag_redraw(), ListBase::first, wmGizmoMap::is_init, LISTBASE_FOREACH, Main::screens, and WM_gizmomap_reinit().
Referenced by preferences_reset_default_theme_exec(), WM_gizmoconfig_update(), and wm_userpref_update_when_changed().
|
static |
Store all gizmo-maps here. Anyone who wants to register a gizmo for a certain area type can query the gizmo-map to do so.
Definition at line 53 of file wm_gizmo_map.cc.
Referenced by WM_gizmoconfig_update(), WM_gizmomaptype_ensure(), WM_gizmomaptype_find(), wm_gizmomaptypes_free(), and wm_gizmos_keymap().
|
static |
Definition at line 80 of file wm_gizmo_map.cc.
Referenced by WM_gizmoconfig_update(), WM_gizmoconfig_update_tag_group_remove(), WM_gizmoconfig_update_tag_group_type_init(), WM_gizmoconfig_update_tag_group_type_remove(), and WM_gizmoconfig_update_tag_reinit_all().