short idx;
short idx_max;
short flag; /* Different flags to indicate different behaviors */
- float val[3]; /* Direct value of the input */
- int ctrl[3]; /* Control to indicate what to do with the numbers that are typed */
+ char inv[3]; /* If the value is inverted or not */
+ float val[3]; /* Direct value of the input */
+ int ctrl[3]; /* Control to indicate what to do with the numbers that are typed */
} NumInput ;
/*
char *h1, *h2;
} TransDataCurveHandleFlags;
+/* for sequencer transform */
+typedef struct TransDataSeq {
+ struct Sequence *seq;
+ int flag; /* a copy of seq->flag that may be modified for nested strips */
+ short start_offset; /* use this so we can have transform data at the strips start, but apply correctly to the start frame */
+ short sel_flag; /* one of SELECT, SEQ_LEFTSEL and SEQ_RIGHTSEL */
+
+} TransDataSeq;
typedef struct TransData {
float dist; /* Distance needed to affect element (for Proportionnal Editing) */
void *extra; /* extra data (mirrored element pointer, in editmode mesh to EditVert) (editbone for roll fixing) (...) */
short flag; /* Various flags */
short protectflag; /* If set, copy of Object or PoseChannel protection */
-/*#ifdef WITH_VERSE*/
- void *verse; /* pointer at verse data struct (VerseVert, etc.) */
-/*#endif*/
} TransData;
typedef struct MouseInput {
short imval[2]; /* initial mouse position */
short idx_max; /* maximum index on the input vector */
float snap[3]; /* Snapping Gears */
+ char frame_side; /* Mouse side of the cfra, 'L', 'R' or 'B' */
float viewmat[4][4]; /* copy from G.vd, prevents feedback, */
float viewinv[4][4]; /* and to make sure we don't have to */
struct Scene *scene;
short mval[2]; /* current mouse position */
struct Object *obedit;
+ void *draw_handle;
} TransInfo;
#define CON_AXIS2 8
#define CON_SELECT 16
#define CON_NOFLIP 32 /* does not reorient vector to face viewport when on */
-#define CON_LOCAL 64
-#define CON_USER 128
+#define CON_USER 64
/* transdata->flag */
#define TD_SELECTED 1
#define TD_USEQUAT (1 << 3)
#define TD_NOTCONNECTED (1 << 4)
#define TD_SINGLESIZE (1 << 5) /* used for scaling of MetaElem->rad */
-#ifdef WITH_VERSE
- #define TD_VERSE_OBJECT (1 << 6)
- #define TD_VERSE_VERT (1 << 7)
-#endif
#define TD_TIMEONLY (1 << 8)
#define TD_NOCENTER (1 << 9)
#define TD_NO_EXT (1 << 10) /* ext abused for particle key timing */
void initTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op, struct wmEvent *event);
void saveTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op);
void transformEvent(TransInfo *t, struct wmEvent *event);
-void transformApply(TransInfo *t);
+void transformApply(struct bContext *C, TransInfo *t);
int transformEnd(struct bContext *C, TransInfo *t);
void setTransformViewMatrices(TransInfo *t);
void projectIntView(TransInfo *t, float *vec, int *adr);
void projectFloatView(TransInfo *t, float *vec, float *adr);
-void convertVecToDisplayNum(float *vec, float *num);
-void convertDisplayNumToVec(float *num, float *vec);
+void applyAspectRatio(TransInfo *t, float *vec);
+void removeAspectRatio(TransInfo *t, float *vec);
void initWarp(TransInfo *t);
int handleEventWarp(TransInfo *t, struct wmEvent *event);
void initAlign(TransInfo *t);
int Align(TransInfo *t, short mval[2]);
+
+void drawPropCircle(TransInfo *t);
+
/*********************** transform_conversions.c ********** */
struct ListBase;
void flushTransGPactionData(TransInfo *t);
void flushTransParticles(TransInfo *t);
int clipUVTransform(TransInfo *t, float *vec, int resize);
void flushTransNodes(TransInfo *t);
+void flushTransSeq(TransInfo *t);
/*********************** exported from transform_manipulator.c ********** */
void draw_manipulator_ext(struct ScrArea *sa, int type, char axis, int col, float vec[3], float mat[][3]);
int calc_manipulator_stats(struct ScrArea *sa);
-float get_drawsize(struct View3D *v3d, struct ScrArea *sa, float *co);
+float get_drawsize(struct ARegion *ar, float *co);
/*********************** TransData Creation and General Handling *********** */
void createTransData(struct bContext *C, TransInfo *t);
/*********************** Constraints *****************************/
+void drawConstraint(TransInfo *t);
+
void getConstraintMatrix(TransInfo *t);
void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]);
void setLocalConstraint(TransInfo *t, int mode, const char text[]);
void postTrans (TransInfo *t);
void resetTransRestrictions(TransInfo *t);
-void drawLine(float *center, float *dir, char axis, short options);
+void drawLine(TransInfo *t, float *center, float *dir, char axis, short options);
TransDataCurveHandleFlags *initTransDataCurveHandes(TransData *td, struct BezTriple *bezt);
#define NDOF_CANCEL 4
-/*********************** TransSpace ******************************/
+/*********************** Transform Orientations ******************************/
+
+void initTransformOrientation(struct bContext *C, TransInfo *t);
-int manageObjectSpace(int confirm, int set);
-int manageMeshSpace(int confirm, int set);
-int manageBoneSpace(int confirm, int set);
+int manageObjectSpace(struct bContext *C, int confirm, int set);
+int manageMeshSpace(struct bContext *C, int confirm, int set);
+int manageBoneSpace(struct bContext *C, int confirm, int set);
/* Those two fill in mat and return non-zero on success */
int createSpaceNormal(float mat[3][3], float normal[3]);
int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]);
-int addMatrixSpace(float mat[3][3], char name[]);
-int addObjectSpace(struct Object *ob);
-void applyTransformOrientation(void);
+int addMatrixSpace(struct bContext *C, float mat[3][3], char name[]);
+int addObjectSpace(struct bContext *C, struct Object *ob);
+void applyTransformOrientation(struct bContext *C, TransInfo *t);
#define ORIENTATION_NONE 0