Blender V2.61 - r43446
Defines | Enumerations | Functions

transform.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include <unistd.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_movieclip_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BKE_nla.h"
#include "BKE_bmesh.h"
#include "BKE_context.h"
#include "BKE_constraint.h"
#include "BKE_global.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_unit.h"
#include "ED_image.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_markers.h"
#include "ED_view3d.h"
#include "ED_mesh.h"
#include "ED_clip.h"
#include "UI_view2d.h"
#include "WM_types.h"
#include "WM_api.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_editVert.h"
#include "BLI_ghash.h"
#include "BLI_linklist.h"
#include "UI_resources.h"
#include "transform.h"

Go to the source code of this file.

Defines

#define TFM_MODAL_CANCEL   1
#define TFM_MODAL_CONFIRM   2
#define TFM_MODAL_TRANSLATE   3
#define TFM_MODAL_ROTATE   4
#define TFM_MODAL_RESIZE   5
#define TFM_MODAL_SNAP_INV_ON   6
#define TFM_MODAL_SNAP_INV_OFF   7
#define TFM_MODAL_SNAP_TOGGLE   8
#define TFM_MODAL_AXIS_X   9
#define TFM_MODAL_AXIS_Y   10
#define TFM_MODAL_AXIS_Z   11
#define TFM_MODAL_PLANE_X   12
#define TFM_MODAL_PLANE_Y   13
#define TFM_MODAL_PLANE_Z   14
#define TFM_MODAL_CONS_OFF   15
#define TFM_MODAL_ADD_SNAP   16
#define TFM_MODAL_REMOVE_SNAP   17
#define TFM_MODAL_PROPSIZE_UP   20
#define TFM_MODAL_PROPSIZE_DOWN   21
#define TFM_MODAL_AUTOIK_LEN_INC   22
#define TFM_MODAL_AUTOIK_LEN_DEC   23
#define SIGN(a)   (a<-FLT_EPSILON?1:a>FLT_EPSILON?2:3)
#define VECSIGNFLIP(a, b)   ((SIGN(a[0]) & SIGN(b[0]))==0 || (SIGN(a[1]) & SIGN(b[1]))==0 || (SIGN(a[2]) & SIGN(b[2]))==0)
#define EDGE_SLIDE_MIN   30

Enumerations

enum  ArrowDirection { UP, DOWN, LEFT, RIGHT }

Functions

