*silly whistling*
See, in theory, I didn't make typos when coding. Explanation: iloc*loc will be negative when the sign changes between them, so we can snap if an element cross the limit.
This commit is contained in:
@@ -140,13 +140,13 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
|
||||
if (td->flag & TD_NOACTION)
|
||||
break;
|
||||
if(mmd->axis==0) {
|
||||
if(td->loc[0]*td->loc[0]<0.0f) td->loc[0]= 0.0f;
|
||||
if(td->loc[0]*td->iloc[0]<0.0f) td->loc[0]= 0.0f;
|
||||
}
|
||||
else if(mmd->axis==1) {
|
||||
if(td->loc[1]*td->loc[1]<0.0f) td->loc[1]= 0.0f;
|
||||
if(td->loc[1]*td->iloc[1]<0.0f) td->loc[1]= 0.0f;
|
||||
}
|
||||
else {
|
||||
if(td->loc[2]*td->loc[2]<0.0f) td->loc[2]= 0.0f;
|
||||
if(td->loc[2]*td->iloc[2]<0.0f) td->loc[2]= 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user