Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform.h
| Show First 20 Lines • Show All 415 Lines • ▼ Show 20 Lines | typedef struct TransData { | ||||
| short protectflag; | short protectflag; | ||||
| } TransData; | } TransData; | ||||
| typedef struct TransDataMirror { | typedef struct TransDataMirror { | ||||
| /** location of mirrored reference data. */ | /** location of mirrored reference data. */ | ||||
| const float *loc_src; | const float *loc_src; | ||||
| /** Location of the data to transform. */ | /** Location of the data to transform. */ | ||||
| float *loc_dst; | float *loc_dst; | ||||
| /** Used to calculate the center of the transformation (in `calculateCenter`). */ | |||||
| float center[3]; | |||||
| void *extra; | void *extra; | ||||
| /* `sign` can be -2, -1, 0 or 1. */ | /* `sign` can be -2, -1, 0 or 1. */ | ||||
| int sign_x : 2; | int sign_x : 2; | ||||
| int sign_y : 2; | int sign_y : 2; | ||||
| int sign_z : 2; | int sign_z : 2; | ||||
| uint flag : 2; | |||||
| } TransDataMirror; | } TransDataMirror; | ||||
| typedef struct MouseInput { | typedef struct MouseInput { | ||||
| void (*apply)(struct TransInfo *t, struct MouseInput *mi, const double mval[2], float output[3]); | void (*apply)(struct TransInfo *t, struct MouseInput *mi, const double mval[2], float output[3]); | ||||
| void (*post)(struct TransInfo *t, float values[3]); | void (*post)(struct TransInfo *t, float values[3]); | ||||
| /** Initial mouse position. */ | /** Initial mouse position. */ | ||||
| int imval[2]; | int imval[2]; | ||||
| ▲ Show 20 Lines • Show All 380 Lines • ▼ Show 20 Lines | enum { | ||||
| CON_AXIS1 = 1 << 2, | CON_AXIS1 = 1 << 2, | ||||
| CON_AXIS2 = 1 << 3, | CON_AXIS2 = 1 << 3, | ||||
| CON_SELECT = 1 << 4, | CON_SELECT = 1 << 4, | ||||
| /** Does not reorient vector to face viewport when on. */ | /** Does not reorient vector to face viewport when on. */ | ||||
| CON_NOFLIP = 1 << 5, | CON_NOFLIP = 1 << 5, | ||||
| CON_USER = 1 << 6, | CON_USER = 1 << 6, | ||||
| }; | }; | ||||
| /** #TransData.flag */ | /** #TransData.flag & #TransDataMirror.flag */ | ||||
| enum { | enum { | ||||
| TD_SELECTED = 1 << 0, | TD_SELECTED = 1 << 0, | ||||
| TD_NOCENTER = 1 << 1, | |||||
| TD_NOACTION = 1 << 2, | TD_NOACTION = 1 << 2, | ||||
| TD_USEQUAT = 1 << 3, | TD_USEQUAT = 1 << 3, | ||||
| TD_NOTCONNECTED = 1 << 4, | TD_NOTCONNECTED = 1 << 4, | ||||
| /** Used for scaling of #MetaElem.rad */ | /** Used for scaling of #MetaElem.rad */ | ||||
| TD_SINGLESIZE = 1 << 5, | TD_SINGLESIZE = 1 << 5, | ||||
| /** Scale relative to individual element center */ | /** Scale relative to individual element center */ | ||||
| TD_INDIVIDUAL_SCALE = 1 << 8, | TD_INDIVIDUAL_SCALE = 1 << 8, | ||||
| TD_NOCENTER = 1 << 9, | |||||
| /** #TransData.ext abused for particle key timing. */ | /** #TransData.ext abused for particle key timing. */ | ||||
| TD_NO_EXT = 1 << 10, | TD_NO_EXT = 1 << 10, | ||||
| /** don't transform this data */ | /** don't transform this data */ | ||||
| TD_SKIP = 1 << 11, | TD_SKIP = 1 << 11, | ||||
| /** if this is a bez triple, we need to restore the handles, | /** if this is a bez triple, we need to restore the handles, | ||||
| * if this is set #TransData.hdata needs freeing */ | * if this is set #TransData.hdata needs freeing */ | ||||
| TD_BEZTRIPLE = 1 << 12, | TD_BEZTRIPLE = 1 << 12, | ||||
| /** when this is set, don't apply translation changes to this element */ | /** when this is set, don't apply translation changes to this element */ | ||||
| ▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines | |||||