Blender  V3.3
Classes | Macros | Enumerations | Functions
ED_transform.h File Reference

Go to the source code of this file.

Classes

struct  TransformBounds
 
struct  TransformCalcParams
 

Macros

#define P_MIRROR   (1 << 0)
 
#define P_MIRROR_DUMMY   (P_MIRROR | (1 << 9))
 
#define P_PROPORTIONAL   (1 << 1)
 
#define P_ORIENT_AXIS   (1 << 2)
 
#define P_ORIENT_AXIS_ORTHO   (1 << 16)
 
#define P_ORIENT_MATRIX   (1 << 17)
 
#define P_SNAP   (1 << 3)
 
#define P_GEO_SNAP   (P_SNAP | (1 << 4))
 
#define P_ALIGN_SNAP   (P_GEO_SNAP | (1 << 5))
 
#define P_CONSTRAINT   (1 << 6)
 
#define P_OPTIONS   (1 << 7)
 
#define P_CORRECT_UV   (1 << 8)
 
#define P_NO_DEFAULTS   (1 << 10)
 
#define P_NO_TEXSPACE   (1 << 11)
 
#define P_CENTER   (1 << 12)
 
#define P_GPENCIL_EDIT   (1 << 13)
 
#define P_CURSOR_EDIT   (1 << 14)
 
#define P_CLNOR_INVALIDATE   (1 << 15)
 
#define P_VIEW2D_EDGE_PAN   (1 << 16)
 
#define P_POST_TRANSFORM   (1 << 19)
 
#define SNAP_INCREMENTAL_ANGLE   DEG2RAD(5.0)
 

Enumerations

enum  eTfmMode {
  TFM_INIT = -1 , TFM_DUMMY , TFM_TRANSLATION , TFM_ROTATION ,
  TFM_RESIZE , TFM_SKIN_RESIZE , TFM_TOSPHERE , TFM_SHEAR ,
  TFM_BEND , TFM_SHRINKFATTEN , TFM_TILT , TFM_TRACKBALL ,
  TFM_PUSHPULL , TFM_EDGE_CREASE , TFM_VERT_CREASE , TFM_MIRROR ,
  TFM_BONESIZE , TFM_BONE_ENVELOPE , TFM_CURVE_SHRINKFATTEN , TFM_MASK_SHRINKFATTEN ,
  TFM_GPENCIL_SHRINKFATTEN , TFM_BONE_ROLL , TFM_TIME_TRANSLATE , TFM_TIME_SLIDE ,
  TFM_TIME_SCALE , TFM_TIME_EXTEND , TFM_TIME_DUPLICATE , TFM_BAKE_TIME ,
  TFM_DEPRECATED , TFM_BWEIGHT , TFM_ALIGN , TFM_EDGE_SLIDE ,
  TFM_VERT_SLIDE , TFM_SEQ_SLIDE , TFM_BONE_ENVELOPE_DIST , TFM_NORMAL_ROTATION ,
  TFM_GPENCIL_OPACITY
}
 

Functions

void ED_keymap_transform (struct wmKeyConfig *keyconf)
 
void transform_operatortypes (void)
 
bool calculateTransformCenter (struct bContext *C, int centerMode, float cent3d[3], float cent2d[2])
 
void BIF_clearTransformOrientation (struct bContext *C)
 
void BIF_removeTransformOrientation (struct bContext *C, struct TransformOrientation *target)
 
void BIF_removeTransformOrientationIndex (struct bContext *C, int index)
 
bool BIF_createTransformOrientation (struct bContext *C, struct ReportList *reports, const char *name, bool use_view, bool activate, bool overwrite)
 
void BIF_selectTransformOrientation (struct bContext *C, struct TransformOrientation *target)
 
void ED_getTransformOrientationMatrix (struct ViewLayer *view_layer, const struct View3D *v3d, struct Object *ob, struct Object *obedit, short around, float r_orientation_mat[3][3])
 
int BIF_countTransformOrientation (const struct bContext *C)
 
void Transform_Properties (struct wmOperatorType *ot, int flags)
 
void ED_transform_calc_orientation_from_type (const struct bContext *C, float r_mat[3][3])
 
short ED_transform_calc_orientation_from_type_ex (const struct Scene *scene, struct ViewLayer *view_layer, const struct View3D *v3d, const struct RegionView3D *rv3d, struct Object *ob, struct Object *obedit, short orientation_index, int pivot_point, float r_mat[3][3])
 
