Blender V4.3
ED_transform.hh File Reference
#include "BLI_sys_types.h"

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 << 1))
 
#define P_PROPORTIONAL   (1 << 2)
 
#define P_ORIENT_AXIS   (1 << 3)
 
#define P_ORIENT_AXIS_ORTHO   (1 << 4)
 
#define P_ORIENT_MATRIX   (1 << 5)
 
#define P_SNAP   (1 << 6)
 
#define P_GEO_SNAP   (P_SNAP | (1 << 7))
 
#define P_ALIGN_SNAP   (P_GEO_SNAP | (1 << 8))
 
#define P_CONSTRAINT   (1 << 9)
 
#define P_OPTIONS   (1 << 10)
 
#define P_CORRECT_UV   (1 << 11)
 
#define P_NO_DEFAULTS   (1 << 12)
 
#define P_NO_TEXSPACE   (1 << 13)
 
#define P_CENTER   (1 << 14)
 
#define P_GPENCIL_EDIT   (1 << 15)
 
#define P_CURSOR_EDIT   (1 << 16)
 
#define P_VIEW2D_EDGE_PAN   (1 << 17)
 
#define P_POST_TRANSFORM   (1 << 18)
 
#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_BAKE_TIME = 26 , 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 (wmKeyConfig *keyconf)
 
void transform_operatortypes ()
 
bool calculateTransformCenter (bContext *C, int centerMode, float cent3d[3], float cent2d[2])
 
void BIF_clearTransformOrientation (bContext *C)
 
void BIF_removeTransformOrientation (bContext *C, TransformOrientation *target)
 
void BIF_removeTransformOrientationIndex (bContext *C, int index)
 
bool BIF_createTransformOrientation (bContext *C, ReportList *reports, const char *name, bool use_view, bool activate, bool overwrite)
 
void BIF_selectTransformOrientation (bContext *C, TransformOrientation *target)
 
void ED_getTransformOrientationMatrix (const Scene *scene, ViewLayer *view_layer, const View3D *v3d, Object *ob, Object *obedit, short around, float r_orientation_mat[3][3])
 
int BIF_countTransformOrientation (const bContext *C)
 
void Transform_Properties (wmOperatorType *ot, int flags)
 
void ED_transform_calc_orientation_from_type (const bContext *C, float r_mat[3][3])
 
short ED_transform_calc_orientation_from_type_ex (const Scene *scene, ViewLayer *view_layer, const View3D *v3d, const RegionView3D *rv3d, Object *ob, Object *obedit, short orientation_index, int pivot_point, float r_mat[3][3])
 
bool ED_transform_calc_pivot_pos (const bContext *C, const short pivot_type, float r_pivot_pos[3])
 
