Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "ED_gizmo_library.h"
#include "ED_screen.h"
#include "ED_transform_snap_object_context.h"
#include "ED_view3d.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "../gizmo_library_intern.h"
Go to the source code of this file.
Classes | |
struct | SnapGizmo3D |
Snap Gizmo | |
Snap gizmo which exposes the location, normal and index in the props. 3D Gizmo | |
typedef struct SnapGizmo3D | SnapGizmo3D |
static void | snap_gizmo_snap_elements_update (SnapGizmo3D *snap_gizmo) |
typedef struct SnapGizmo3D SnapGizmo3D |
Definition at line 412 of file snap3d_gizmo.c.
References GIZMO_GT_snap_3d(), and WM_gizmotype_append().
Referenced by ED_spacetypes_init().
SnapObjectContext* ED_gizmotypes_snap_3d_context_ensure | ( | Scene * | scene, |
wmGizmo * | UNUSEDgz | ||
) |
Definition at line 59 of file snap3d_gizmo.c.
References ED_view3d_cursor_snap_context_ensure(), and scene.
Referenced by view3d_ruler_item_mousemove().
void ED_gizmotypes_snap_3d_data_get | ( | const struct bContext * | C, |
wmGizmo * | gz, | ||
float | r_loc[3], | ||
float | r_nor[3], | ||
int | r_elem_index[3], | ||
eSnapMode * | r_snap_elem | ||
) |
Definition at line 94 of file snap3d_gizmo.c.
References C, copy_v3_v3(), copy_v3_v3_int(), CTX_wm_manager(), CTX_wm_region(), ED_view3d_cursor_snap_data_get(), ED_view3d_cursor_snap_data_update(), V3DSnapCursorData::elem_index, wmWindow::eventstate, V3DSnapCursorData::loc, V3DSnapCursorData::nor, NULL, V3DSnapCursorData::snap_elem, SnapGizmo3D::snap_state, wmWindowManager::winactive, ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Referenced by view3d_ruler_item_mousemove().
Definition at line 70 of file snap3d_gizmo.c.
References V3DSnapCursorState::flag.
Definition at line 64 of file snap3d_gizmo.c.
References V3DSnapCursorState::flag.
Referenced by WIDGETGROUP_ruler_setup().
Definition at line 76 of file snap3d_gizmo.c.
References V3DSnapCursorState::flag.
Definition at line 82 of file snap3d_gizmo.c.
References ED_view3d_cursor_snap_data_get(), and V3DSnapCursorData::is_snap_invert.
Definition at line 88 of file snap3d_gizmo.c.
References ED_view3d_cursor_snap_data_get(), and V3DSnapCursorData::is_enabled.
Referenced by view3d_ruler_item_mousemove().
|
static |
Definition at line 315 of file snap3d_gizmo.c.
References BLI_assert, wmGizmoType::draw, free(), wmGizmoType::free, gizmo_snap_rna_location_get_fn(), gizmo_snap_rna_location_set_fn(), gizmo_snap_rna_normal_get_fn(), gizmo_snap_rna_prevpoint_get_fn(), gizmo_snap_rna_prevpoint_set_fn(), gizmo_snap_rna_snap_elem_index_get_fn(), gizmo_snap_rna_snap_elements_force_get_fn(), gizmo_snap_rna_snap_elements_force_set_fn(), wmGizmoType::idname, wmGizmoType::invoke, wmGizmoType::modal, NULL, PROP_ENUM, RNA_def_enum_flag(), RNA_def_float_array(), RNA_def_float_translation(), RNA_def_float_vector_xyz(), RNA_def_int_vector(), RNA_def_property_enum_funcs_runtime(), RNA_def_property_float_array_funcs_runtime(), RNA_def_property_int_array_funcs_runtime(), rna_enum_snap_element_items, RNA_pointer_create(), RNA_property_enum_items(), RNA_struct_find_property(), SCE_SNAP_MODE_EDGE, SCE_SNAP_MODE_FACE_RAYCAST, SCE_SNAP_MODE_VERTEX, wmGizmoType::setup, snap_gizmo_draw(), snap_gizmo_free(), snap_gizmo_invoke(), snap_gizmo_modal(), snap_gizmo_setup(), snap_gizmo_test_select(), wmGizmoType::srna, wmGizmoType::struct_size, wmGizmoType::test_select, and WM_gizmotype_target_property_def().
Referenced by ED_gizmotypes_snap_3d().
|
static |
Definition at line 138 of file snap3d_gizmo.c.
References blender::compositor::area(), PointerRNA::data, G_MAIN, LISTBASE_FOREACH, NULL, ptr, RGN_TYPE_WINDOW, SPACE_VIEW3D, and WM_gizmomap_group_list().
Referenced by gizmo_snap_state_from_rna_get().
|
static |
Definition at line 206 of file snap3d_gizmo.c.
References copy_v3_v3(), ED_view3d_cursor_snap_data_get(), and V3DSnapCursorData::loc.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 214 of file snap3d_gizmo.c.
References copy_v3_v3(), ED_view3d_cursor_snap_data_get(), and V3DSnapCursorData::loc.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 222 of file snap3d_gizmo.c.
References copy_v3_v3(), ED_view3d_cursor_snap_data_get(), and V3DSnapCursorData::nor.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 188 of file snap3d_gizmo.c.
References copy_v3_v3(), gizmo_snap_state_from_rna_get(), V3DSnapCursorState::prevpoint, and ptr.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 198 of file snap3d_gizmo.c.
References ED_view3d_cursor_snap_prevpoint_set(), gizmo_snap_state_from_rna_get(), and ptr.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 230 of file snap3d_gizmo.c.
References copy_v3_v3_int(), ED_view3d_cursor_snap_data_get(), and V3DSnapCursorData::elem_index.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 173 of file snap3d_gizmo.c.
References gizmo_snap_state_from_rna_get(), ptr, and V3DSnapCursorState::snap_elem_force.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 180 of file snap3d_gizmo.c.
References gizmo_snap_state_from_rna_get(), ptr, and V3DSnapCursorState::snap_elem_force.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 163 of file snap3d_gizmo.c.
References ED_view3d_cursor_snap_state_get(), gizmo_snap_rna_find_operator(), ptr, and SnapGizmo3D::snap_state.
Referenced by gizmo_snap_rna_prevpoint_get_fn(), gizmo_snap_rna_prevpoint_set_fn(), gizmo_snap_rna_snap_elements_force_get_fn(), and gizmo_snap_rna_snap_elements_force_set_fn().
Definition at line 256 of file snap3d_gizmo.c.
Referenced by GIZMO_GT_snap_3d().
Definition at line 307 of file snap3d_gizmo.c.
References ED_view3d_cursor_snap_deactive(), and SnapGizmo3D::snap_state.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 300 of file snap3d_gizmo.c.
References OPERATOR_RUNNING_MODAL.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 292 of file snap3d_gizmo.c.
References OPERATOR_RUNNING_MODAL.
Referenced by GIZMO_GT_snap_3d().
Definition at line 244 of file snap3d_gizmo.c.
References wmGizmo::color, V3DSnapCursorState::color_point, V3DSnapCursorState::draw_plane, V3DSnapCursorState::draw_point, ED_view3d_cursor_snap_active(), wmGizmo::flag, V3DSnapCursorState::gzgrp_type, wmGizmo::parent_gzgroup, rgba_float_to_uchar(), SnapGizmo3D::snap_state, wmGizmoGroup::type, and WM_GIZMO_NO_TOOLTIP.
Referenced by GIZMO_GT_snap_3d().
|
static |
Definition at line 44 of file snap3d_gizmo.c.
References SnapGizmo3D::gizmo, wmGizmoProperty::prop, wmGizmoProperty::ptr, RNA_property_enum_get(), V3DSnapCursorState::snap_elem_force, SnapGizmo3D::snap_state, and WM_gizmo_target_property_find().
Referenced by snap_gizmo_test_select().
Definition at line 261 of file snap3d_gizmo.c.
References C, CTX_wm_manager(), CTX_wm_region(), ED_view3d_cursor_snap_data_get(), ED_view3d_cursor_snap_data_update(), wmWindow::eventstate, NULL, SCE_SNAP_MODE_NONE, V3DSnapCursorData::snap_elem, snap_gizmo_snap_elements_update(), SnapGizmo3D::snap_state, wmWindowManager::winactive, ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Referenced by GIZMO_GT_snap_3d().