Blender  V2.93
Classes | Typedefs | Functions | Variables
transform_ops.c File Reference
#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "BKE_global.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "ED_screen.h"
#include "ED_mesh.h"
#include "transform.h"
#include "transform_convert.h"

Go to the source code of this file.

Classes

struct  TransformModeItem
 

Typedefs

typedef struct TransformModeItem TransformModeItem
 

Functions

static void TRANSFORM_OT_translate (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_rotate (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_tosphere (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_resize (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_skin_resize (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_shear (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_bend (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_shrink_fatten (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_push_pull (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_tilt (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_trackball (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_mirror (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_bbone_resize (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_edge_slide (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_vert_slide (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_edge_crease (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_edge_bevelweight (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_seq_slide (struct wmOperatorType *ot)
 
static void TRANSFORM_OT_rotate_normal (struct wmOperatorType *ot)
 
static int select_orientation_exec (bContext *C, wmOperator *op)
 
static int select_orientation_invoke (bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))
 
static void TRANSFORM_OT_select_orientation (struct wmOperatorType *ot)
 
static int delete_orientation_exec (bContext *C, wmOperator *UNUSED(op))
 
static int delete_orientation_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
 
static bool delete_orientation_poll (bContext *C)
 
static void TRANSFORM_OT_delete_orientation (struct wmOperatorType *ot)
 
static int create_orientation_exec (bContext *C, wmOperator *op)
 
static void TRANSFORM_OT_create_orientation (struct wmOperatorType *ot)
 
static void transformops_loopsel_hack (bContext *C, wmOperator *op)
 
static void transformops_exit (bContext *C, wmOperator *op)
 
static int transformops_data (bContext *C, wmOperator *op, const wmEvent *event)
 
static int transform_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
static void transform_cancel (bContext *C, wmOperator *op)
 
static int transform_exec (bContext *C, wmOperator *op)
 
static int transform_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static bool transform_poll_property (const bContext *UNUSED(C), wmOperator *op, const PropertyRNA *prop)
 
void Transform_Properties (struct wmOperatorType *ot, int flags)
 
static bool transform_rotate_poll (bContext *C)
 
static bool transform_shear_poll (bContext *C)
 
static void TRANSFORM_OT_transform (struct wmOperatorType *ot)
 
static int transform_from_gizmo_invoke (bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))
 
static void TRANSFORM_OT_from_gizmo (struct wmOperatorType *ot)
 
void transform_operatortypes (void)
 
void ED_keymap_transform (wmKeyConfig *keyconf)
 

Variables

static const float VecOne [3] = {1, 1, 1}
 
static const char OP_TRANSLATION [] = "TRANSFORM_OT_translate"
 
static const char OP_ROTATION [] = "TRANSFORM_OT_rotate"
 
static const char OP_TOSPHERE [] = "TRANSFORM_OT_tosphere"
 
static const char OP_RESIZE [] = "TRANSFORM_OT_resize"
 
static const char OP_SKIN_RESIZE [] = "TRANSFORM_OT_skin_resize"
 
static const char OP_SHEAR [] = "TRANSFORM_OT_shear"
 
static const char OP_BEND [] = "TRANSFORM_OT_bend"
 
static const char OP_SHRINK_FATTEN [] = "TRANSFORM_OT_shrink_fatten"
 
static const char OP_PUSH_PULL [] = "TRANSFORM_OT_push_pull"
 
static const char OP_TILT [] = "TRANSFORM_OT_tilt"
 
static const char OP_TRACKBALL [] = "TRANSFORM_OT_trackball"
 
static const char OP_MIRROR [] = "TRANSFORM_OT_mirror"
 
static const char OP_BONE_SIZE [] = "TRANSFORM_OT_bbone_resize"
 
static const char OP_EDGE_SLIDE [] = "TRANSFORM_OT_edge_slide"
 
static const char OP_VERT_SLIDE [] = "TRANSFORM_OT_vert_slide"
 
static const char OP_EDGE_CREASE [] = "TRANSFORM_OT_edge_crease"
 
static const char OP_EDGE_BWEIGHT [] = "TRANSFORM_OT_edge_bevelweight"
 
static const char OP_SEQ_SLIDE [] = "TRANSFORM_OT_seq_slide"
 
static const char OP_NORMAL_ROTATION [] = "TRANSFORM_OT_rotate_normal"
 
static TransformModeItem transform_modes []
 
const EnumPropertyItem rna_enum_transform_mode_types []
 

Typedef Documentation

◆ TransformModeItem

Function Documentation

◆ create_orientation_exec()

static int create_orientation_exec ( bContext C,
wmOperator op 
)
static

◆ delete_orientation_exec()

static int delete_orientation_exec ( bContext C,
wmOperator UNUSEDop 
)
static

◆ delete_orientation_invoke()

static int delete_orientation_invoke ( bContext C,
wmOperator op,
const wmEvent UNUSEDevent 
)
static

Definition at line 229 of file transform_ops.c.

References C, and delete_orientation_exec().

Referenced by TRANSFORM_OT_delete_orientation().

◆ delete_orientation_poll()

static bool delete_orientation_poll ( bContext C)
static

◆ ED_keymap_transform()

void ED_keymap_transform ( wmKeyConfig keyconf)

◆ select_orientation_exec()

static int select_orientation_exec ( bContext C,
wmOperator op 
)
static

◆ select_orientation_invoke()

static int select_orientation_invoke ( bContext C,
wmOperator UNUSEDop,
const wmEvent UNUSEDevent 
)
static

◆ transform_cancel()

static void transform_cancel ( bContext C,
wmOperator op 
)
static

◆ transform_exec()

static int transform_exec ( bContext C,
wmOperator op 
)
static

◆ transform_from_gizmo_invoke()

static int transform_from_gizmo_invoke ( bContext C,
wmOperator UNUSEDop,
const wmEvent UNUSEDevent 
)
static

◆ transform_invoke()

static int transform_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ transform_modal()

static int transform_modal ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ transform_operatortypes()

void transform_operatortypes ( void  )

◆ TRANSFORM_OT_bbone_resize()

static void TRANSFORM_OT_bbone_resize ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_bend()

static void TRANSFORM_OT_bend ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_create_orientation()

static void TRANSFORM_OT_create_orientation ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_delete_orientation()

static void TRANSFORM_OT_delete_orientation ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_edge_bevelweight()

static void TRANSFORM_OT_edge_bevelweight ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_edge_crease()

static void TRANSFORM_OT_edge_crease ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_edge_slide()

static void TRANSFORM_OT_edge_slide ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_from_gizmo()

static void TRANSFORM_OT_from_gizmo ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_mirror()

static void TRANSFORM_OT_mirror ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_push_pull()

static void TRANSFORM_OT_push_pull ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_resize()

static void TRANSFORM_OT_resize ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_rotate()

static void TRANSFORM_OT_rotate ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_rotate_normal()

static void TRANSFORM_OT_rotate_normal ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_select_orientation()

static void TRANSFORM_OT_select_orientation ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_seq_slide()

static void TRANSFORM_OT_seq_slide ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_shear()

static void TRANSFORM_OT_shear ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_shrink_fatten()

static void TRANSFORM_OT_shrink_fatten ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_skin_resize()

static void TRANSFORM_OT_skin_resize ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_tilt()

static void TRANSFORM_OT_tilt ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_tosphere()

static void TRANSFORM_OT_tosphere ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_trackball()

static void TRANSFORM_OT_trackball ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_transform()

static void TRANSFORM_OT_transform ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_translate()

static void TRANSFORM_OT_translate ( struct wmOperatorType ot)
static

◆ TRANSFORM_OT_vert_slide()

static void TRANSFORM_OT_vert_slide ( struct wmOperatorType ot)
static

◆ transform_poll_property()

static bool transform_poll_property ( const bContext UNUSEDC,
wmOperator op,
const PropertyRNA prop 
)
static

◆ Transform_Properties()

void Transform_Properties ( struct wmOperatorType ot,
int  flags 
)

Definition at line 571 of file transform_ops.c.

References BLT_I18NCONTEXT_ID_CURVE, 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, PROP_ENUM, 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_target_items, rna_TransformOrientation_itemf(), 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_slide(), and UV_OT_rip().

◆ transform_rotate_poll()

static bool transform_rotate_poll ( bContext C)
static

◆ transform_shear_poll()

static bool transform_shear_poll ( bContext C)
static

◆ transformops_data()

static int transformops_data ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ transformops_exit()

static void transformops_exit ( bContext C,
wmOperator op 
)
static

◆ transformops_loopsel_hack()

static void transformops_loopsel_hack ( bContext C,
wmOperator op 
)
static

Variable Documentation

◆ OP_BEND

const char OP_BEND[] = "TRANSFORM_OT_bend"
static

Definition at line 70 of file transform_ops.c.

Referenced by TRANSFORM_OT_bend().

◆ OP_BONE_SIZE

const char OP_BONE_SIZE[] = "TRANSFORM_OT_bbone_resize"
static

Definition at line 76 of file transform_ops.c.

Referenced by TRANSFORM_OT_bbone_resize().

◆ OP_EDGE_BWEIGHT

const char OP_EDGE_BWEIGHT[] = "TRANSFORM_OT_edge_bevelweight"
static

Definition at line 80 of file transform_ops.c.

Referenced by TRANSFORM_OT_edge_bevelweight().

◆ OP_EDGE_CREASE

const char OP_EDGE_CREASE[] = "TRANSFORM_OT_edge_crease"
static

Definition at line 79 of file transform_ops.c.

Referenced by TRANSFORM_OT_edge_crease().

◆ OP_EDGE_SLIDE

const char OP_EDGE_SLIDE[] = "TRANSFORM_OT_edge_slide"
static

Definition at line 77 of file transform_ops.c.

Referenced by TRANSFORM_OT_edge_slide(), and transformops_loopsel_hack().

◆ OP_MIRROR

const char OP_MIRROR[] = "TRANSFORM_OT_mirror"
static

Definition at line 75 of file transform_ops.c.

Referenced by TRANSFORM_OT_mirror().

◆ OP_NORMAL_ROTATION

const char OP_NORMAL_ROTATION[] = "TRANSFORM_OT_rotate_normal"
static

Definition at line 82 of file transform_ops.c.

Referenced by TRANSFORM_OT_rotate_normal().

◆ OP_PUSH_PULL

const char OP_PUSH_PULL[] = "TRANSFORM_OT_push_pull"
static

Definition at line 72 of file transform_ops.c.

Referenced by TRANSFORM_OT_push_pull().

◆ OP_RESIZE

const char OP_RESIZE[] = "TRANSFORM_OT_resize"
static

Definition at line 67 of file transform_ops.c.

Referenced by TRANSFORM_OT_resize().

◆ OP_ROTATION

const char OP_ROTATION[] = "TRANSFORM_OT_rotate"
static

Definition at line 65 of file transform_ops.c.

Referenced by TRANSFORM_OT_rotate().

◆ OP_SEQ_SLIDE

const char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide"
static

Definition at line 81 of file transform_ops.c.

Referenced by TRANSFORM_OT_seq_slide().

◆ OP_SHEAR

const char OP_SHEAR[] = "TRANSFORM_OT_shear"
static

Definition at line 69 of file transform_ops.c.

Referenced by TRANSFORM_OT_shear().

◆ OP_SHRINK_FATTEN

const char OP_SHRINK_FATTEN[] = "TRANSFORM_OT_shrink_fatten"
static

Definition at line 71 of file transform_ops.c.

Referenced by TRANSFORM_OT_shrink_fatten().

◆ OP_SKIN_RESIZE

const char OP_SKIN_RESIZE[] = "TRANSFORM_OT_skin_resize"
static

Definition at line 68 of file transform_ops.c.

Referenced by TRANSFORM_OT_skin_resize().

◆ OP_TILT

const char OP_TILT[] = "TRANSFORM_OT_tilt"
static

Definition at line 73 of file transform_ops.c.

Referenced by TRANSFORM_OT_tilt().

◆ OP_TOSPHERE

const char OP_TOSPHERE[] = "TRANSFORM_OT_tosphere"
static

Definition at line 66 of file transform_ops.c.

Referenced by TRANSFORM_OT_tosphere().

◆ OP_TRACKBALL

const char OP_TRACKBALL[] = "TRANSFORM_OT_trackball"
static

Definition at line 74 of file transform_ops.c.

Referenced by TRANSFORM_OT_trackball().

◆ OP_TRANSLATION

const char OP_TRANSLATION[] = "TRANSFORM_OT_translate"
static

Definition at line 64 of file transform_ops.c.

Referenced by TRANSFORM_OT_translate().

◆ OP_VERT_SLIDE

const char OP_VERT_SLIDE[] = "TRANSFORM_OT_vert_slide"
static

Definition at line 78 of file transform_ops.c.

Referenced by TRANSFORM_OT_vert_slide().

◆ rna_enum_transform_mode_types

const EnumPropertyItem rna_enum_transform_mode_types[]

◆ transform_modes

TransformModeItem transform_modes[]
static
Initial value:
= {
{NULL, 0},
}
@ TFM_RESIZE
Definition: ED_transform.h:48
@ TFM_EDGE_SLIDE
Definition: ED_transform.h:74
@ TFM_BONESIZE
Definition: ED_transform.h:59
@ TFM_SKIN_RESIZE
Definition: ED_transform.h:49
@ TFM_SHEAR
Definition: ED_transform.h:51
@ TFM_SHRINKFATTEN
Definition: ED_transform.h:53
@ TFM_VERT_SLIDE
Definition: ED_transform.h:75
@ TFM_CREASE
Definition: ED_transform.h:57
@ TFM_BEND
Definition: ED_transform.h:52
@ TFM_ROTATION
Definition: ED_transform.h:47
@ TFM_BWEIGHT
Definition: ED_transform.h:72
@ TFM_TILT
Definition: ED_transform.h:54
@ TFM_SEQ_SLIDE
Definition: ED_transform.h:76
@ TFM_TOSPHERE
Definition: ED_transform.h:50
@ TFM_MIRROR
Definition: ED_transform.h:58
@ TFM_TRANSLATION
Definition: ED_transform.h:46
@ TFM_NORMAL_ROTATION
Definition: ED_transform.h:78
@ TFM_PUSHPULL
Definition: ED_transform.h:56
@ TFM_TRACKBALL
Definition: ED_transform.h:55
static void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
static const char OP_ROTATION[]
Definition: transform_ops.c:65
static const char OP_TILT[]
Definition: transform_ops.c:73
static void TRANSFORM_OT_rotate_normal(struct wmOperatorType *ot)
static const char OP_TOSPHERE[]
Definition: transform_ops.c:66
static const char OP_RESIZE[]
Definition: transform_ops.c:67
static const char OP_MIRROR[]
Definition: transform_ops.c:75
static const char OP_SKIN_RESIZE[]
Definition: transform_ops.c:68
static const char OP_SHEAR[]
Definition: transform_ops.c:69
static const char OP_EDGE_BWEIGHT[]
Definition: transform_ops.c:80
static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)
static void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
static void TRANSFORM_OT_shear(struct wmOperatorType *ot)
static const char OP_EDGE_SLIDE[]
Definition: transform_ops.c:77
static const char OP_EDGE_CREASE[]
Definition: transform_ops.c:79
static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
static void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
static const char OP_TRANSLATION[]
Definition: transform_ops.c:64
static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot)
static void TRANSFORM_OT_vert_slide(struct wmOperatorType *ot)
static const char OP_PUSH_PULL[]
Definition: transform_ops.c:72
static const char OP_SEQ_SLIDE[]
Definition: transform_ops.c:81
static void TRANSFORM_OT_bend(struct wmOperatorType *ot)
static void TRANSFORM_OT_bbone_resize(struct wmOperatorType *ot)
static const char OP_BEND[]
Definition: transform_ops.c:70
static const char OP_TRACKBALL[]
Definition: transform_ops.c:74
static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot)
static void TRANSFORM_OT_translate(struct wmOperatorType *ot)
static const char OP_SHRINK_FATTEN[]
Definition: transform_ops.c:71
static void TRANSFORM_OT_mirror(struct wmOperatorType *ot)
static const char OP_NORMAL_ROTATION[]
Definition: transform_ops.c:82
static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
static const char OP_BONE_SIZE[]
Definition: transform_ops.c:76
static void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
static void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
static void TRANSFORM_OT_resize(struct wmOperatorType *ot)
static const char OP_VERT_SLIDE[]
Definition: transform_ops.c:78
static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)

Definition at line 104 of file transform_ops.c.

Referenced by ED_keymap_transform(), transform_modal(), transform_operatortypes(), and transformops_data().

◆ VecOne

const float VecOne[3] = {1, 1, 1}
static