static void drawTransformApply (const struct bContext *C, struct ARegion *ar, void *arg)
static int doEdgeSlide (TransInfo *t, float perc)
void setTransformViewMatrices (TransInfo *t)
static void convertViewVec2D (View2D *v2d, float *vec, int dx, int dy)
void convertViewVec (TransInfo *t, float *vec, int dx, int dy)
void projectIntView (TransInfo *t, float *vec, int *adr)
void projectFloatView (TransInfo *t, float *vec, float *adr)
void applyAspectRatio (TransInfo *t, float *vec)
void removeAspectRatio (TransInfo *t, float *vec)
static void viewRedrawForce (const bContext *C, TransInfo *t)
static void viewRedrawPost (bContext *C, TransInfo *t)
void BIF_selectOrientation (void)
static void view_editmove (unsigned short UNUSED(event))
wmKeyMaptransform_modal_keymap (wmKeyConfig *keyconf)
int transformEvent (TransInfo *t, wmEvent *event)
int calculateTransformCenter (bContext *C, int centerMode, float *vec)
static void drawArrow (ArrowDirection d, short offset, short length, short size)
static void drawArrowHead (ArrowDirection d, short size)
static void drawArc (float size, float angle_start, float angle_end, int segments)
static int helpline_poll (bContext *C)
static void drawHelpline (bContext *UNUSED(C), int x, int y, void *customdata)
static void drawTransformView (const struct bContext *C, struct ARegion *UNUSED(ar), void *arg)
void saveTransform (bContext *C, TransInfo *t, wmOperator *op)
int initTransform (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int mode)
void transformApply (bContext *C, TransInfo *t)
static void drawTransformApply (const bContext *C, struct ARegion *UNUSED(ar), void *arg)
int transformEnd (bContext *C, TransInfo *t)
static void protectedTransBits (short protectflag, float *vec)
static void protectedSizeBits (short protectflag, float *size)
static void protectedRotateBits (short protectflag, float *eul, float *oldeul)
static void protectedAxisAngleBits (short protectflag, float axis[3], float *angle, float oldAxis[3], float oldAngle)
static void protectedQuaternionBits (short protectflag, float *quat, float *oldquat)
static void constraintTransLim (TransInfo *t, TransData *td)
static void constraintob_from_transdata (bConstraintOb *cob, TransData *td)
static void constraintRotLim (TransInfo *UNUSED(t), TransData *td)
static void constraintSizeLim (TransInfo *t, TransData *td)
static void postInputWarp (TransInfo *t, float values[3])
void initWarp (TransInfo *t)
int handleEventWarp (TransInfo *t, wmEvent *event)
int Warp (TransInfo *t, const int UNUSED(mval[2]))
static void postInputShear (TransInfo *UNUSED(t), float values[3])
void initShear (TransInfo *t)
int handleEventShear (TransInfo *t, wmEvent *event)
int Shear (TransInfo *t, const int UNUSED(mval[2]))
void initResize (TransInfo *t)
static void headerResize (TransInfo *t, float vec[3], char *str)
static void TransMat3ToSize (float mat[][3], float smat[][3], float *size)
static void ElementResize (TransInfo *t, TransData *td, float mat[3][3])
int Resize (TransInfo *t, const int mval[2])
void initToSphere (TransInfo *t)
int ToSphere (TransInfo *t, const int UNUSED(mval[2]))
static void postInputRotation (TransInfo *t, float values[3])
void initRotation (TransInfo *t)
static void ElementRotation (TransInfo *t, TransData *td, float mat[3][3], short around)
static void applyRotation (TransInfo *t, float angle, float axis[3])
int Rotation (TransInfo *t, const int UNUSED(mval[2]))
void initTrackball (TransInfo *t)
static void applyTrackball (TransInfo *t, float axis1[3], float axis2[3], float angles[2])
int Trackball (TransInfo *t, const int UNUSED(mval[2]))
void initTranslation (TransInfo *t)
static void headerTranslation (TransInfo *t, float vec[3], char *str)
static void applyTranslation (TransInfo *t, float vec[3])
int Translation (TransInfo *t, const int UNUSED(mval[2]))
void initShrinkFatten (TransInfo *t)
int ShrinkFatten (TransInfo *t, const int UNUSED(mval[2]))
void initTilt (TransInfo *t)
int Tilt (TransInfo *t, const int UNUSED(mval[2]))
void initCurveShrinkFatten (TransInfo *t)
int CurveShrinkFatten (TransInfo *t, const int UNUSED(mval[2]))
void initPushPull (TransInfo *t)
int PushPull (TransInfo *t, const int UNUSED(mval[2]))
void initBevel (TransInfo *t)
int handleEventBevel (TransInfo *t, wmEvent *event)
int Bevel (TransInfo *t, const int UNUSED(mval[2]))
void initBevelWeight (TransInfo *t)
int BevelWeight (TransInfo *t, const int UNUSED(mval[2]))
void initCrease (TransInfo *t)
int Crease (TransInfo *t, const int UNUSED(mval[2]))
void initBoneSize (TransInfo *t)
static void headerBoneSize (TransInfo *t, float vec[3], char *str)
static void ElementBoneSize (TransInfo *t, TransData *td, float mat[3][3])
int BoneSize (TransInfo *t, const int mval[2])
void initBoneEnvelope (TransInfo *t)
int BoneEnvelope (TransInfo *t, const int UNUSED(mval[2]))
static int createSlideVerts (TransInfo *t)
void freeSlideVerts (TransInfo *t)
void initEdgeSlide (TransInfo *t)
int EdgeSlide (TransInfo *t, const int UNUSED(mval[2]))
void initBoneRoll (TransInfo *t)
int BoneRoll (TransInfo *t, const int UNUSED(mval[2]))
void initBakeTime (TransInfo *t)
int BakeTime (TransInfo *t, const int mval[2])
void initMirror (TransInfo *t)
int Mirror (TransInfo *t, const int UNUSED(mval[2]))
void initAlign (TransInfo *t)
int Align (TransInfo *t, const int UNUSED(mval[2]))
void initSeqSlide (TransInfo *t)
static void headerSeqSlide (TransInfo *t, float val[2], char *str)
static void applySeqSlide (TransInfo *t, float val[2])
int SeqSlide (TransInfo *t, const int UNUSED(mval[2]))
static short getAnimEdit_SnapMode (TransInfo *t)
static short getAnimEdit_DrawTime (TransInfo *t)
static void doAnimEdit_SnapFrame (TransInfo *t, TransData *td, TransData2D *td2d, AnimData *adt, short autosnap)
void initTimeTranslate (TransInfo *t)
static void headerTimeTranslate (TransInfo *t, char *str)
static void applyTimeTranslate (TransInfo *t, float UNUSED(sval))
int TimeTranslate (TransInfo *t, const int mval[2])
void initTimeSlide (TransInfo *t)
static void headerTimeSlide (TransInfo *t, float sval, char *str)
static void applyTimeSlide (TransInfo *t, float sval)
int TimeSlide (TransInfo *t, const int mval[2])
void initTimeScale (TransInfo *t)
static void headerTimeScale (TransInfo *t, char *str)
static void applyTimeScale (TransInfo *t)
int TimeScale (TransInfo *t, const int UNUSED(mval[2]))
void BIF_TransformSetUndo (const char *UNUSED(str))

