diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-03-29 23:52:53 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-03-29 23:52:53 +0400 |
commit | 9d4543bd29625699271d50c66c1a27beed7bab6b (patch) | |
tree | d2630ccb314bdc56800ad8f6611398b1721c8dcf /source/blender/editors/transform/transform.h | |
parent | 6705b6f96ea4255f6bd69a039562ed603a83a83e (diff) |
Add snapping parameters to transform operators (only Translation, Resize and Rotation, since those are the one ones that support it).
Diffstat (limited to 'source/blender/editors/transform/transform.h')
-rw-r--r-- | source/blender/editors/transform/transform.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 655bff34181..dfbc22b1e14 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -80,8 +80,9 @@ typedef struct NumInput { typedef struct TransSnap { short modePoint; short modeTarget; - int mode; - int status; + short mode; + short align; + short status; float snapPoint[3]; float snapTarget[3]; float snapNormal[3]; @@ -351,8 +352,9 @@ typedef struct TransInfo { /* transsnap->status */ #define SNAP_ON 1 -#define TARGET_INIT 2 -#define POINT_INIT 4 +#define SNAP_FORCED 2 +#define TARGET_INIT 4 +#define POINT_INIT 8 /* transsnap->modePoint */ #define SNAP_GRID 0 @@ -522,7 +524,7 @@ typedef enum { void snapGrid(TransInfo *t, float *val); void snapGridAction(TransInfo *t, float *val, GearsType action); -void initSnapping(struct TransInfo *t); +void initSnapping(struct TransInfo *t, struct wmOperator *op); void applySnapping(TransInfo *t, float *vec); void resetSnapping(TransInfo *t); int handleSnapping(TransInfo *t, struct wmEvent *event); |