struct bConstraint;
struct BezTriple;
struct wmOperatorType;
+struct wmOperator;
struct bContext;
struct wmEvent;
struct ARegion;
typedef struct TransInfo {
int mode; /* current mode */
int flag; /* generic flags for special behaviors */
+ int modifiers; /* special modifiers, by function, not key */
short state; /* current state (running, canceled,...)*/
int options; /* current context/options for transform */
float val; /* init value for some transformations (and rotation angle) */
struct ScrArea *sa;
struct ARegion *ar;
struct Scene *scene;
- struct wmEvent *event; /* last event, reset at the start of each transformApply and nulled at the transformEnd */
short mval[2]; /* current mouse position */
struct Object *obedit;
} TransInfo;
#define T_PROP_EDIT (1 << 11)
#define T_PROP_CONNECTED (1 << 12)
- /* if MMB is pressed or not */
-#define T_MMB_PRESSED (1 << 13)
-
#define T_V3D_ALIGN (1 << 14)
/* for 2d views like uv or ipo */
#define T_2D_EDIT (1 << 15)
/* auto-ik is on */
#define T_AUTOIK (1 << 18)
+/* TransInfo->modifiers */
+#define MOD_CONSTRAINT_SELECT 0x01
+#define MOD_PRECISION 0x02
+#define MOD_SNAP_GEARS 0x04
+#define MOD_CONSTRAINT_PLANE 0x08
+
+
/* ******************************************************************************** */
/* transinfo->con->mode */
void TFM_OT_transform(struct wmOperatorType *ot);
-void initTransform(struct bContext *C, struct TransInfo *t, int mode, int context, struct wmEvent *event);
+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);
int transformEnd(struct bContext *C, TransInfo *t);
void initAlign(TransInfo *t);
int Align(TransInfo *t, short mval[2]);
-void initNodeTranslate(TransInfo *t);
-int NodeTranslate(TransInfo *t, short mval[2]);
-
/*********************** transform_conversions.c ********** */
struct ListBase;
void flushTransGPactionData(TransInfo *t);
void flushTransUVs(TransInfo *t);
void flushTransParticles(TransInfo *t);
int clipUVTransform(TransInfo *t, float *vec, int resize);
+void flushTransNodes(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]);