Cleanup: Remove unused flag
This commit is contained in:
parent
91fb07f361
commit
5c54a609a9
|
@ -610,56 +610,53 @@ enum {
|
|||
T_CURSOR = 1 << 5,
|
||||
/** Transform points, having no rotation/scale. */
|
||||
T_POINTS = 1 << 6,
|
||||
|
||||
/* empty slot - (1 << 7) */
|
||||
|
||||
/** restrictions flags */
|
||||
T_NO_CONSTRAINT = 1 << 8,
|
||||
T_NULL_ONE = 1 << 9,
|
||||
T_NO_ZERO = 1 << 10,
|
||||
T_NO_CONSTRAINT = 1 << 7,
|
||||
T_NULL_ONE = 1 << 8,
|
||||
T_NO_ZERO = 1 << 9,
|
||||
T_ALL_RESTRICTIONS = T_NO_CONSTRAINT | T_NULL_ONE | T_NO_ZERO,
|
||||
|
||||
T_PROP_EDIT = 1 << 11,
|
||||
T_PROP_CONNECTED = 1 << 12,
|
||||
T_PROP_PROJECTED = 1 << 13,
|
||||
T_PROP_EDIT = 1 << 10,
|
||||
T_PROP_CONNECTED = 1 << 11,
|
||||
T_PROP_PROJECTED = 1 << 12,
|
||||
T_PROP_EDIT_ALL = T_PROP_EDIT | T_PROP_CONNECTED | T_PROP_PROJECTED,
|
||||
|
||||
T_V3D_ALIGN = 1 << 14,
|
||||
T_V3D_ALIGN = 1 << 13,
|
||||
/** For 2d views like uv or fcurve. */
|
||||
T_2D_EDIT = 1 << 15,
|
||||
T_CLIP_UV = 1 << 16,
|
||||
T_2D_EDIT = 1 << 14,
|
||||
T_CLIP_UV = 1 << 15,
|
||||
|
||||
/** Auto-ik is on. */
|
||||
T_AUTOIK = 1 << 18,
|
||||
T_AUTOIK = 1 << 16,
|
||||
|
||||
/** Don't use mirror even if the data-block option is set. */
|
||||
T_NO_MIRROR = 1 << 19,
|
||||
T_NO_MIRROR = 1 << 17,
|
||||
|
||||
/** To indicate that the value set in the `value` parameter is the final
|
||||
* value of the transformation, modified only by the constrain. */
|
||||
T_INPUT_IS_VALUES_FINAL = 1 << 20,
|
||||
T_INPUT_IS_VALUES_FINAL = 1 << 18,
|
||||
|
||||
/** To specify if we save back settings at the end. */
|
||||
T_MODAL = 1 << 21,
|
||||
T_MODAL = 1 << 19,
|
||||
|
||||
/** No retopo. */
|
||||
T_NO_PROJECT = 1 << 22,
|
||||
T_NO_PROJECT = 1 << 20,
|
||||
|
||||
T_RELEASE_CONFIRM = 1 << 23,
|
||||
T_RELEASE_CONFIRM = 1 << 21,
|
||||
|
||||
/** Alternative transformation. used to add offset to tracking markers. */
|
||||
T_ALT_TRANSFORM = 1 << 24,
|
||||
T_ALT_TRANSFORM = 1 << 22,
|
||||
|
||||
/** #TransInfo.center has been set, don't change it. */
|
||||
T_OVERRIDE_CENTER = 1 << 25,
|
||||
T_OVERRIDE_CENTER = 1 << 23,
|
||||
|
||||
T_MODAL_CURSOR_SET = 1 << 26,
|
||||
T_MODAL_CURSOR_SET = 1 << 24,
|
||||
|
||||
T_CLNOR_REBUILD = 1 << 27,
|
||||
T_CLNOR_REBUILD = 1 << 25,
|
||||
|
||||
/* Special Aftertrans. */
|
||||
T_AUTOMERGE = 1 << 28,
|
||||
T_AUTOSPLIT = 1 << 29,
|
||||
T_AUTOMERGE = 1 << 26,
|
||||
T_AUTOSPLIT = 1 << 27,
|
||||
};
|
||||
|
||||
/** #TransInfo.modifiers */
|
||||
|
@ -706,40 +703,39 @@ enum {
|
|||
/** #TransData.flag */
|
||||
enum {
|
||||
TD_SELECTED = 1 << 0,
|
||||
TD_NOACTION = 1 << 2,
|
||||
TD_USEQUAT = 1 << 3,
|
||||
TD_NOTCONNECTED = 1 << 4,
|
||||
TD_USEQUAT = 1 << 1,
|
||||
TD_NOTCONNECTED = 1 << 2,
|
||||
/** Used for scaling of #MetaElem.rad */
|
||||
TD_SINGLESIZE = 1 << 5,
|
||||
TD_SINGLESIZE = 1 << 3,
|
||||
/** Scale relative to individual element center */
|
||||
TD_INDIVIDUAL_SCALE = 1 << 8,
|
||||
TD_NOCENTER = 1 << 9,
|
||||
TD_INDIVIDUAL_SCALE = 1 << 4,
|
||||
TD_NOCENTER = 1 << 5,
|
||||
/** #TransData.ext abused for particle key timing. */
|
||||
TD_NO_EXT = 1 << 10,
|
||||
TD_NO_EXT = 1 << 6,
|
||||
/** don't transform this data */
|
||||
TD_SKIP = 1 << 11,
|
||||
TD_SKIP = 1 << 7,
|
||||
/** if this is a bez triple, we need to restore the handles,
|
||||
* if this is set #TransData.hdata needs freeing */
|
||||
TD_BEZTRIPLE = 1 << 12,
|
||||
TD_BEZTRIPLE = 1 << 8,
|
||||
/** when this is set, don't apply translation changes to this element */
|
||||
TD_NO_LOC = 1 << 13,
|
||||
TD_NO_LOC = 1 << 9,
|
||||
/** For Graph Editor autosnap, indicates that point should not undergo autosnapping */
|
||||
TD_NOTIMESNAP = 1 << 14,
|
||||
TD_NOTIMESNAP = 1 << 10,
|
||||
/** For Graph Editor - curves that can only have int-values
|
||||
* need their keyframes tagged with this. */
|
||||
TD_INTVALUES = 1 << 15,
|
||||
TD_INTVALUES = 1 << 11,
|
||||
/** For editmode mirror, clamp axis to 0 */
|
||||
TD_MIRROR_EDGE_X = 1 << 16,
|
||||
TD_MIRROR_EDGE_Y = 1 << 17,
|
||||
TD_MIRROR_EDGE_Z = 1 << 18,
|
||||
TD_MIRROR_EDGE_X = 1 << 12,
|
||||
TD_MIRROR_EDGE_Y = 1 << 13,
|
||||
TD_MIRROR_EDGE_Z = 1 << 14,
|
||||
/** For fcurve handles, move them along with their keyframes */
|
||||
TD_MOVEHANDLE1 = 1 << 19,
|
||||
TD_MOVEHANDLE2 = 1 << 20,
|
||||
TD_MOVEHANDLE1 = 1 << 15,
|
||||
TD_MOVEHANDLE2 = 1 << 16,
|
||||
/** Exceptional case with pose bone rotating when a parent bone has 'Local Location'
|
||||
* option enabled and rotating also transforms it. */
|
||||
TD_PBONE_LOCAL_MTX_P = 1 << 21,
|
||||
TD_PBONE_LOCAL_MTX_P = 1 << 17,
|
||||
/** Same as above but for a child bone. */
|
||||
TD_PBONE_LOCAL_MTX_C = 1 << 22,
|
||||
TD_PBONE_LOCAL_MTX_C = 1 << 18,
|
||||
};
|
||||
|
||||
/** #TransSnap.status */
|
||||
|
|
|
@ -827,10 +827,6 @@ void clipUVData(TransInfo *t)
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (int a = 0; a < tc->data_len; a++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((td->flag & TD_SKIP) || (!td->loc)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -2390,10 +2386,6 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
|
|||
PTCacheID *pid;
|
||||
ob = td->ob;
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -174,9 +174,6 @@ static void clipMirrorModifier(TransInfo *t)
|
|||
int clip;
|
||||
float loc[3], iloc[3];
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
if (td->loc == NULL) {
|
||||
break;
|
||||
}
|
||||
|
@ -1068,11 +1065,6 @@ static void recalcData_objects(TransInfo *t)
|
|||
|
||||
for (int i = 0; i < tc->data_len; i++, td++) {
|
||||
Object *ob = td->ob;
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
@ -2412,19 +2404,11 @@ void calculatePropRatio(TransInfo *t)
|
|||
}
|
||||
else if ((connected && (td->flag & TD_NOTCONNECTED || td->dist > t->prop_size)) ||
|
||||
(connected == 0 && td->rdist > t->prop_size)) {
|
||||
/*
|
||||
* The elements are sorted according to their dist member in the array,
|
||||
* that means we can stop when it finds one element outside of the propsize.
|
||||
* do not set 'td->flag |= TD_NOACTION', the prop circle is being changed.
|
||||
*/
|
||||
|
||||
td->factor = 0.0f;
|
||||
restoreElement(td);
|
||||
}
|
||||
else {
|
||||
/* Use rdist for falloff calculations, it is the real distance */
|
||||
td->flag &= ~TD_NOACTION;
|
||||
|
||||
if (connected) {
|
||||
dist = (t->prop_size - td->dist) / t->prop_size;
|
||||
}
|
||||
|
|
|
@ -52,10 +52,6 @@ static void applyAlign(TransInfo *t, const int UNUSED(mval[2]))
|
|||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
float mat[3][3], invmat[3][3];
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -97,10 +97,6 @@ static void applyBakeTime(TransInfo *t, const int mval[2])
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -141,10 +141,6 @@ static void applyBoneSize(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -186,10 +186,6 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2]))
|
|||
float delta[3];
|
||||
float fac, fac_scaled;
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -73,10 +73,6 @@ static void applyBoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -75,10 +75,6 @@ static void applyBoneRoll(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -73,10 +73,6 @@ static void applyCurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -87,10 +87,6 @@ static void applyBevelWeight(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->val) {
|
||||
*td->val = td->ival + weight * td->factor;
|
||||
if (*td->val < 0.0f) {
|
||||
|
|
|
@ -87,10 +87,6 @@ static void applyCrease(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -81,10 +81,6 @@ static void applySeqSlideValue(TransInfo *t, const float val[2])
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -73,10 +73,6 @@ static void applyGPOpacity(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -73,10 +73,6 @@ static void applyGPShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -78,10 +78,6 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
@ -97,10 +93,6 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (td = tc->data, i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -69,10 +69,6 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
@ -93,10 +89,6 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -82,10 +82,6 @@ static void applyPushPull(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -93,10 +93,6 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -82,10 +82,6 @@ static void applyRotationValue(TransInfo *t,
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -165,11 +165,6 @@ static void applyShear(TransInfo *t, const int UNUSED(mval[2]))
|
|||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
const float *center, *co;
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -95,10 +95,6 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
float tdistance; /* temp dist */
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -73,11 +73,6 @@ static void applySkinResize(TransInfo *t, const int UNUSED(mval[2]))
|
|||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
float tmat[3][3], smat[3][3];
|
||||
float fsize[3];
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -77,10 +77,6 @@ static void applyTilt(TransInfo *t, const int UNUSED(mval[2]))
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -79,10 +79,6 @@ static void applyToSphere(TransInfo *t, const int UNUSED(mval[2]))
|
|||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
float tratio;
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -63,10 +63,6 @@ static void applyTrackballValue(TransInfo *t,
|
|||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -236,10 +236,6 @@ static void applyTranslationValue(TransInfo *t, const float vec[3])
|
|||
|
||||
TransData *td = tc->data;
|
||||
for (int i = 0; i < tc->data_len; i++, td++) {
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -306,11 +306,6 @@ void applyProject(TransInfo *t)
|
|||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
float iloc[3], loc[3], no[3];
|
||||
float mval_fl[2];
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
@ -417,11 +412,6 @@ void applyGridAbsolute(TransInfo *t)
|
|||
|
||||
for (i = 0, td = tc->data; i < tc->data_len; i++, td++) {
|
||||
float iloc[3], loc[3], tvec[3];
|
||||
|
||||
if (td->flag & TD_NOACTION) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue