Context parameter for Transform.

For tex space edit, crease (soon) and future use.


Manipulator assumes no context.
This commit is contained in:
2005-03-27 21:25:15 +00:00
parent 35aa81cd2c
commit 05685e6ca7
7 changed files with 37 additions and 35 deletions

View File

@@ -1226,10 +1226,9 @@ static void createTransObject(void)
static void createTransData(TransInfo *t)
{
if( t->mode & TFM_TEX) {
if (t->context == CTX_TEXTURE) {
t->flag |= T_TEXTURE;
createTransTexspace();
t->mode &= ~TFM_TEX; // now becoming normal grab/rot/scale
}
else if (G.obpose) {
t->flag |= T_POSE;
@@ -1278,7 +1277,7 @@ static void createTransData(TransInfo *t)
/* ************************** TRANSFORMATIONS **************************** */
void Transform(int mode)
void Transform(int mode, int context)
{
int ret_val = 0;
short pmval[2] = {0, 0}, mval[2], val;
@@ -1305,6 +1304,8 @@ void Transform(int mode)
else {
LastMode = mode;
}
Trans.context = context;
initTransModeFlags(&Trans, mode); // modal settings in struct Trans
@@ -1616,6 +1617,8 @@ void ManipulatorTransform(int mode)
}
/* END */
Trans.context = CTX_NONE;
initTransModeFlags(&Trans, mode); // modal settings in struct Trans
initTrans(&Trans); // internal data, mouse, vectors
@@ -2457,7 +2460,6 @@ int Rotation(TransInfo *t, short mval[2])
sprintf(str, "Rot: %.2f %s", 180.0*final/M_PI, t->proptext);
}
//printf("Axis %f %f %f\n", axis[0], axis[1], axis[2]);
VecRotToMat3(axis, final * td->factor, mat);
t->val = final; // used in manipulator