46#define MVAL_MAX_PX_DIST 12.0f
47#define RING_2D_RESOLUTION 32
88 const int draw_options)
90#ifdef USE_GIZMO_CUSTOM_DIAL
126 const float radius_diag =
M_SQRT1_2 * radius;
151 const float xy_delta[2] = {
152 event->mval[0] - inter->
init.
mval[0],
153 event->mval[1] - inter->
init.
mval[1],
163 float matrix_space_inv[3][3];
172 const bool highlight)
178 float matrix_final[4][4];
179 float matrix_align[4][4];
188 float matrix_final_unit[4][4];
252 float mval_proj_init[2], mval_proj_curr[2];
260 sub_v2_v2v2(prop_delta, mval_proj_curr, mval_proj_init);
264 prop_delta[2] = 0.0f;
296 float matrix_space_inv[4][4];
322 bool use_reset_value =
false;
323 const float *reset_value =
nullptr;
328 use_reset_value =
true;
333 if (use_reset_value) {
359 inter->
init.
mval[0] =
event->mval[0];
360 inter->
init.
mval[1] =
event->mval[1];
395 float point_local[2];
436 gzt->
idname =
"GIZMO_GT_move_3d";
455 {0,
nullptr, 0,
nullptr,
nullptr},
461 {0,
nullptr, 0,
nullptr,
nullptr},
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
void mul_m3_v3(const float M[3][3], float r[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void normalize_m4_m4(float rmat[4][4], const float mat[4][4]) ATTR_NONNULL()
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
void transpose_m4(float R[4][4])
void mul_v3_mat3_m4v3(float r[3], const float mat[4][4], const float vec[3])
bool invert_m3(float mat[3][3])
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
#define SCE_SNAP_TO_VERTEX
@ ED_GIZMO_MOVE_STYLE_CROSS_2D
@ ED_GIZMO_MOVE_STYLE_RING_2D
@ ED_GIZMO_MOVE_DRAW_FLAG_FILL_SELECT
@ ED_GIZMO_MOVE_DRAW_FLAG_FILL
@ ED_GIZMO_MOVE_DRAW_FLAG_ALIGN_VIEW
void ED_region_tag_redraw_editor_overlays(ARegion *region)
SnapObjectContext * ED_transform_snap_object_context_create(Scene *scene, int flag)
void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx)
eSnapMode ED_transform_snap_object_project_view3d(SnapObjectContext *sctx, Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const eSnapMode snap_to, const SnapObjectParams *params, const float init_co[3], const float mval[2], const float prev_co[3], float *dist_px, float r_loc[3], float r_no[3])
void ED_view3d_win_to_delta(const ARegion *region, const float xy_delta[2], float zfac, float r_out[3])
float ED_view3d_calc_zfac(const RegionView3D *rv3d, const float co[3])
#define GPU_matrix_mul(x)
bool GPU_select_load_id(unsigned int id)
@ GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_viewport_size_get_f(float coords[4])
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
@ WM_GIZMO_STATE_HIGHLIGHT
draw_view in_light_buf[] float
void wm_gizmo_geometryinfo_draw(const GizmoGeomInfo *info, const bool, const float color[4])
void gizmo_color_get(const wmGizmo *gz, bool highlight, float r_color[4])
bool gizmo_window_project_2d(bContext *C, const wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2])
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
static int gizmo_move_test_select(bContext *C, wmGizmo *gz, const int mval[2])
void ED_gizmotypes_move_3d()
static void gizmo_move_exit(bContext *C, wmGizmo *gz, const bool cancel)
static void gizmo_move_property_update(wmGizmo *gz, wmGizmoProperty *gz_prop)
static void gizmo_move_draw_select(const bContext *C, wmGizmo *gz, int select_id)
static int gizmo_move_modal(bContext *C, wmGizmo *gz, const wmEvent *event, eWM_GizmoFlagTweak tweak_flag)
static void GIZMO_GT_move_3d(wmGizmoType *gzt)
static void move_geom_draw(const wmGizmo *gz, const float color[4], const bool select, const int draw_options)
static void gizmo_move_draw(const bContext *C, wmGizmo *gz)
static void move3d_draw_intern(const bContext *C, wmGizmo *gz, const bool select, const bool highlight)
static int gizmo_move_cursor_get(wmGizmo *)
static void gizmo_move_matrix_basis_get(const wmGizmo *gz, float r_matrix[4][4])
static int gizmo_move_invoke(bContext *C, wmGizmo *gz, const wmEvent *event)
static void move3d_get_translate(const wmGizmo *gz, const wmEvent *event, const ARegion *region, float co_delta[3])
#define RING_2D_RESOLUTION
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
static void init(bNodeTree *, bNode *node)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
SnapObjectContext * snap_context_v3d
struct MoveInteraction::@367241051162044113154133034134135325071244275136 init
eWM_GizmoFlagTweak tweak_flag
struct MoveInteraction::@060132130263225135300064241075025357300176376164 prev
wmGizmoFnMatrixBasisGet matrix_basis_get
wmGizmoFnTestSelect test_select
wmGizmoFnCursorGet cursor_get
wmGizmoFnDrawSelect draw_select
wmGizmoFnPropertyUpdate property_update
void WM_gizmo_calc_matrix_final(const wmGizmo *gz, float r_mat[4][4])
void WM_gizmo_target_property_anim_autokey(bContext *C, const wmGizmo *, wmGizmoProperty *gz_prop)
bool WM_gizmo_target_property_is_valid(const wmGizmoProperty *gz_prop)
void WM_gizmo_target_property_float_get_array(const wmGizmo *gz, wmGizmoProperty *gz_prop, float *value)
void WM_gizmotype_target_property_def(wmGizmoType *gzt, const char *idname, int data_type, int array_length)
void WM_gizmo_target_property_float_set_array(bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, const float *value)
wmGizmoProperty * WM_gizmo_target_property_find(wmGizmo *gz, const char *idname)
void WM_gizmotype_append(void(*gtfunc)(wmGizmoType *))