|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_math_matrix.h"#include "BLI_math_vector_types.hh"#include "BKE_context.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_matrix.hh"#include "GPU_select.hh"#include "GPU_state.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_gizmo_library.hh"#include "ED_screen.hh"#include "ED_transform_snap_object_context.hh"#include "ED_view3d.hh"#include "../gizmo_library_intern.hh"Go to the source code of this file.
Classes | |
| struct | MoveGizmo3D |
| struct | MoveInteraction |
Functions | |
Move Gizmo API | |
| static void | GIZMO_GT_move_3d (wmGizmoType *gzt) |
| void | ED_gizmotypes_move_3d () |
Move Gizmo | |
Simple gizmo to move and translate. 3D Gizmo, also works in 2D views.
| |
| #define | MVAL_MAX_PX_DIST 12.0f |
| #define | RING_2D_RESOLUTION 32 |
| static void | gizmo_move_matrix_basis_get (const wmGizmo *gz, float r_matrix[4][4]) |
| static int | gizmo_move_modal (bContext *C, wmGizmo *gz, const wmEvent *event, eWM_GizmoFlagTweak tweak_flag) |
| static void | move_geom_draw (const wmGizmo *gz, const float color[4], const bool select, const int draw_options) |
| static void | move3d_get_translate (const wmGizmo *gz, const wmEvent *event, const ARegion *region, float co_delta[3]) |
| static void | move3d_draw_intern (const bContext *C, wmGizmo *gz, const bool select, const bool highlight) |
| static void | gizmo_move_draw_select (const bContext *C, wmGizmo *gz, int select_id) |
| static void | gizmo_move_draw (const bContext *C, wmGizmo *gz) |
| static void | gizmo_move_exit (bContext *C, wmGizmo *gz, const bool cancel) |
| static int | gizmo_move_invoke (bContext *C, wmGizmo *gz, const wmEvent *event) |
| static int | gizmo_move_test_select (bContext *C, wmGizmo *gz, const int mval[2]) |
| static void | gizmo_move_property_update (wmGizmo *gz, wmGizmoProperty *gz_prop) |
| static int | gizmo_move_cursor_get (wmGizmo *) |
| #define MVAL_MAX_PX_DIST 12.0f |
Definition at line 46 of file move3d_gizmo.cc.
Referenced by gizmo_move_modal().
| #define RING_2D_RESOLUTION 32 |
Definition at line 47 of file move3d_gizmo.cc.
Referenced by move_geom_draw().
| void ED_gizmotypes_move_3d | ( | ) |
Definition at line 472 of file move3d_gizmo.cc.
References GIZMO_GT_move_3d(), and WM_gizmotype_append().
Referenced by ED_spacetypes_init().
|
static |
Definition at line 433 of file move3d_gizmo.cc.
References wmGizmoType::cursor_get, wmGizmoType::draw, wmGizmoType::draw_select, ED_GIZMO_MOVE_DRAW_FLAG_ALIGN_VIEW, ED_GIZMO_MOVE_DRAW_FLAG_FILL, ED_GIZMO_MOVE_DRAW_FLAG_FILL_SELECT, ED_GIZMO_MOVE_STYLE_CROSS_2D, ED_GIZMO_MOVE_STYLE_RING_2D, wmGizmoType::exit, gizmo_move_cursor_get(), gizmo_move_draw(), gizmo_move_draw_select(), gizmo_move_exit(), gizmo_move_invoke(), gizmo_move_matrix_basis_get(), gizmo_move_modal(), gizmo_move_property_update(), gizmo_move_test_select(), wmGizmoType::idname, wmGizmoType::invoke, wmGizmoType::matrix_basis_get, wmGizmoType::modal, PROP_FLOAT, wmGizmoType::property_update, RNA_def_boolean(), RNA_def_enum(), RNA_def_enum_flag(), wmGizmoType::srna, wmGizmoType::struct_size, wmGizmoType::test_select, and WM_gizmotype_target_property_def().
Referenced by ED_gizmotypes_move_3d().
Definition at line 424 of file move3d_gizmo.cc.
References WM_CURSOR_NSEW_SCROLL.
Referenced by GIZMO_GT_move_3d().
Definition at line 223 of file move3d_gizmo.cc.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, move3d_draw_intern(), wmGizmo::state, WM_GIZMO_STATE_HIGHLIGHT, and WM_GIZMO_STATE_MODAL.
Referenced by GIZMO_GT_move_3d().
Definition at line 217 of file move3d_gizmo.cc.
References GPU_select_load_id(), and move3d_draw_intern().
Referenced by GIZMO_GT_move_3d().
Definition at line 319 of file move3d_gizmo.cc.
References ED_transform_snap_object_context_destroy(), MoveInteraction::init, wmGizmo::interaction_data, MoveInteraction::prop_co, MoveInteraction::snap_context_v3d, WM_gizmo_target_property_anim_autokey(), WM_gizmo_target_property_find(), WM_gizmo_target_property_float_set_array(), and WM_gizmo_target_property_is_valid().
Referenced by GIZMO_GT_move_3d().
Definition at line 353 of file move3d_gizmo.cc.
References BLI_assert, copy_v3_v3(), CTX_data_scene(), CTX_wm_area(), ED_transform_snap_object_context_create(), MoveInteraction::init, wmGizmo::interaction_data, MoveInteraction::matrix_final, MEM_callocN, MoveInteraction::mval, OPERATOR_RUNNING_MODAL, MoveInteraction::prop_co, wmGizmo::ptr, RNA_boolean_get(), MoveInteraction::snap_context_v3d, SPACE_VIEW3D, WM_gizmo_calc_matrix_final(), WM_gizmo_target_property_find(), WM_gizmo_target_property_float_get_array(), and WM_gizmo_target_property_is_valid().
Referenced by GIZMO_GT_move_3d().
Definition at line 55 of file move3d_gizmo.cc.
References add_v3_v3(), and copy_m4_m4().
Referenced by GIZMO_GT_move_3d().
|
static |
Definition at line 235 of file move3d_gizmo.cc.
References add_v3_v3v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_wm_area(), CTX_wm_region(), CTX_wm_view3d(), ED_region_tag_redraw_editor_overlays(), ED_transform_snap_object_project_view3d(), wmGizmo::flag, float, gizmo_window_project_2d(), MoveInteraction::init, wmGizmo::interaction_data, invert_m4_m4(), wmGizmo::matrix_space, MOUSEMOVE, move3d_get_translate(), mul_v2_fl(), mul_v3_fl(), mul_v3_m4v3(), MoveInteraction::mval, wmEvent::mval, MVAL_MAX_PX_DIST, OPERATOR_RUNNING_MODAL, params, MoveInteraction::prev, MoveInteraction::prop_co, wmGizmo::scale_final, SCE_SNAP_TARGET_ALL, SCE_SNAP_TO_EDGE, SCE_SNAP_TO_FACE, SCE_SNAP_TO_VERTEX, MoveInteraction::snap_context_v3d, SNAP_GEOM_EDIT, SNAP_OCCLUSION_AS_SEEM, SPACE_VIEW3D, sub_v2_v2v2(), MoveInteraction::tweak_flag, wmEvent::type, WM_GIZMO_DRAW_NO_SCALE, WM_gizmo_target_property_find(), WM_gizmo_target_property_float_set_array(), WM_gizmo_target_property_is_valid(), WM_GIZMO_TWEAK_PRECISE, WM_GIZMO_TWEAK_SNAP, and zero_v3().
Referenced by GIZMO_GT_move_3d().
|
static |
Definition at line 413 of file move3d_gizmo.cc.
References WM_gizmo_target_property_float_get_array(), WM_gizmo_target_property_is_valid(), and zero_v3().
Referenced by GIZMO_GT_move_3d().
Definition at line 393 of file move3d_gizmo.cc.
References wmGizmo::flag, gizmo_window_project_2d(), len_squared_v2(), wmGizmo::scale_final, and WM_GIZMO_DRAW_NO_SCALE.
Referenced by GIZMO_GT_move_3d().
|
static |
Definition at line 169 of file move3d_gizmo.cc.
References CTX_wm_region_view3d(), ED_GIZMO_MOVE_DRAW_FLAG_ALIGN_VIEW, gizmo_color_get(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_push(), MoveInteraction::init, wmGizmo::interaction_data, MoveInteraction::matrix_final, move_geom_draw(), mul_m4_m4m4(), normalize_m4_m4(), wmGizmo::ptr, RNA_enum_get(), select(), transpose_m4(), RegionView3D::viewmat, WM_gizmo_calc_matrix_final(), and zero_v3().
Referenced by gizmo_move_draw(), and gizmo_move_draw_select().
|
static |
Definition at line 145 of file move3d_gizmo.cc.
References copy_m3_m4(), ED_view3d_calc_zfac(), ED_view3d_win_to_delta(), MoveInteraction::init, wmGizmo::interaction_data, invert_m3(), wmGizmo::matrix_space, mul_m3_v3(), mul_v3_mat3_m4v3(), MoveInteraction::mval, and MoveInteraction::prop_co.
Referenced by gizmo_move_modal().
|
static |
Definition at line 85 of file move3d_gizmo.cc.
References BLI_assert, col, ED_GIZMO_MOVE_DRAW_FLAG_FILL, ED_GIZMO_MOVE_DRAW_FLAG_FILL_SELECT, ED_GIZMO_MOVE_STYLE_CROSS_2D, ED_GIZMO_MOVE_STYLE_RING_2D, wmGizmo::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), imm_draw_circle_fill_3d(), imm_draw_circle_wire_3d(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2fv(), immUniformColor4fv(), immVertex3f(), immVertexFormat(), wmGizmo::line_width, M_SQRT1_2, pos, wmGizmo::ptr, RING_2D_RESOLUTION, RNA_enum_get(), wmGizmo::scale_final, select(), UNUSED_VARS, WM_GIZMO_DRAW_NO_SCALE, and wm_gizmo_geometryinfo_draw().
Referenced by move3d_draw_intern().