Blender V4.3
move3d_gizmo.cc File Reference
#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.

  • matrix[0] is derived from Y and Z.
  • matrix[1] currently not used.
  • matrix[2] is the widget direction (for all gizmos).
#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 *)
 

Macro Definition Documentation

◆ MVAL_MAX_PX_DIST

#define MVAL_MAX_PX_DIST   12.0f

Definition at line 46 of file move3d_gizmo.cc.

Referenced by gizmo_move_modal().

◆ RING_2D_RESOLUTION

#define RING_2D_RESOLUTION   32

Definition at line 47 of file move3d_gizmo.cc.

Referenced by move_geom_draw().

Function Documentation

◆ ED_gizmotypes_move_3d()

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().

◆ GIZMO_GT_move_3d()

◆ gizmo_move_cursor_get()

static int gizmo_move_cursor_get ( wmGizmo * )
static

Definition at line 424 of file move3d_gizmo.cc.

References WM_CURSOR_NSEW_SCROLL.

Referenced by GIZMO_GT_move_3d().

◆ gizmo_move_draw()

static void gizmo_move_draw ( const bContext * C,
wmGizmo * gz )
static

◆ gizmo_move_draw_select()

static void gizmo_move_draw_select ( const bContext * C,
wmGizmo * gz,
int select_id )
static

Definition at line 217 of file move3d_gizmo.cc.

References GPU_select_load_id(), and move3d_draw_intern().

Referenced by GIZMO_GT_move_3d().

◆ gizmo_move_exit()

◆ gizmo_move_invoke()

◆ gizmo_move_matrix_basis_get()

static void gizmo_move_matrix_basis_get ( const wmGizmo * gz,
float r_matrix[4][4] )
static

Definition at line 55 of file move3d_gizmo.cc.

References add_v3_v3(), and copy_m4_m4().

Referenced by GIZMO_GT_move_3d().

◆ gizmo_move_modal()

◆ gizmo_move_property_update()

static void gizmo_move_property_update ( wmGizmo * gz,
wmGizmoProperty * gz_prop )
static

◆ gizmo_move_test_select()

static int gizmo_move_test_select ( bContext * C,
wmGizmo * gz,
const int mval[2] )
static

◆ move3d_draw_intern()

◆ move3d_get_translate()

static void move3d_get_translate ( const wmGizmo * gz,
const wmEvent * event,
const ARegion * region,
float co_delta[3] )
static

◆ move_geom_draw()