diff options
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 1f6694730c1..0d09c119c17 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -290,7 +290,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo mul_m3_v3(t->con.pmtx, out); // With snap, a projection is alright, no need to correct for view alignment - if ((t->tsnap.status & SNAP_ON) == 0) { + if (!(t->tsnap.mode != SCE_SNAP_MODE_INCREMENT && activeSnap(t))) { if (getConstraintSpaceDimension(t) == 2) { if (out[0] != 0.0f || out[1] != 0.0f || out[2] != 0.0f) { planeProjection(t, in, out); @@ -316,7 +316,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo } /* - * Generic callback for object based spacial constraints applied to linear motion + * Generic callback for object based spatial 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 @@ -599,6 +599,8 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte break; } + t->con.orientation = orientation; + t->con.mode |= CON_USER; } @@ -668,6 +670,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) if (t->flag & T_PROP_EDIT) { RegionView3D *rv3d = CTX_wm_region_view3d(C); float tmat[4][4], imat[4][4]; + float center[3]; UI_ThemeColor(TH_GRID); @@ -684,9 +687,11 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) glPushMatrix(); + VECCOPY(center, t->center); + if((t->spacetype == SPACE_VIEW3D) && t->obedit) { - glMultMatrixf(t->obedit->obmat); /* because t->center is in local space */ + mul_m4_v3(t->obedit->obmat, center); /* because t->center is in local space */ } else if(t->spacetype == SPACE_IMAGE) { @@ -697,7 +702,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) } set_inverted_drawing(1); - drawcircball(GL_LINE_LOOP, t->center, t->prop_size, imat); + drawcircball(GL_LINE_LOOP, center, t->prop_size, imat); set_inverted_drawing(0); glPopMatrix(); |