Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform.h
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | typedef struct TransSnap { | ||||
| bool project; | bool project; | ||||
| bool snap_self; | bool snap_self; | ||||
| bool peel; | bool peel; | ||||
| bool use_backface_culling; | bool use_backface_culling; | ||||
| char status; | char status; | ||||
| /* Snapped Element Type (currently for objects only). */ | /* Snapped Element Type (currently for objects only). */ | ||||
| char snapElem; | char snapElem; | ||||
| /** snapping from this point (in global-space). */ | /** snapping from this point (in global-space). */ | ||||
| float snapPoint[3]; | |||||
| /** to this point (in global-space). */ | |||||
| float snapTarget[3]; | float snapTarget[3]; | ||||
| /** to this point (in global-space). */ | |||||
| float snapPoint[3]; | |||||
| float snapNormal[3]; | float snapNormal[3]; | ||||
| char snapNodeBorder; | char snapNodeBorder; | ||||
| ListBase points; | ListBase points; | ||||
| TransSnapPoint *selectedPoint; | TransSnapPoint *selectedPoint; | ||||
| double last; | double last; | ||||
| void (*applySnap)(struct TransInfo *, float *); | void (*applySnap)(struct TransInfo *, float *); | ||||
| void (*calcSnap)(struct TransInfo *, float *); | void (*calcSnap)(struct TransInfo *, float *); | ||||
| void (*targetSnap)(struct TransInfo *); | void (*targetSnap)(struct TransInfo *); | ||||
| ▲ Show 20 Lines • Show All 395 Lines • ▼ Show 20 Lines | |||||
| /** #TransInfo.modifiers */ | /** #TransInfo.modifiers */ | ||||
| enum { | enum { | ||||
| MOD_CONSTRAINT_SELECT = 1 << 0, | MOD_CONSTRAINT_SELECT = 1 << 0, | ||||
| MOD_PRECISION = 1 << 1, | MOD_PRECISION = 1 << 1, | ||||
| MOD_SNAP = 1 << 2, | MOD_SNAP = 1 << 2, | ||||
| MOD_SNAP_INVERT = 1 << 3, | MOD_SNAP_INVERT = 1 << 3, | ||||
| MOD_CONSTRAINT_PLANE = 1 << 4, | MOD_CONSTRAINT_PLANE = 1 << 4, | ||||
| MOD_EDIT_SNAPWITH = 1 << 5, | |||||
| }; | }; | ||||
| /* use node center for transform instead of upper-left corner. | /* use node center for transform instead of upper-left corner. | ||||
| * disabled since it makes absolute snapping not work so nicely | * disabled since it makes absolute snapping not work so nicely | ||||
| */ | */ | ||||
| // #define USE_NODE_CENTER | // #define USE_NODE_CENTER | ||||
| /* ******************************************************************************** */ | /* ******************************************************************************** */ | ||||
| ▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | enum { | ||||
| /* for analog input, like trackpad */ | /* for analog input, like trackpad */ | ||||
| TFM_MODAL_PROPSIZE = 26, | TFM_MODAL_PROPSIZE = 26, | ||||
| /* node editor insert offset (aka auto-offset) direction toggle */ | /* node editor insert offset (aka auto-offset) direction toggle */ | ||||
| TFM_MODAL_INSERTOFS_TOGGLE_DIR = 27, | TFM_MODAL_INSERTOFS_TOGGLE_DIR = 27, | ||||
| TFM_MODAL_AUTOCONSTRAINT = 28, | TFM_MODAL_AUTOCONSTRAINT = 28, | ||||
| TFM_MODAL_AUTOCONSTRAINTPLANE = 29, | TFM_MODAL_AUTOCONSTRAINTPLANE = 29, | ||||
| TFM_MODAL_EDIT_SNAPWITH = 30, | |||||
| }; | }; | ||||
| bool initTransform(struct bContext *C, | bool initTransform(struct bContext *C, | ||||
| struct TransInfo *t, | struct TransInfo *t, | ||||
| struct wmOperator *op, | struct wmOperator *op, | ||||
| const struct wmEvent *event, | const struct wmEvent *event, | ||||
| int mode); | int mode); | ||||
| void saveTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op); | void saveTransform(struct bContext *C, struct TransInfo *t, struct wmOperator *op); | ||||
| ▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines | |||||