Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform.h
| Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | |||||
| } eTFlag; | } eTFlag; | ||||
| /** #TransInfo.modifiers */ | /** #TransInfo.modifiers */ | ||||
| typedef enum { | typedef enum { | ||||
| MOD_CONSTRAINT_SELECT_AXIS = 1 << 0, | MOD_CONSTRAINT_SELECT_AXIS = 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_SELECT_PLANE = 1 << 4, | MOD_SNAP_TEMP = 1 << 4, | ||||
| MOD_CONSTRAINT_SELECT_PLANE = 1 << 5, | |||||
| MOD_EDIT_SNAPSOURCE = 1 << 6, | |||||
| } eTModifier; | } eTModifier; | ||||
| /** #TransSnap.status */ | /** #TransSnap.status */ | ||||
| typedef enum { | typedef enum { | ||||
| SNAP_FORCED = 1 << 0, | SNAP_FORCED = 1 << 0, | ||||
| TARGET_INIT = 1 << 1, | TARGET_INIT = 1 << 1, | ||||
| /* Special flag for snap to grid. */ | /* Special flag for snap to grid. */ | ||||
| TARGET_GRID_INIT = 1 << 2, | TARGET_GRID_INIT = 1 << 2, | ||||
| POINT_INIT = 1 << 3, | POINT_INIT = 1 << 3, | ||||
| MULTI_POINTS = 1 << 4, | MULTI_POINTS = 1 << 4, | ||||
| CUSTOM_SNAPPOINT = 1 << 5, | |||||
| } eTSnap; | } eTSnap; | ||||
| /** #TransCon.mode, #TransInfo.con.mode */ | /** #TransCon.mode, #TransInfo.con.mode */ | ||||
| typedef enum { | typedef enum { | ||||
| /** When set constraints are in use. */ | /** When set constraints are in use. */ | ||||
| CON_APPLY = 1 << 0, | CON_APPLY = 1 << 0, | ||||
| /** These are only used for modal execution. */ | /** These are only used for modal execution. */ | ||||
| CON_AXIS0 = 1 << 1, | CON_AXIS0 = 1 << 1, | ||||
| ▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | enum { | ||||
| TFM_MODAL_PROPSIZE = 26, | TFM_MODAL_PROPSIZE = 26, | ||||
| /** Node editor insert offset (also called auto-offset) direction toggle. */ | /** Node editor insert offset (also called 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_PRECISION = 30, | TFM_MODAL_PRECISION = 30, | ||||
| TFM_MODAL_EDIT_SNAP_SOURCE = 31, | |||||
| }; | }; | ||||
| /** \} */ | /** \} */ | ||||
| typedef struct TransSnapPoint { | typedef struct TransSnapPoint { | ||||
| struct TransSnapPoint *next, *prev; | struct TransSnapPoint *next, *prev; | ||||
| float co[3]; | float co[3]; | ||||
| } TransSnapPoint; | } TransSnapPoint; | ||||
| typedef struct TransSnap { | typedef struct TransSnap { | ||||
| short mode; | short mode; | ||||
| short target; | short target; | ||||
| short modePoint; | short modePoint; | ||||
| short modeSelect; | short modeSelect; | ||||
| bool align; | bool align; | ||||
| bool project; | bool project; | ||||
| bool snap_self; | bool snap_self; | ||||
| bool peel; | bool peel; | ||||
| bool use_backface_culling; | bool use_backface_culling; | ||||
| eTSnap status; | eTSnap 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 snapTargetGrid[3]; | float snapTargetGrid[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 *); | ||||
| ▲ Show 20 Lines • Show All 501 Lines • Show Last 20 Lines | |||||