void VIEW3D_GGT_xform_gizmo (struct wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_gizmo_context (struct wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_cage (struct wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_shear (struct wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_extrude (struct wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_xform_callbacks_set (struct wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set (struct wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_resize_callbacks_set (struct wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_rotate_callbacks_set (struct wmGizmoGroupType *gzgt)
 
int ED_transform_calc_gizmo_stats (const struct bContext *C, const struct TransformCalcParams *params, struct TransformBounds *tbounds)
 
bool ED_transform_snap_sequencer_to_closest_strip_calc (struct Scene *scene, struct ARegion *region, int frame_1, int frame_2, int *r_snap_distance, float *r_snap_frame)
 
void ED_draw_sequencer_snap_point (struct bContext *C, float snap_point)
 

Macro Definition Documentation

◆ P_ALIGN_SNAP

#define P_ALIGN_SNAP   (P_GEO_SNAP | (1 << 5))

Definition at line 116 of file ED_transform.h.

◆ P_CENTER

#define P_CENTER   (1 << 12)

Definition at line 122 of file ED_transform.h.

◆ P_CLNOR_INVALIDATE

#define P_CLNOR_INVALIDATE   (1 << 15)

Definition at line 125 of file ED_transform.h.

◆ P_CONSTRAINT

#define P_CONSTRAINT   (1 << 6)

Definition at line 117 of file ED_transform.h.

◆ P_CORRECT_UV

#define P_CORRECT_UV   (1 << 8)

Definition at line 119 of file ED_transform.h.

◆ P_CURSOR_EDIT

#define P_CURSOR_EDIT   (1 << 14)

Definition at line 124 of file ED_transform.h.

◆ P_GEO_SNAP

#define P_GEO_SNAP   (P_SNAP | (1 << 4))

Definition at line 115 of file ED_transform.h.

◆ P_GPENCIL_EDIT

#define P_GPENCIL_EDIT   (1 << 13)

Definition at line 123 of file ED_transform.h.

◆ P_MIRROR

#define P_MIRROR   (1 << 0)

Definition at line 108 of file ED_transform.h.

◆ P_MIRROR_DUMMY

#define P_MIRROR_DUMMY   (P_MIRROR | (1 << 9))

Definition at line 109 of file ED_transform.h.

◆ P_NO_DEFAULTS

#define P_NO_DEFAULTS   (1 << 10)

Definition at line 120 of file ED_transform.h.

◆ P_NO_TEXSPACE

#define P_NO_TEXSPACE   (1 << 11)

Definition at line 121 of file ED_transform.h.

◆ P_OPTIONS

#define P_OPTIONS   (1 << 7)

Definition at line 118 of file ED_transform.h.

◆ P_ORIENT_AXIS

#define P_ORIENT_AXIS   (1 << 2)

Definition at line 111 of file ED_transform.h.

◆ P_ORIENT_AXIS_ORTHO

#define P_ORIENT_AXIS_ORTHO   (1 << 16)

Definition at line 112 of file ED_transform.h.

◆ P_ORIENT_MATRIX

#define P_ORIENT_MATRIX   (1 << 17)

Definition at line 113 of file ED_transform.h.

◆ P_POST_TRANSFORM

#define P_POST_TRANSFORM   (1 << 19)

Definition at line 128 of file ED_transform.h.

◆ P_PROPORTIONAL

#define P_PROPORTIONAL   (1 << 1)

Definition at line 110 of file ED_transform.h.

◆ P_SNAP

#define P_SNAP   (1 << 3)

Definition at line 114 of file ED_transform.h.

◆ P_VIEW2D_EDGE_PAN

#define P_VIEW2D_EDGE_PAN   (1 << 16)

Definition at line 126 of file ED_transform.h.

◆ SNAP_INCREMENTAL_ANGLE

#define SNAP_INCREMENTAL_ANGLE   DEG2RAD(5.0)

Definition at line 172 of file ED_transform.h.

Enumeration Type Documentation

◆ eTfmMode

enum eTfmMode
Enumerator
TFM_INIT 
TFM_DUMMY 
TFM_TRANSLATION 
TFM_ROTATION 
TFM_RESIZE 
TFM_SKIN_RESIZE 
TFM_TOSPHERE 
TFM_SHEAR 
TFM_BEND 
TFM_SHRINKFATTEN 
TFM_TILT 
TFM_TRACKBALL 
TFM_PUSHPULL 
TFM_EDGE_CREASE 
TFM_VERT_CREASE 
TFM_MIRROR 
TFM_BONESIZE 
TFM_BONE_ENVELOPE 
TFM_CURVE_SHRINKFATTEN 
TFM_MASK_SHRINKFATTEN 
TFM_GPENCIL_SHRINKFATTEN 
TFM_BONE_ROLL 
TFM_TIME_TRANSLATE 
TFM_TIME_SLIDE 
TFM_TIME_SCALE 
TFM_TIME_EXTEND 
TFM_TIME_DUPLICATE 
TFM_BAKE_TIME 
TFM_DEPRECATED 
TFM_BWEIGHT 
TFM_ALIGN 
TFM_EDGE_SLIDE 
TFM_VERT_SLIDE 
TFM_SEQ_SLIDE 
TFM_BONE_ENVELOPE_DIST 
TFM_NORMAL_ROTATION 
TFM_GPENCIL_OPACITY 

Definition at line 27 of file ED_transform.h.

Function Documentation

◆ BIF_clearTransformOrientation()

void BIF_clearTransformOrientation ( struct bContext C)

◆ BIF_countTransformOrientation()

int BIF_countTransformOrientation ( const struct bContext C)

Referenced by initTransInfo().

◆ BIF_createTransformOrientation()

bool BIF_createTransformOrientation ( struct bContext C,
struct ReportList reports,
const char *  name,
bool  use_view,
bool  activate,
bool  overwrite 
)

◆ BIF_removeTransformOrientation()

void BIF_removeTransformOrientation ( struct bContext C,
struct TransformOrientation target 
)

◆ BIF_removeTransformOrientationIndex()

void BIF_removeTransformOrientationIndex ( struct bContext C,
int  index 
)

◆ BIF_selectTransformOrientation()

void BIF_selectTransformOrientation ( struct bContext C,
struct TransformOrientation target 
)

◆ calculateTransformCenter()

bool calculateTransformCenter ( struct bContext C,
int  centerMode,
float  cent3d[3],
float  cent2d[2] 
)

◆ ED_draw_sequencer_snap_point()

void ED_draw_sequencer_snap_point ( struct bContext C,
float  snap_point 
)

Definition at line 387 of file transform_snap_sequencer.c.

References C, drawSnapping(), MOD_SNAP, POINT_INIT, SPACE_SEQ, t, TARGET_INIT, and TFM_SEQ_SLIDE.

Referenced by draw_seq_in_view().

◆ ED_getTransformOrientationMatrix()

void ED_getTransformOrientationMatrix ( struct ViewLayer view_layer,
const struct View3D v3d,
struct Object ob,
struct Object obedit,
short  around,
float  r_orientation_mat[3][3] 
)

Referenced by view_axis_exec().

◆ ED_keymap_transform()

void ED_keymap_transform ( struct wmKeyConfig keyconf)

◆ ED_transform_calc_gizmo_stats()

int ED_transform_calc_gizmo_stats ( const struct bContext C,
const struct TransformCalcParams params,
struct TransformBounds tbounds 
)

Centroid, bound-box, of selection.

Returns total items selected.

Referenced by gizmo_mesh_extrude_refresh(), and WIDGETGROUP_tool_generic_refresh().

◆ ED_transform_calc_orientation_from_type()

void ED_transform_calc_orientation_from_type ( const struct bContext C,
float  r_mat[3][3] 
)

◆ ED_transform_calc_orientation_from_type_ex()

short ED_transform_calc_orientation_from_type_ex ( const struct Scene scene,
struct ViewLayer view_layer,
const struct View3D v3d,
const struct RegionView3D rv3d,
struct Object ob,
struct Object obedit,
short  orientation_index,
int  pivot_point,
float  r_mat[3][3] 
)
Note
The resulting matrix may not be orthogonal, callers that depend on r_mat to be orthogonal should use orthogonalize_m3.

A non orthogonal matrix may be returned when:

Referenced by ED_transform_calc_gizmo_stats(), edbm_select_axis_exec(), knife_constrain_axis(), transform_mode_default_modal_orientation_set(), v3d_cursor_snap_update(), and view3d_ruler_item_mousemove().

◆ ED_transform_snap_sequencer_to_closest_strip_calc()

bool ED_transform_snap_sequencer_to_closest_strip_calc ( struct Scene scene,
struct ARegion region,
int  frame_1,
int  frame_2,
int *  r_snap_distance,
float r_snap_frame 
)

Iterates over all the strips and finds the closest snapping candidate of either frame_1 or frame_2. The closest snapping candidate will be the closest start or end frame of an existing strip.

Returns
True if there was anything to snap to.

Definition at line 368 of file transform_snap_sequencer.c.

References scene, SEQ_tool_settings_snap_mode_get(), t, TransConvertType_Sequencer, transform_snap_sequencer_to_closest_strip_ex(), and validSnap().

Referenced by update_overlay_strip_position_data().

◆ ED_widgetgroup_gizmo2d_resize_callbacks_set()

void ED_widgetgroup_gizmo2d_resize_callbacks_set ( struct wmGizmoGroupType gzgt)

◆ ED_widgetgroup_gizmo2d_rotate_callbacks_set()

void ED_widgetgroup_gizmo2d_rotate_callbacks_set ( struct wmGizmoGroupType gzgt)

◆ ED_widgetgroup_gizmo2d_xform_callbacks_set()

void ED_widgetgroup_gizmo2d_xform_callbacks_set ( struct wmGizmoGroupType gzgt)

◆ ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set()

void ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set ( struct wmGizmoGroupType gzgt)

◆ transform_operatortypes()

void transform_operatortypes ( void  )

◆ Transform_Properties()

void Transform_Properties ( struct wmOperatorType ot,
int  flags 
)

Definition at line 588 of file transform_ops.c.

References BLT_I18NCONTEXT_ID_CURVE_LEGACY, NULL, ot, P_ALIGN_SNAP, P_CENTER, P_CONSTRAINT, P_CORRECT_UV, P_CURSOR_EDIT, P_GEO_SNAP, P_GPENCIL_EDIT, P_MIRROR, P_MIRROR_DUMMY, P_NO_DEFAULTS, P_NO_TEXSPACE, P_OPTIONS, P_ORIENT_AXIS, P_ORIENT_AXIS_ORTHO, P_ORIENT_MATRIX, P_POST_TRANSFORM, P_PROPORTIONAL, P_SNAP, P_VIEW2D_EDGE_PAN, PROP_ENUM, PROP_ENUM_FLAG, PROP_FLOAT, PROP_HIDDEN, PROP_NONE, PROP_SKIP_SAVE, PROP_XYZ, RNA_def_boolean(), RNA_def_boolean_vector(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_float(), RNA_def_float_matrix(), RNA_def_float_vector(), RNA_def_property(), RNA_def_property_array(), RNA_def_property_enum_default(), RNA_def_property_enum_items(), RNA_def_property_flag(), RNA_def_property_translation_context(), RNA_def_property_ui_text(), rna_enum_axis_xyz_items, rna_enum_proportional_falloff_items, rna_enum_snap_element_items, rna_enum_snap_source_items, rna_TransformOrientation_itemf(), SCE_SNAP_MODE_INCREMENT, wmOperatorType::srna, T_PROP_SIZE_MAX, and T_PROP_SIZE_MIN.

Referenced by MESH_OT_extrude_context(), MESH_OT_extrude_edges_indiv(), MESH_OT_extrude_faces_indiv(), MESH_OT_extrude_region(), MESH_OT_extrude_verts_indiv(), MESH_OT_polybuild_delete_at_cursor(), MESH_OT_polybuild_face_at_cursor(), MESH_OT_polybuild_split_at_cursor(), MESH_OT_polybuild_transform_at_cursor(), MESH_OT_rip(), MESH_OT_rip_edge(), TRANSFORM_OT_bbone_resize(), TRANSFORM_OT_bend(), TRANSFORM_OT_edge_bevelweight(), TRANSFORM_OT_edge_crease(), TRANSFORM_OT_edge_slide(), TRANSFORM_OT_mirror(), TRANSFORM_OT_push_pull(), TRANSFORM_OT_resize(), TRANSFORM_OT_rotate(), TRANSFORM_OT_rotate_normal(), TRANSFORM_OT_seq_slide(), TRANSFORM_OT_shear(), TRANSFORM_OT_shrink_fatten(), TRANSFORM_OT_skin_resize(), TRANSFORM_OT_tilt(), TRANSFORM_OT_tosphere(), TRANSFORM_OT_trackball(), TRANSFORM_OT_transform(), TRANSFORM_OT_translate(), TRANSFORM_OT_vert_crease(), TRANSFORM_OT_vert_slide(), and UV_OT_rip().

◆ VIEW3D_GGT_xform_cage()

void VIEW3D_GGT_xform_cage ( struct wmGizmoGroupType gzgt)

◆ VIEW3D_GGT_xform_extrude()

void VIEW3D_GGT_xform_extrude ( struct wmGizmoGroupType gzgt)

◆ VIEW3D_GGT_xform_gizmo()

void VIEW3D_GGT_xform_gizmo ( struct wmGizmoGroupType gzgt)

◆ VIEW3D_GGT_xform_gizmo_context()

void VIEW3D_GGT_xform_gizmo_context ( struct wmGizmoGroupType gzgt)

◆ VIEW3D_GGT_xform_shear()

void VIEW3D_GGT_xform_shear ( struct wmGizmoGroupType gzgt)