Detailed Description

Definition in file transform.c.


Define Documentation

#define EDGE_SLIDE_MIN   30

Referenced by createSlideVerts().

#define SIGN (   a)    (a<-FLT_EPSILON?1:a>FLT_EPSILON?2:3)

Definition at line 2600 of file transform.c.

#define TFM_MODAL_ADD_SNAP   16

Definition at line 484 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_AUTOIK_LEN_DEC   23

Definition at line 491 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_AUTOIK_LEN_INC   22

Definition at line 490 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_AXIS_X   9

Definition at line 477 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_AXIS_Y   10

Definition at line 478 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_AXIS_Z   11

Definition at line 479 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_CANCEL   1

Definition at line 469 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_CONFIRM   2

Definition at line 470 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_CONS_OFF   15

Definition at line 483 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_PLANE_X   12

Definition at line 480 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_PLANE_Y   13

Definition at line 481 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_PLANE_Z   14

Definition at line 482 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_PROPSIZE_DOWN   21

Definition at line 489 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_PROPSIZE_UP   20

Definition at line 488 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_REMOVE_SNAP   17

Definition at line 485 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_RESIZE   5

Definition at line 473 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_ROTATE   4

Definition at line 472 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_SNAP_INV_OFF   7

Definition at line 475 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_SNAP_INV_ON   6

Definition at line 474 of file transform.c.

Referenced by initTransform(), transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_SNAP_TOGGLE   8

Definition at line 476 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define TFM_MODAL_TRANSLATE   3

Definition at line 471 of file transform.c.

Referenced by transform_modal_keymap(), and transformEvent().

#define VECSIGNFLIP (   a,
 
)    ((SIGN(a[0]) & SIGN(b[0]))==0 || (SIGN(a[1]) & SIGN(b[1]))==0 || (SIGN(a[2]) & SIGN(b[2]))==0)

Definition at line 2601 of file transform.c.

Referenced by TransMat3ToSize().


Enumeration Type Documentation

Enumerator:
UP 
DOWN 
LEFT 
RIGHT 

Definition at line 1124 of file transform.c.


Function Documentation

int Align ( TransInfo t,
const int   UNUSEDmval[2] 
)
void applyAspectRatio ( TransInfo t,
float *  vec 
)
static void applyRotation ( TransInfo t,
float  angle,
float  axis[3] 
) [static]
static void applySeqSlide ( TransInfo t,
float  val[2] 
) [static]
static void applyTimeScale ( TransInfo t) [static]
static void applyTimeSlide ( TransInfo t,
float  sval 
) [static]
static void applyTimeTranslate ( TransInfo t,
float   UNUSEDsval 
) [static]
static void applyTrackball ( TransInfo t,
float  axis1[3],
float  axis2[3],
float  angles[2] 
) [static]
static void applyTranslation ( TransInfo t,
float  vec[3] 
) [static]
int BakeTime ( TransInfo t,
const int  mval[2] 
)
int Bevel ( TransInfo t,
const int   UNUSEDmval[2] 
)
int BevelWeight ( TransInfo t,
const int   UNUSEDmval[2] 
)
void BIF_selectOrientation ( void  )

Definition at line 379 of file transform.c.

References BIF_menustringTransformOrientation(), G, MEM_freeN(), pupmenu(), and simple_enum_gen::val.

Referenced by transformEvent().

void BIF_TransformSetUndo ( const char *  UNUSEDstr)

Definition at line 5922 of file transform.c.

int BoneEnvelope ( TransInfo t,
const int   UNUSEDmval[2] 
)
int BoneRoll ( TransInfo t,
const int   UNUSEDmval[2] 
)
int BoneSize ( TransInfo t,
const int  mval[2] 
)
int calculateTransformCenter ( bContext C,
int  centerMode,
float *  vec 
)
static void constraintob_from_transdata ( bConstraintOb cob,
TransData td 
) [static]
static void constraintRotLim ( TransInfo UNUSEDt,
TransData td 
) [static]
static void constraintSizeLim ( TransInfo t,
TransData td 
) [static]
static void constraintTransLim ( TransInfo t,
TransData td 
) [static]
void convertViewVec ( TransInfo t,
float *  vec,
int  dx,
int  dy 
)
static void convertViewVec2D ( View2D v2d,
float *  vec,
int  dx,
int  dy 
) [static]
int Crease ( TransInfo t,
const int   UNUSEDmval[2] 
)
static int createSlideVerts ( TransInfo t) [static]

Definition at line 4287 of file transform.c.

References ABS, add_v2_v2(), add_v3_v3(), add_v3_v3v3(), TransInfo::ar, BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghash_remove(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_linklist_append(), BLI_linklist_free(), BLI_linklist_prepend(), CD_MTFACE, co, EditVert::co, copy_v3_v3(), TransInfo::customData, CustomData_em_get_n(), CustomData_number_of_layers(), EditFace::data, Object::data, TransDataSlideVert::down, Mesh::drawflag, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, ED_view3d_ob_project_mat_get(), ED_view3d_project_float(), EDGE_SLIDE_MIN, SlideData::edgelist, EditMesh::edges, Mesh::edit_mesh, editedge_containsVert(), editedge_getOtherVert(), editedge_getSharedVert(), editface_containsEdge(), SlideData::end, EditVert::f, EditEdge::f, EditVert::f1, EditEdge::f1, EditEdge::f2, fabsf, EditMesh::faces, EditMesh::fdata, ListBase::first, i, EditVert::l, len_squared_v2v2(), ME_DRAWEXTRA_EDGELEN, MEM_callocN(), MEM_freeN(), MEM_mallocN(), mul_v2_fl(), mul_v3_fl(), TransInfo::mval, SlideData::nearest, EditFace::next, EditVert::next, EditEdge::next, EditVert::no, normalize_v2(), NULL, TransInfo::obedit, TransDataSlideVert::origvert, ARegion::regiondata, SELECT, TransInfo::settings, sharesFace(), SlideData::slideuv, SlideData::start, sub_v2_v2(), sub_v3_v3v3(), SlideData::suv_last, swap(), EditVert::tmp, SlideData::totuv, unit_m4(), TransDataSlideVert::up, MTFace::uv, ToolSettings::uvcalc_flag, UVCALC_TRANSFORM_CORRECT, SlideData::uvhash, SlideData::uvlay_tot, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, EditFace::v4, SlideData::vertlist, EditMesh::verts, and SlideData::vhash.

Referenced by initEdgeSlide().

int CurveShrinkFatten ( TransInfo t,
const int   UNUSEDmval[2] 
)
static void doAnimEdit_SnapFrame ( TransInfo t,
TransData td,
TransData2D td2d,
AnimData adt,
short  autosnap 
) [static]
static int doEdgeSlide ( TransInfo t,
float  perc 
) [static]
static void drawArc ( float  size,
float  angle_start,
float  angle_end,
int  segments 
) [static]

Definition at line 1192 of file transform.c.

References angle(), cosf, and sinf.

Referenced by drawHelpline().

static void drawArrow ( ArrowDirection  d,
short  offset,
short  length,
short  size 
) [static]

Definition at line 1130 of file transform.c.

References DOWN, LEFT, length(), RIGHT, size(), and UP.

Referenced by drawHelpline().

static void drawArrowHead ( ArrowDirection  d,
short  size 
) [static]

Definition at line 1165 of file transform.c.

References DOWN, LEFT, RIGHT, size(), and UP.

Referenced by drawHelpline().

static void drawHelpline ( bContext UNUSEDC,
int  x,
int  y,
void *  customdata 
) [static]
static void drawTransformApply ( const struct bContext C,
struct ARegion ar,
void *  arg 
) [static]

Referenced by initTransform().

static void drawTransformApply ( const bContext C,
struct ARegion UNUSEDar,
void *  arg 
) [static]

Definition at line 1798 of file transform.c.

References TransInfo::redraw, transformApply(), TREDRAW_HARD, and TREDRAW_SOFT.

static void drawTransformView ( const struct bContext C,
struct ARegion UNUSEDar,
void *  arg 
) [static]

Definition at line 1352 of file transform.c.

References drawConstraint(), drawPropCircle(), and drawSnapping().

Referenced by initTransform().

int EdgeSlide ( TransInfo t,
const int   UNUSEDmval[2] 
)
static void ElementBoneSize ( TransInfo t,
TransData td,
float  mat[3][3] 
) [static]
static void ElementResize ( TransInfo t,
TransData td,
float  mat[3][3] 
) [static]
static void ElementRotation ( TransInfo t,
TransData td,
float  mat[3][3],
short  around 
) [static]

HACK WARNING

This is some VERY ugly special case to deal with pose mode.

The problem is that mtx and smtx include each bone orientation.

That is needed to rotate each bone properly, HOWEVER, to calculate the translation component, we only need the actual armature object's matrix (and inverse). That is not all though. Once the proper translation has been computed, it has to be converted back into the bone's space.

Definition at line 2920 of file transform.c.

References add_v3_v3(), add_v3_v3v3(), axis_angle_to_quat(), TransData::center, TransInfo::center, constraintRotLim(), constraintTransLim(), copy_m3_m4(), copy_v3_v3(), TransDataExtension::drot, eulO_to_mat3(), TransData::ext, TransData::flag, TransInfo::flag, TransData::iloc, invert_m3_m3(), TransDataExtension::iquat, TransDataExtension::irot, TransDataExtension::irotAngle, TransDataExtension::irotAxis, TransDataExtension::l_smtx, TransData::loc, mat3_to_compatible_eulO(), mat3_to_quat(), TransData::mtx, mul_m3_m3m3(), mul_m3_v3(), mul_qt_qtqt(), mul_serie_m3(), NULL, OB_ARMATURE, TransInfo::obedit, Object::obmat, TransInfo::poseobj, protectedAxisAngleBits(), protectedQuaternionBits(), protectedRotateBits(), protectedTransBits(), TransData::protectflag, TransDataExtension::quat, quat_to_axis_angle(), TransDataExtension::rot, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, TransDataExtension::rotAngle, TransDataExtension::rotAxis, TransDataExtension::rotOrder, SCE_SELECT_EDGE, SCE_SELECT_FACE, ToolSettings::selectmode, TransInfo::settings, TransData::smtx, sub_v3_v3(), sub_v3_v3v3(), T_OBJECT, T_POINTS, T_POSE, T_V3D_ALIGN, TD_NO_LOC, TD_PBONE_LOCAL_MTX_C, TD_PBONE_LOCAL_MTX_P, TD_USEQUAT, Object::type, and V3D_LOCAL.

Referenced by Align(), applyRotation(), applyTrackball(), and applyTranslation().

void freeSlideVerts ( TransInfo t)
static short getAnimEdit_DrawTime ( TransInfo t) [static]
static short getAnimEdit_SnapMode ( TransInfo t) [static]
int handleEventBevel ( TransInfo t,
wmEvent event 
)

Definition at line 3868 of file transform.c.

References BME_BEVEL_VERT, G, KM_PRESS, MIDDLEMOUSE, TransInfo::state, TRANS_CANCEL, wmEvent::type, and wmEvent::val.

Referenced by initBevel().

int handleEventShear ( TransInfo t,
wmEvent event 
)
int handleEventWarp ( TransInfo t,
wmEvent event 
)

Definition at line 2293 of file transform.c.

References TransInfo::customData, KM_PRESS, MIDDLEMOUSE, NULL, wmEvent::type, and wmEvent::val.

Referenced by initWarp().

static void headerBoneSize ( TransInfo t,
float  vec[3],
char *  str 
) [static]
static void headerResize ( TransInfo t,
float  vec[3],
char *  str 
) [static]
static void headerSeqSlide ( TransInfo t,
float  val[2],
char *  str 
) [static]

Definition at line 5308 of file transform.c.

References TransInfo::con, hasNumInput(), TransInfo::num, outputNumInput(), and TransCon::text.

Referenced by SeqSlide().

static void headerTimeScale ( TransInfo t,
char *  str 
) [static]

Definition at line 5847 of file transform.c.

References hasNumInput(), TransInfo::num, outputNumInput(), and TransInfo::values.

Referenced by TimeScale().

static void headerTimeSlide ( TransInfo t,
float  sval,
char *  str 
) [static]
static void headerTimeTranslate ( TransInfo t,
char *  str 
) [static]
static void headerTranslation ( TransInfo t,
float  vec[3],
char *  str 
) [static]
static int helpline_poll ( bContext C) [static]

Definition at line 1208 of file transform.c.

References CTX_wm_region(), ARegion::regiontype, and RGN_TYPE_WINDOW.

Referenced by initTransform().

void initAlign ( TransInfo t)
void initBakeTime ( TransInfo t)
void initBevel ( TransInfo t)
void initBevelWeight ( TransInfo t)
void initBoneEnvelope ( TransInfo t)
void initBoneRoll ( TransInfo t)
void initBoneSize ( TransInfo t)
void initCrease ( TransInfo t)
void initCurveShrinkFatten ( TransInfo t)
void initEdgeSlide ( TransInfo t)
void initMirror ( TransInfo t)
void initPushPull ( TransInfo t)
void initResize ( TransInfo t)
void initRotation ( TransInfo t)
void initSeqSlide ( TransInfo t)
void initShear ( TransInfo t)
void initShrinkFatten ( TransInfo t)
void initTilt ( TransInfo t)
void initTimeScale ( TransInfo t)
void initTimeSlide ( TransInfo t)
void initTimeTranslate ( TransInfo t)
void initToSphere ( TransInfo t)
void initTrackball ( TransInfo t)
int initTransform ( bContext C,
TransInfo t,
wmOperator op,
wmEvent event,
int  mode 
)

Definition at line 1490 of file transform.c.

References wmEvent::alt, TransInfo::ar, ARM_ENVELOPE, TransInfo::auto_values, TransInfo::axis, TransInfo::axis_orig, C, calculateCenter(), calculatePropRatio(), TransInfo::center2d, TransInfo::con, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, TransInfo::context, copy_v3_v3(), copy_v4_v4(), createTransData(), wmEvent::ctrl, CTX_MOVIECLIP, CTX_TEXTURE, CTX_wm_manager(), TransInfo::current_orientation, Object::data, TransInfo::draw_handle_apply, TransInfo::draw_handle_cursor, TransInfo::draw_handle_view, drawHelpline(), drawTransformApply(), drawTransformView(), bArmature::drawtype, ED_region_draw_cb_activate(), ELEM, EVT_TWEAK_L, EVT_TWEAK_R, ListBase::first, TransInfo::flag, helpline_poll(), TransInfo::imval, initAlign(), initBakeTime(), initBevel(), initBevelWeight(), initBoneEnvelope(), initBoneRoll(), initBoneSize(), initCrease(), initCurveShrinkFatten(), initEdgeSlide(), initMirror(), initMouseInput(), initPushPull(), initResize(), initRotation(), initSeqSlide(), initShear(), initShrinkFatten(), initSnapping(), initTilt(), initTimeScale(), initTimeSlide(), initTimeTranslate(), initToSphere(), initTrackball(), initTransformOrientation(), initTransInfo(), initTranslation(), initWarp(), wmKeyMap::items, KM_PRESS, TransInfo::launch_event, LEFTALTKEY, LEFTCTRLKEY, LEFTMOUSE, LEFTSHIFTKEY, MOD_SNAP_INVERT, wmOperatorType::modalkeymap, TransCon::mode, TransInfo::mode, TransInfo::modifiers, TransInfo::mouse, wmKeyMapItem::next, normalize_v3(), NULL, options, TransInfo::options, wmEvent::oskey, OSKEY, TransInfo::poseobj, postTrans(), wmKeyMapItem::propvalue, wmOperator::ptr, REGION_DRAW_POST_VIEW, REGION_DRAW_PRE_VIEW, RIGHTALTKEY, RIGHTCTRLKEY, RIGHTMOUSE, RIGHTSHIFTKEY, RNA_float_get(), RNA_float_get_array(), RNA_property_array_check(), RNA_property_boolean_get(), RNA_property_boolean_get_array(), RNA_property_float_get_array(), RNA_property_is_set(), RNA_struct_find_property(), setUserConstraint(), wmEvent::shift, SPACE_CLIP, SPACE_IMAGE, SPACE_IPO, SPACE_NLA, SPACE_VIEW3D, TransInfo::spacemtx, TransInfo::spacetype, TransInfo::state, T_AUTOVALUES, TFM_ALIGN, TFM_BAKE_TIME, TFM_BEVEL, TFM_BONE_ENVELOPE, TFM_BONE_ROLL, TFM_BONESIZE, TFM_BWEIGHT, TFM_CREASE, TFM_CURVE_SHRINKFATTEN, TFM_EDGE_SLIDE, TFM_MIRROR, TFM_MODAL_SNAP_INV_ON, TFM_PUSHPULL, TFM_RESIZE, TFM_ROTATION, TFM_SEQ_SLIDE, TFM_SHEAR, TFM_SHRINKFATTEN, TFM_TILT, TFM_TIME_DUPLICATE, TFM_TIME_EXTEND, TFM_TIME_SCALE, TFM_TIME_SLIDE, TFM_TIME_TRANSLATE, TFM_TOSPHERE, TFM_TRACKBALL, TFM_TRANSLATION, TFM_WARP, TransInfo::total, TRANS_CANCEL, TRANS_STARTING, wmKeyMapItem::type, wmOperator::type, ARegion::type, unit_m3(), wmKeyMapItem::val, TransInfo::values, WM_keymap_active(), and WM_paint_cursor_activate().

Referenced by transformops_data().

void initTranslation ( TransInfo t)
void initWarp ( TransInfo t)
int Mirror ( TransInfo t,
const int   UNUSEDmval[2] 
)
static void postInputRotation ( TransInfo t,
float  values[3] 
) [static]

Definition at line 2888 of file transform.c.

References TransCon::applyRot, TransInfo::axis, TransInfo::con, CON_APPLY, TransCon::mode, and NULL.

Referenced by initRotation().

static void postInputShear ( TransInfo UNUSEDt,
float  values[3] 
) [static]

Definition at line 2409 of file transform.c.

References mul_v3_fl().

Referenced by initShear().

static void postInputWarp ( TransInfo t,
float  values[3] 
) [static]

Definition at line 2240 of file transform.c.

References TransInfo::customData, M_PI, mul_v3_fl(), and negate_v3().

Referenced by initWarp().

void projectFloatView ( TransInfo t,
float *  vec,
float *  adr 
)
void projectIntView ( TransInfo t,
float *  vec,
int *  adr 
)
static void protectedAxisAngleBits ( short  protectflag,
float  axis[3],
float *  angle,
float  oldAxis[3],
float  oldAngle 
) [static]
static void protectedQuaternionBits ( short  protectflag,
float *  quat,
float *  oldquat 
) [static]
static void protectedRotateBits ( short  protectflag,
float *  eul,
float *  oldeul 
) [static]

Definition at line 1881 of file transform.c.

References OB_LOCK_ROTX, OB_LOCK_ROTY, and OB_LOCK_ROTZ.

Referenced by ElementRotation().

static void protectedSizeBits ( short  protectflag,
float *  size 
) [static]

Definition at line 1871 of file transform.c.

References OB_LOCK_SCALEX, OB_LOCK_SCALEY, and OB_LOCK_SCALEZ.

Referenced by ElementResize().

static void protectedTransBits ( short  protectflag,
float *  vec 
) [static]

Definition at line 1861 of file transform.c.

References OB_LOCK_LOCX, OB_LOCK_LOCY, and OB_LOCK_LOCZ.

Referenced by applyTranslation(), ElementResize(), and ElementRotation().

int PushPull ( TransInfo t,
const int   UNUSEDmval[2] 
)
void removeAspectRatio ( TransInfo t,
float *  vec 
)
int Resize ( TransInfo t,
const int  mval[2] 
)
int Rotation ( TransInfo t,
const int   UNUSEDmval[2] 
)
void saveTransform ( bContext C,
TransInfo t,
wmOperator op 
)
int SeqSlide ( TransInfo t,
const int   UNUSEDmval[2] 
)
void setTransformViewMatrices ( TransInfo t)
int Shear ( TransInfo t,
const int   UNUSEDmval[2] 
)
int ShrinkFatten ( TransInfo t,
const int   UNUSEDmval[2] 
)
int Tilt ( TransInfo t,
const int   UNUSEDmval[2] 
)
int TimeScale ( TransInfo t,
const int   UNUSEDmval[2] 
)
int TimeSlide ( TransInfo t,
const int  mval[2] 
)
int TimeTranslate ( TransInfo t,
const int  mval[2] 
)
int ToSphere ( TransInfo t,
const int   UNUSEDmval[2] 
)
int Trackball ( TransInfo t,
const int   UNUSEDmval[2] 
)
wmKeyMap* transform_modal_keymap ( wmKeyConfig keyconf) [read]
void transformApply ( bContext C,
TransInfo t 
)
int transformEnd ( bContext C,
TransInfo t 
)
int transformEvent ( TransInfo t,
wmEvent event 
)

Definition at line 564 of file transform.c.

References addSnapPoint(), wmEvent::alt, applyMouseInput(), BIF_selectOrientation(), calc_manipulator_stats(), calculatePropRatio(), CKEY, TransInfo::con, CON_APPLY, CON_AXIS0, CON_AXIS1, CON_AXIS2, CON_SELECT, constraintModeToChar(), copy_m3_m4(), copy_v2_v2_int(), CTX_MOVIECLIP, CTX_TEXTURE, TransInfo::current_orientation, ELEM3, ELEM4, ESCKEY, EVT_MODAL_MAP, TransInfo::flag, G, GKEY, TransInfo::handleEvent, handleMouseInput(), handleNumInput(), handleSnapping(), initResize(), initRotation(), initSelectConstraint(), initSnapping(), initTrackball(), initTranslation(), KM_PRESS, KM_RELEASE, TransInfo::launch_event, LEFTMOUSE, LEFTSHIFTKEY, MAT3_UNITY, MIDDLEMOUSE, MIN2, MOD_CONSTRAINT_PLANE, MOD_CONSTRAINT_SELECT, MOD_SNAP, MOD_SNAP_INVERT, TransCon::mode, TransInfo::mode, TransInfo::modifiers, TransInfo::mouse, MOUSEMOVE, wmEvent::mval, TransInfo::mval, NULL, TransInfo::num, OKEY, OPERATOR_PASS_THROUGH, TransInfo::options, TransCon::orientation, PADENTER, PADMINUS, PADPLUSKEY, PAGEDOWNKEY, PAGEUPKEY, TransInfo::persp, postSelectConstraint(), TransInfo::prop_mode, PROP_MODE_MAX, TransInfo::prop_size, TransInfo::redraw, removeSnapPoint(), resetTransRestrictions(), restoreTransObjects(), RETKEY, RIGHTMOUSE, RIGHTSHIFTKEY, RKEY, RV3D_ORTHO, setLocalConstraint(), setUserConstraint(), wmEvent::shift, SKEY, sort_trans_data_dist(), SPACE_VIEW3D, SPACEKEY, TransInfo::spacemtx, TransInfo::spacename, TransInfo::spacetype, TransInfo::state, stopConstraint(), T_2D_EDIT, T_ALT_TRANSFORM, T_AUTOIK, T_CAMERA, T_NO_CONSTRAINT, T_PROP_CONNECTED, T_PROP_EDIT, T_RELEASE_CONFIRM, TFM_MODAL_ADD_SNAP, TFM_MODAL_AUTOIK_LEN_DEC, TFM_MODAL_AUTOIK_LEN_INC, TFM_MODAL_AXIS_X, TFM_MODAL_AXIS_Y, TFM_MODAL_AXIS_Z, TFM_MODAL_CANCEL, TFM_MODAL_CONFIRM, TFM_MODAL_CONS_OFF, TFM_MODAL_PLANE_X, TFM_MODAL_PLANE_Y, TFM_MODAL_PLANE_Z, TFM_MODAL_PROPSIZE_DOWN, TFM_MODAL_PROPSIZE_UP, TFM_MODAL_REMOVE_SNAP, TFM_MODAL_RESIZE, TFM_MODAL_ROTATE, TFM_MODAL_SNAP_INV_OFF, TFM_MODAL_SNAP_INV_ON, TFM_MODAL_SNAP_TOGGLE, TFM_MODAL_TRANSLATE, TFM_RESIZE, TFM_ROTATION, TFM_TRACKBALL, TFM_TRANSLATION, TRANS_CANCEL, TRANS_CONFIRM, TRANS_RUNNING, TRANS_STARTING, transform_autoik_update(), TREDRAW_HARD, wmEvent::type, V3D_MANIP_GLOBAL, V3D_MANIP_LOCAL, wmEvent::val, TransInfo::values, TransInfo::view, view_editmove(), WHEELDOWNMOUSE, WHEELUPMOUSE, XKEY, YKEY, and ZKEY.

Referenced by transform_modal().

int Translation ( TransInfo t,
const int   UNUSEDmval[2] 
)
static void TransMat3ToSize ( float  mat[][3],
float  smat[][3],
float *  size 
) [static]

Definition at line 2604 of file transform.c.

References copy_v3_v3(), normalize_v3(), and VECSIGNFLIP.

Referenced by ElementResize().

static void view_editmove ( unsigned short   UNUSEDevent) [static]
static void viewRedrawForce ( const bContext C,
TransInfo t 
) [static]
static void viewRedrawPost ( bContext C,
TransInfo t 
) [static]
int Warp ( TransInfo t,
const int   UNUSEDmval[2] 
)