IMPORTANT NOTE: Locking axis (planar constraints) now works with ALT instead of CTRL. Ctrl might have caused problems in the long run, with people holding down ctrl for precision and then having to release it so to press an axis key if they don't want to lock it.
Finish adding local constraints for multiple objects: One of the objects will have its axis highlighted lighter than the others. You control this one with your mouse and the others copy the motion on their respective axis. Code changes: the TD_OBJECT flag is now a flag in TransInfo with the new T_POSE, T_EDIT and T_TEXTURE
This commit is contained in:
@@ -1084,7 +1084,7 @@ static void createTransObject(void)
|
|||||||
if TESTBASELIB(base) {
|
if TESTBASELIB(base) {
|
||||||
ob= base->object;
|
ob= base->object;
|
||||||
|
|
||||||
td->flag= TD_SELECTED|TD_OBJECT;
|
td->flag= TD_SELECTED;
|
||||||
td->ext = tx;
|
td->ext = tx;
|
||||||
|
|
||||||
/* store ipo keys? */
|
/* store ipo keys? */
|
||||||
@@ -1148,13 +1148,16 @@ static void createTransObject(void)
|
|||||||
static void createTransData(TransInfo *t)
|
static void createTransData(TransInfo *t)
|
||||||
{
|
{
|
||||||
if( t->mode & TFM_TEX) {
|
if( t->mode & TFM_TEX) {
|
||||||
|
t->flag &= T_TEXTURE;
|
||||||
createTransTexspace();
|
createTransTexspace();
|
||||||
t->mode &= ~TFM_TEX; // now becoming normal grab/rot/scale
|
t->mode &= ~TFM_TEX; // now becoming normal grab/rot/scale
|
||||||
}
|
}
|
||||||
else if (G.obpose) {
|
else if (G.obpose) {
|
||||||
|
t->flag &= T_POSE;
|
||||||
createTransPose();
|
createTransPose();
|
||||||
}
|
}
|
||||||
else if (G.obedit) {
|
else if (G.obedit) {
|
||||||
|
t->flag &= T_EDIT;
|
||||||
if (G.obedit->type == OB_MESH) {
|
if (G.obedit->type == OB_MESH) {
|
||||||
createTransEditVerts();
|
createTransEditVerts();
|
||||||
}
|
}
|
||||||
@@ -1182,6 +1185,7 @@ static void createTransData(TransInfo *t)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
createTransObject();
|
createTransObject();
|
||||||
|
t->flag &= T_OBJECT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1330,7 +1334,7 @@ void Transform(int mode)
|
|||||||
else if(cmode == 'x') {
|
else if(cmode == 'x') {
|
||||||
if (G.qual == 0)
|
if (G.qual == 0)
|
||||||
setLocalConstraint(&Trans, (CON_AXIS0), "along local X");
|
setLocalConstraint(&Trans, (CON_AXIS0), "along local X");
|
||||||
else if (G.qual == LR_CTRLKEY)
|
else if (G.qual == LR_ALTKEY)
|
||||||
setLocalConstraint(&Trans, (CON_AXIS1|CON_AXIS2), "locking local X");
|
setLocalConstraint(&Trans, (CON_AXIS1|CON_AXIS2), "locking local X");
|
||||||
|
|
||||||
cmode = 'X';
|
cmode = 'X';
|
||||||
@@ -1338,7 +1342,7 @@ void Transform(int mode)
|
|||||||
else {
|
else {
|
||||||
if (G.qual == 0)
|
if (G.qual == 0)
|
||||||
setConstraint(&Trans, mati, (CON_AXIS0), "along global X");
|
setConstraint(&Trans, mati, (CON_AXIS0), "along global X");
|
||||||
else if (G.qual == LR_CTRLKEY)
|
else if (G.qual == LR_ALTKEY)
|
||||||
setConstraint(&Trans, mati, (CON_AXIS1|CON_AXIS2), "locking global X");
|
setConstraint(&Trans, mati, (CON_AXIS1|CON_AXIS2), "locking global X");
|
||||||
|
|
||||||
cmode = 'x';
|
cmode = 'x';
|
||||||
@@ -1353,7 +1357,7 @@ void Transform(int mode)
|
|||||||
else if(cmode == 'y') {
|
else if(cmode == 'y') {
|
||||||
if (G.qual == 0)
|
if (G.qual == 0)
|
||||||
setLocalConstraint(&Trans, (CON_AXIS1), "along global Y");
|
setLocalConstraint(&Trans, (CON_AXIS1), "along global Y");
|
||||||
else if (G.qual == LR_CTRLKEY)
|
else if (G.qual == LR_ALTKEY)
|
||||||
setLocalConstraint(&Trans, (CON_AXIS0|CON_AXIS2), "locking global Y");
|
setLocalConstraint(&Trans, (CON_AXIS0|CON_AXIS2), "locking global Y");
|
||||||
|
|
||||||
cmode = 'Y';
|
cmode = 'Y';
|
||||||
@@ -1361,7 +1365,7 @@ void Transform(int mode)
|
|||||||
else {
|
else {
|
||||||
if (G.qual == 0)
|
if (G.qual == 0)
|
||||||
setConstraint(&Trans, mati, (CON_AXIS1), "along local Y");
|
setConstraint(&Trans, mati, (CON_AXIS1), "along local Y");
|
||||||
else if (G.qual == LR_CTRLKEY)
|
else if (G.qual == LR_ALTKEY)
|
||||||
setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS2), "locking local Y");
|
setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS2), "locking local Y");
|
||||||
|
|
||||||
cmode = 'y';
|
cmode = 'y';
|
||||||
@@ -1376,7 +1380,7 @@ void Transform(int mode)
|
|||||||
else if(cmode == 'z') {
|
else if(cmode == 'z') {
|
||||||
if (G.qual == 0)
|
if (G.qual == 0)
|
||||||
setLocalConstraint(&Trans, (CON_AXIS2), "along local Z");
|
setLocalConstraint(&Trans, (CON_AXIS2), "along local Z");
|
||||||
else if (G.qual == LR_CTRLKEY)
|
else if (G.qual == LR_ALTKEY)
|
||||||
setLocalConstraint(&Trans, (CON_AXIS0|CON_AXIS1), "locking local Z");
|
setLocalConstraint(&Trans, (CON_AXIS0|CON_AXIS1), "locking local Z");
|
||||||
|
|
||||||
cmode = 'Z';
|
cmode = 'Z';
|
||||||
@@ -1384,7 +1388,7 @@ void Transform(int mode)
|
|||||||
else {
|
else {
|
||||||
if (G.qual == 0)
|
if (G.qual == 0)
|
||||||
setConstraint(&Trans, mati, (CON_AXIS2), "along global Z");
|
setConstraint(&Trans, mati, (CON_AXIS2), "along global Z");
|
||||||
else if (G.qual == LR_CTRLKEY)
|
else if (G.qual == LR_ALTKEY)
|
||||||
setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS1), "locking global Z");
|
setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS1), "locking global Z");
|
||||||
|
|
||||||
cmode = 'z';
|
cmode = 'z';
|
||||||
@@ -1732,7 +1736,7 @@ int Resize(TransInfo *t, short mval[2])
|
|||||||
if (td->flag & TD_NOACTION)
|
if (td->flag & TD_NOACTION)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!(td->flag & TD_OBJECT)) {
|
if (t->flag & T_EDIT) {
|
||||||
Mat3MulMat3(smat, mat, td->mtx);
|
Mat3MulMat3(smat, mat, td->mtx);
|
||||||
Mat3MulMat3(tmat, td->smtx, smat);
|
Mat3MulMat3(tmat, td->smtx, smat);
|
||||||
}
|
}
|
||||||
@@ -1743,7 +1747,7 @@ int Resize(TransInfo *t, short mval[2])
|
|||||||
if (td->ext) {
|
if (td->ext) {
|
||||||
float fsize[3];
|
float fsize[3];
|
||||||
|
|
||||||
if (td->flag & TD_OBJECT) {
|
if (t->flag & T_OBJECT) {
|
||||||
float obsizemat[3][3];
|
float obsizemat[3][3];
|
||||||
Mat3MulMat3(obsizemat, td->smtx, tmat);
|
Mat3MulMat3(obsizemat, td->smtx, tmat);
|
||||||
Mat3ToSize(obsizemat, fsize);
|
Mat3ToSize(obsizemat, fsize);
|
||||||
@@ -1785,7 +1789,7 @@ int Resize(TransInfo *t, short mval[2])
|
|||||||
|
|
||||||
VecMulf(vec, td->factor);
|
VecMulf(vec, td->factor);
|
||||||
|
|
||||||
if (td->flag & TD_OBJECT) {
|
if (t->flag & T_OBJECT) {
|
||||||
Mat3MulVecfl(td->smtx, vec);
|
Mat3MulVecfl(td->smtx, vec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1994,7 +1998,7 @@ int Rotation(TransInfo *t, short mval[2])
|
|||||||
VecRotToMat3(axis, final * td->factor, mat);
|
VecRotToMat3(axis, final * td->factor, mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(td->flag & TD_OBJECT)) {
|
if (t->flag & T_EDIT) {
|
||||||
Mat3MulMat3(totmat, mat, td->mtx);
|
Mat3MulMat3(totmat, mat, td->mtx);
|
||||||
Mat3MulMat3(smat, td->smtx, totmat);
|
Mat3MulMat3(smat, td->smtx, totmat);
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ typedef struct TransInfo {
|
|||||||
int (*transform)(struct TransInfo *, short *);
|
int (*transform)(struct TransInfo *, short *);
|
||||||
/* transform function pointer */
|
/* transform function pointer */
|
||||||
char redraw; /* redraw flag */
|
char redraw; /* redraw flag */
|
||||||
int flags; /* generic flags for special behaviors */
|
int flag; /* generic flags for special behaviors */
|
||||||
int total; /* total number of transformed data */
|
int total; /* total number of transformed data */
|
||||||
float propsize; /* proportional circle radius */
|
float propsize; /* proportional circle radius */
|
||||||
char proptext[20]; /* proportional falloff text */
|
char proptext[20]; /* proportional falloff text */
|
||||||
@@ -143,6 +143,13 @@ typedef struct TransInfo {
|
|||||||
#define TFM_SHEAR 5
|
#define TFM_SHEAR 5
|
||||||
#define TFM_LAMP_ENERGY 6
|
#define TFM_LAMP_ENERGY 6
|
||||||
|
|
||||||
|
/* transinfo->flag */
|
||||||
|
#define T_OBJECT 1
|
||||||
|
#define T_EDIT 2
|
||||||
|
#define T_POSE 4
|
||||||
|
#define T_TEXTURE 8
|
||||||
|
|
||||||
|
|
||||||
#define CON_APPLY 1
|
#define CON_APPLY 1
|
||||||
#define CON_AXIS0 2
|
#define CON_AXIS0 2
|
||||||
#define CON_AXIS1 4
|
#define CON_AXIS1 4
|
||||||
@@ -160,7 +167,6 @@ typedef struct TransInfo {
|
|||||||
#define TD_SELECTED 1
|
#define TD_SELECTED 1
|
||||||
#define TD_NOACTION 2
|
#define TD_NOACTION 2
|
||||||
#define TD_USEQUAT 4
|
#define TD_USEQUAT 4
|
||||||
#define TD_OBJECT 8
|
|
||||||
|
|
||||||
void Transform(int mode);
|
void Transform(int mode);
|
||||||
|
|
||||||
|
|||||||
@@ -253,6 +253,52 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generic callback for object based spacial constraints applied to linear motion
|
||||||
|
*
|
||||||
|
* At first, the following is applied to the first data in the array
|
||||||
|
* The IN vector in projected into the constrained space and then further
|
||||||
|
* projected along the view vector.
|
||||||
|
* (in perspective mode, the view vector is relative to the position on screen)
|
||||||
|
*
|
||||||
|
* Further down, that vector is mapped to each data's space.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void applyObjectConstraintVec(TransInfo *t, TransData *td, float in[3], float out[3], float pvec[3])
|
||||||
|
{
|
||||||
|
VECCOPY(out, in);
|
||||||
|
if (t->con.mode & CON_APPLY) {
|
||||||
|
if (!td) {
|
||||||
|
Mat3MulVecfl(t->con.pmtx, out);
|
||||||
|
if (out[0] != 0.0f || out[1] != 0.0f || out[2] != 0.0f) {
|
||||||
|
if (getConstraintSpaceDimension(t) == 2) {
|
||||||
|
planeProjection(t, in, out);
|
||||||
|
}
|
||||||
|
else if (getConstraintSpaceDimension(t) == 1) {
|
||||||
|
float c[3];
|
||||||
|
|
||||||
|
if (t->con.mode & CON_AXIS0) {
|
||||||
|
VECCOPY(c, t->con.mtx[0]);
|
||||||
|
}
|
||||||
|
else if (t->con.mode & CON_AXIS1) {
|
||||||
|
VECCOPY(c, t->con.mtx[1]);
|
||||||
|
}
|
||||||
|
else if (t->con.mode & CON_AXIS2) {
|
||||||
|
VECCOPY(c, t->con.mtx[2]);
|
||||||
|
}
|
||||||
|
axisProjection(t, c, in, out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
postConstraintChecks(t, out, pvec);
|
||||||
|
VECCOPY(out, pvec);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Mat3MulVecfl(td->axismtx, out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic callback for constant spacial constraints applied to resize motion
|
* Generic callback for constant spacial constraints applied to resize motion
|
||||||
*
|
*
|
||||||
@@ -391,25 +437,25 @@ void drawObjectConstraint(TransInfo *t) {
|
|||||||
TransData * td = t->data;
|
TransData * td = t->data;
|
||||||
|
|
||||||
if (t->con.mode & CON_AXIS0) {
|
if (t->con.mode & CON_AXIS0) {
|
||||||
drawLine(t->con.center, td->axismtx[0], 255 - 'x');
|
drawLine(td->ob->obmat[3], td->axismtx[0], 255 - 'x');
|
||||||
}
|
}
|
||||||
if (t->con.mode & CON_AXIS1) {
|
if (t->con.mode & CON_AXIS1) {
|
||||||
drawLine(t->con.center, td->axismtx[1], 255 - 'y');
|
drawLine(td->ob->obmat[3], td->axismtx[1], 255 - 'y');
|
||||||
}
|
}
|
||||||
if (t->con.mode & CON_AXIS2) {
|
if (t->con.mode & CON_AXIS2) {
|
||||||
drawLine(t->con.center, td->axismtx[2], 255 - 'z');
|
drawLine(td->ob->obmat[3], td->axismtx[2], 255 - 'z');
|
||||||
}
|
}
|
||||||
|
|
||||||
td++;
|
td++;
|
||||||
for(i=1;i<t->total;i++,td++) {
|
for(i=1;i<t->total;i++,td++) {
|
||||||
if (t->con.mode & CON_AXIS0) {
|
if (t->con.mode & CON_AXIS0) {
|
||||||
drawLine(t->con.center, td->axismtx[0], 'x');
|
drawLine(td->ob->obmat[3], td->axismtx[0], 'x');
|
||||||
}
|
}
|
||||||
if (t->con.mode & CON_AXIS1) {
|
if (t->con.mode & CON_AXIS1) {
|
||||||
drawLine(t->con.center, td->axismtx[1], 'y');
|
drawLine(td->ob->obmat[3], td->axismtx[1], 'y');
|
||||||
}
|
}
|
||||||
if (t->con.mode & CON_AXIS2) {
|
if (t->con.mode & CON_AXIS2) {
|
||||||
drawLine(t->con.center, td->axismtx[2], 'z');
|
drawLine(td->ob->obmat[3], td->axismtx[2], 'z');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,14 +518,11 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[]) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (t->total == 1) {
|
if (t->total == 1) {
|
||||||
float obmat[3][3];
|
setConstraint(t, t->data->axismtx, mode, text);
|
||||||
Mat3CpyMat4(obmat, t->data->ob->obmat);
|
|
||||||
setConstraint(t, obmat, mode, text);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
strcpy(t->con.text + 1, text);
|
strcpy(t->con.text + 1, text);
|
||||||
Mat3One(t->con.mtx);
|
Mat3CpyMat3(t->con.mtx, t->data->axismtx);
|
||||||
Mat3One(t->con.imtx);
|
|
||||||
t->con.mode = mode;
|
t->con.mode = mode;
|
||||||
getConstraintMatrix(t);
|
getConstraintMatrix(t);
|
||||||
|
|
||||||
@@ -491,7 +534,7 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[]) {
|
|||||||
startConstraint(t);
|
startConstraint(t);
|
||||||
|
|
||||||
t->con.drawExtra = drawObjectConstraint;
|
t->con.drawExtra = drawObjectConstraint;
|
||||||
t->con.applyVec = NULL;
|
t->con.applyVec = applyObjectConstraintVec;
|
||||||
t->con.applySize = applyObjectConstraintSize;
|
t->con.applySize = applyObjectConstraintSize;
|
||||||
t->con.applyRot = applyObjectConstraintRot;
|
t->con.applyRot = applyObjectConstraintRot;
|
||||||
t->redraw = 1;
|
t->redraw = 1;
|
||||||
@@ -701,7 +744,7 @@ void setNearestAxis(TransInfo *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (len[0] < len[1] && len[0] < len[2]) {
|
if (len[0] < len[1] && len[0] < len[2]) {
|
||||||
if (G.qual == LR_CTRLKEY) {
|
if (G.qual == LR_ALTKEY) {
|
||||||
t->con.mode |= (CON_AXIS1|CON_AXIS2);
|
t->con.mode |= (CON_AXIS1|CON_AXIS2);
|
||||||
strcpy(t->con.text, " locking global X");
|
strcpy(t->con.text, " locking global X");
|
||||||
}
|
}
|
||||||
@@ -711,7 +754,7 @@ void setNearestAxis(TransInfo *t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (len[1] < len[0] && len[1] < len[2]) {
|
else if (len[1] < len[0] && len[1] < len[2]) {
|
||||||
if (G.qual == LR_CTRLKEY) {
|
if (G.qual == LR_ALTKEY) {
|
||||||
t->con.mode |= (CON_AXIS0|CON_AXIS2);
|
t->con.mode |= (CON_AXIS0|CON_AXIS2);
|
||||||
strcpy(t->con.text, " locking global Y");
|
strcpy(t->con.text, " locking global Y");
|
||||||
}
|
}
|
||||||
@@ -721,7 +764,7 @@ void setNearestAxis(TransInfo *t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (len[2] < len[1] && len[2] < len[0]) {
|
else if (len[2] < len[1] && len[2] < len[0]) {
|
||||||
if (G.qual == LR_CTRLKEY) {
|
if (G.qual == LR_ALTKEY) {
|
||||||
t->con.mode |= (CON_AXIS0|CON_AXIS1);
|
t->con.mode |= (CON_AXIS0|CON_AXIS1);
|
||||||
strcpy(t->con.text, " locking global Z");
|
strcpy(t->con.text, " locking global Z");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
|
|
||||||
#include "transform.h"
|
#include "transform.h"
|
||||||
#include "transform_generics.h"
|
#include "transform_generics.h"
|
||||||
|
#include "transform_constraints.h"
|
||||||
|
|
||||||
extern ListBase editNurb;
|
extern ListBase editNurb;
|
||||||
extern ListBase editelems;
|
extern ListBase editelems;
|
||||||
@@ -287,7 +288,7 @@ void recalcData(TransInfo *t)
|
|||||||
|
|
||||||
void initTransModeFlags(TransInfo *t, int mode)
|
void initTransModeFlags(TransInfo *t, int mode)
|
||||||
{
|
{
|
||||||
t->flags = 0;
|
t->flag = 0;
|
||||||
t->num.flags = 0;
|
t->num.flags = 0;
|
||||||
t->mode = mode;
|
t->mode = mode;
|
||||||
|
|
||||||
@@ -299,17 +300,17 @@ void initTransModeFlags(TransInfo *t, int mode)
|
|||||||
case TFM_RESIZE:
|
case TFM_RESIZE:
|
||||||
t->num.flags |= NULLONE;
|
t->num.flags |= NULLONE;
|
||||||
if (!G.obedit) {
|
if (!G.obedit) {
|
||||||
t->flags |= NOZERO;
|
t->flag |= NOZERO;
|
||||||
t->num.flags |= NOZERO;
|
t->num.flags |= NOZERO;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TFM_TOSPHERE:
|
case TFM_TOSPHERE:
|
||||||
t->num.flags |= NULLONE;
|
t->num.flags |= NULLONE;
|
||||||
t->num.flags |= NONEGATIVE;
|
t->num.flags |= NONEGATIVE;
|
||||||
t->flags |= NOCONSTRAINT;
|
t->flag |= NOCONSTRAINT;
|
||||||
break;
|
break;
|
||||||
case TFM_SHEAR:
|
case TFM_SHEAR:
|
||||||
t->flags |= NOCONSTRAINT;
|
t->flag |= NOCONSTRAINT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -382,6 +383,7 @@ void postTrans (TransInfo *t)
|
|||||||
G.moving = 0; // Set moving flag off (display as usual)
|
G.moving = 0; // Set moving flag off (display as usual)
|
||||||
|
|
||||||
stopConstraint(t);
|
stopConstraint(t);
|
||||||
|
t->con.drawExtra = NULL;
|
||||||
t->con.applyVec = NULL;
|
t->con.applyVec = NULL;
|
||||||
t->con.applySize= NULL;
|
t->con.applySize= NULL;
|
||||||
t->con.applyRot = NULL;
|
t->con.applyRot = NULL;
|
||||||
@@ -515,7 +517,7 @@ void calculateCenterCursor(TransInfo *t)
|
|||||||
cursor = give_cursor();
|
cursor = give_cursor();
|
||||||
VECCOPY(t->center, cursor);
|
VECCOPY(t->center, cursor);
|
||||||
|
|
||||||
if(G.obedit || G.obpose) {
|
if(t->flag & (T_EDIT|T_POSE)) {
|
||||||
Object *ob= G.obedit?G.obedit:G.obpose;
|
Object *ob= G.obedit?G.obedit:G.obpose;
|
||||||
float mat[3][3], imat[3][3];
|
float mat[3][3], imat[3][3];
|
||||||
float vec[3];
|
float vec[3];
|
||||||
@@ -546,7 +548,7 @@ void calculateCenterMedian(TransInfo *t)
|
|||||||
VecMulf(partial, 1.0f / t->total);
|
VecMulf(partial, 1.0f / t->total);
|
||||||
VECCOPY(t->center, partial);
|
VECCOPY(t->center, partial);
|
||||||
|
|
||||||
if (G.obedit || G.obpose) {
|
if (t->flag & (T_EDIT|T_POSE)) {
|
||||||
Object *ob= G.obedit?G.obedit:G.obpose;
|
Object *ob= G.obedit?G.obedit:G.obpose;
|
||||||
float vec[3];
|
float vec[3];
|
||||||
|
|
||||||
@@ -578,7 +580,7 @@ void calculateCenterBound(TransInfo *t)
|
|||||||
VecAddf(t->center, min, max);
|
VecAddf(t->center, min, max);
|
||||||
VecMulf(t->center, 0.5);
|
VecMulf(t->center, 0.5);
|
||||||
|
|
||||||
if (G.obedit || G.obpose) {
|
if (t->flag & (T_EDIT|T_POSE)) {
|
||||||
Object *ob= G.obedit?G.obedit:G.obpose;
|
Object *ob= G.obedit?G.obedit:G.obpose;
|
||||||
float vec[3];
|
float vec[3];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user