void VIEW3D_GGT_xform_gizmo (wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_gizmo_context (wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_cage (wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_shear (wmGizmoGroupType *gzgt)
 
void VIEW3D_GGT_xform_extrude (wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_xform_callbacks_set (wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set (wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_resize_callbacks_set (wmGizmoGroupType *gzgt)
 
void ED_widgetgroup_gizmo2d_rotate_callbacks_set (wmGizmoGroupType *gzgt)
 
int ED_transform_calc_gizmo_stats (const bContext *C, const TransformCalcParams *params, TransformBounds *tbounds, RegionView3D *rv3d)
 
bool ED_transform_snap_sequencer_to_closest_strip_calc (Scene *scene, ARegion *region, int frame_1, int frame_2, int *r_snap_distance, float *r_snap_frame)
 
void ED_draw_sequencer_snap_point (ARegion *region, float snap_point)
 

Macro Definition Documentation

◆ P_ALIGN_SNAP

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

◆ P_CENTER

◆ P_CONSTRAINT

◆ P_CORRECT_UV

#define P_CORRECT_UV   (1 << 11)

◆ P_CURSOR_EDIT

#define P_CURSOR_EDIT   (1 << 16)

Definition at line 123 of file ED_transform.hh.

Referenced by TRANSFORM_OT_translate(), and Transform_Properties().

◆ P_GEO_SNAP

◆ P_GPENCIL_EDIT

◆ P_MIRROR

◆ P_MIRROR_DUMMY

◆ P_NO_DEFAULTS

◆ P_NO_TEXSPACE

#define P_NO_TEXSPACE   (1 << 13)

Definition at line 120 of file ED_transform.hh.

Referenced by TRANSFORM_OT_skin_resize(), and Transform_Properties().

◆ P_OPTIONS

◆ P_ORIENT_AXIS

◆ P_ORIENT_AXIS_ORTHO

#define P_ORIENT_AXIS_ORTHO   (1 << 4)

Definition at line 111 of file ED_transform.hh.

Referenced by TRANSFORM_OT_shear(), and Transform_Properties().

◆ P_ORIENT_MATRIX

◆ P_POST_TRANSFORM

#define P_POST_TRANSFORM   (1 << 18)

◆ P_PROPORTIONAL

◆ P_SNAP

◆ P_VIEW2D_EDGE_PAN

#define P_VIEW2D_EDGE_PAN   (1 << 17)

◆ SNAP_INCREMENTAL_ANGLE

#define SNAP_INCREMENTAL_ANGLE   DEG2RAD(5.0)

Definition at line 172 of file ED_transform.hh.

Referenced by GIZMO_GT_dial_3d().

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_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 34 of file ED_transform.hh.

Function Documentation

◆ BIF_clearTransformOrientation()

◆ BIF_countTransformOrientation()

int BIF_countTransformOrientation ( const bContext * C)

Definition at line 530 of file transform_orientations.cc.

References BLI_listbase_count(), and CTX_data_scene().

Referenced by initTransInfo().

◆ BIF_createTransformOrientation()

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

◆ BIF_removeTransformOrientation()

void BIF_removeTransformOrientation ( bContext * C,
TransformOrientation * target )

◆ BIF_removeTransformOrientationIndex()

void BIF_removeTransformOrientationIndex ( bContext * C,
int index )

◆ BIF_selectTransformOrientation()

void BIF_selectTransformOrientation ( bContext * C,
TransformOrientation * target )

◆ calculateTransformCenter()

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

Standalone call to get the transformation center corresponding to the current situation returns 1 if successful, 0 otherwise (usually means there's no selection) (if false is returns, cent3d is unmodified).

Definition at line 1446 of file editors/transform/transform.cc.

References TransInfo::around, C, calculateCenter(), TransInfo::center2d, TransInfo::center_global, TransInfo::context, copy_v2_v2(), copy_v3_v3(), create_trans_data(), CTX_NO_PET, TransInfo::data_len_all, initTransInfo(), MEM_callocN, MEM_freeN(), TransInfo::mode, TransInfo::options, postTrans(), special_aftertrans_update(), TransInfo::state, TFM_DUMMY, TRANS_RUNNING, and V3D_AROUND_CENTER_BOUNDS.

Referenced by edbm_bevel_invoke(), and edbm_inset_invoke().

◆ ED_draw_sequencer_snap_point()

◆ ED_getTransformOrientationMatrix()

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

◆ ED_keymap_transform()

void ED_keymap_transform ( wmKeyConfig * keyconf)

◆ ED_transform_calc_gizmo_stats()

◆ ED_transform_calc_orientation_from_type()

◆ ED_transform_calc_orientation_from_type_ex()

short ED_transform_calc_orientation_from_type_ex ( const Scene * scene,
ViewLayer * view_layer,
const View3D * v3d,
const RegionView3D * rv3d,
Object * ob,
Object * obedit,
short orientation_index,
int pivot_point,
float r_mat[3][3] )

◆ ED_transform_calc_pivot_pos()

bool ED_transform_calc_pivot_pos ( const bContext * C,
const short pivot_type,
float r_pivot_pos[3] )

Definition at line 2433 of file transform_gizmo_3d.cc.

References CTX_data_scene(), and gizmo_3d_calc_pos().

Referenced by view3d_orbit_calc_center().

◆ ED_transform_snap_sequencer_to_closest_strip_calc()

bool ED_transform_snap_sequencer_to_closest_strip_calc ( Scene * scene,
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 635 of file transform_snap_sequencer.cc.

References TransInfo::data_type, TransSnap::mode, TransInfo::region, scene, TransInfo::scene, SEQ_tool_settings_snap_mode_get(), TransSnap::snap_target, TransConvertType_Sequencer, transform_snap_sequencer_to_closest_strip_ex(), TransInfo::tsnap, validSnap(), and TransInfo::values.

Referenced by update_overlay_strip_position_data().

◆ ED_widgetgroup_gizmo2d_resize_callbacks_set()

◆ ED_widgetgroup_gizmo2d_rotate_callbacks_set()

◆ ED_widgetgroup_gizmo2d_xform_callbacks_set()

◆ ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set()

◆ transform_operatortypes()

◆ Transform_Properties()

void Transform_Properties ( wmOperatorType * ot,
int flags )

Definition at line 619 of file transform_ops.cc.

References BLT_I18NCONTEXT_ID_CURVE_LEGACY, FLT_MAX, 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_TO_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()

◆ VIEW3D_GGT_xform_extrude()

◆ VIEW3D_GGT_xform_gizmo()

◆ VIEW3D_GGT_xform_gizmo_context()

◆ VIEW3D_GGT_xform_shear()