Blender V4.3
transform_gizmo.hh File Reference

Go to the source code of this file.

Gizmo

#define GIZMO_AXIS_LINE_WIDTH   2.0f
 
void gizmo_prepare_mat (const bContext *C, RegionView3D *rv3d, const TransformBounds *tbounds)
 
void gizmo_xform_message_subscribe (wmGizmoGroup *gzgroup, wmMsgBus *mbus, Scene *scene, bScreen *screen, ScrArea *area, ARegion *region, void(*type_fn)(wmGizmoGroupType *))
 
void transform_gizmo_3d_model_from_constraint_and_mode_init (TransInfo *t)
 
void transform_gizmo_3d_model_from_constraint_and_mode_set (TransInfo *t)
 
void transform_gizmo_3d_model_from_constraint_and_mode_restore (TransInfo *t)
 

Macro Definition Documentation

◆ GIZMO_AXIS_LINE_WIDTH

#define GIZMO_AXIS_LINE_WIDTH   2.0f

Function Documentation

◆ gizmo_prepare_mat()

void gizmo_prepare_mat ( const bContext * C,
RegionView3D * rv3d,
const TransformBounds * tbounds )

◆ gizmo_xform_message_subscribe()

◆ transform_gizmo_3d_model_from_constraint_and_mode_init()

void transform_gizmo_3d_model_from_constraint_and_mode_init ( TransInfo * t)

Set the T_NO_GIZMO flag.

Note
This maintains the conventional behavior of not displaying the gizmo if the operator has been triggered by shortcuts.

Definition at line 2305 of file transform_gizmo_3d.cc.

References ELEM, TransInfo::flag, g_GGT_xform_gizmo, g_GGT_xform_gizmo_context, ARegion::gizmo_map, wmGizmo::parent_gzgroup, TransInfo::region, T_NO_GIZMO, wmGizmoGroup::type, and WM_gizmomap_get_modal().

Referenced by initTransInfo().

◆ transform_gizmo_3d_model_from_constraint_and_mode_restore()

void transform_gizmo_3d_model_from_constraint_and_mode_restore ( TransInfo * t)

◆ transform_gizmo_3d_model_from_constraint_and_mode_set()

void transform_gizmo_3d_model_from_constraint_and_mode_set ( TransInfo * t)

Change the gizmo and its orientation to match the transform state.

Note
This used while the modal operator is running so changes to the constraint or mode show the gizmo associated with that state, as if it had been the initial gizmo dragged.

Definition at line 2318 of file transform_gizmo_3d.cc.

References BLI_assert_msg, BLI_STATIC_ASSERT, TransInfo::center_global, TransInfo::con, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, TransInfo::context, copy_m4_m3(), copy_v2_v2_int(), copy_v3_v3(), wmGizmoGroup::customdata, ELEM, equals_v3v3(), TransInfo::flag, float, ARegion::gizmo_map, gizmo_refresh_from_matrix(), gizmogroup_xform_find(), GizmoGroup::gizmos, wmGizmo::highlight_part, MouseInput::imval, MAN_AXIS_ROT_C, MAN_AXIS_ROT_X, MAN_AXIS_ROT_Y, MAN_AXIS_ROT_Z, MAN_AXIS_SCALE_C, MAN_AXIS_SCALE_X, MAN_AXIS_SCALE_XY, MAN_AXIS_SCALE_Y, MAN_AXIS_SCALE_YZ, MAN_AXIS_SCALE_Z, MAN_AXIS_SCALE_ZX, MAN_AXIS_TRANS_C, MAN_AXIS_TRANS_X, MAN_AXIS_TRANS_XY, MAN_AXIS_TRANS_Y, MAN_AXIS_TRANS_YZ, MAN_AXIS_TRANS_Z, MAN_AXIS_TRANS_ZX, TransInfo::matrix, TransCon::mode, TransInfo::mode, TransInfo::mouse, O_DEFAULT, O_SCENE, TransInfo::orient, TransInfo::orient_curr, TransInfo::region, ARegion::regiondata, T_NO_GIZMO, TFM_RESIZE, TFM_ROTATION, TFM_TRACKBALL, TFM_TRANSLATION, RegionView3D::twmat, GizmoGroup::twtype, WM_gizmo_highlight_set(), WM_gizmo_modal_set_while_modal(), and WM_gizmomap_get_modal().

Referenced by setNearestAxis(), snapsource_end(), transform_event_modal_constraint(), and transform_mode_init().