diff options
-rw-r--r-- | source/blender/include/BIF_transform.h | 1 | ||||
-rw-r--r-- | source/blender/src/editmesh_tools.c | 6 | ||||
-rw-r--r-- | source/blender/src/transform_constraints.c | 29 | ||||
-rw-r--r-- | source/blender/src/transform_conversions.c | 7 | ||||
-rw-r--r-- | source/blender/src/transform_generics.c | 2 |
5 files changed, 35 insertions, 10 deletions
diff --git a/source/blender/include/BIF_transform.h b/source/blender/include/BIF_transform.h index 26900b06c52..17ceb8935c9 100644 --- a/source/blender/include/BIF_transform.h +++ b/source/blender/include/BIF_transform.h @@ -66,6 +66,7 @@ #define CTX_EDGE 2 #define CTX_NO_PET 4 #define CTX_TWEAK 8 +#define CTX_NO_MIRROR 16 void initTransform(int mode, int context); void Transform(void); diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index a68fca3b294..1992ea8468a 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -679,15 +679,15 @@ void extrude_mesh(void) /* individual faces? */ BIF_TransformSetUndo("Extrude"); if(nr==2) { - initTransform(TFM_SHRINKFATTEN, CTX_NO_PET); + initTransform(TFM_SHRINKFATTEN, CTX_NO_PET|CTX_NO_MIRROR); Transform(); } else { - initTransform(TFM_TRANSLATION, CTX_NO_PET); + initTransform(TFM_TRANSLATION, CTX_NO_PET|CTX_NO_MIRROR); if(transmode=='n') { Mat4MulVecfl(G.obedit->obmat, nor); VecSubf(nor, nor, G.obedit->obmat[3]); - BIF_setSingleAxisConstraint(nor, NULL); + BIF_setSingleAxisConstraint(nor, "along normal"); } Transform(); } diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index ad48d3cc919..99e5123a953 100644 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -594,12 +594,21 @@ void BIF_setSingleAxisConstraint(float vec[3], char *text) { Mat3Ortho(space); Mat3CpyMat3(t->con.mtx, space); - t->con.mode = (CON_AXIS0|CON_APPLY); + t->con.mode = CON_AXIS0; + getConstraintMatrix(t); + startConstraint(t); + /* start copying with an offset of 1, to reserve a spot for the SPACE char */ - if(text) strncpy(t->con.text+1, text, 48); // 50 in struct - + if(text) + { + strncpy(t->con.text+1, text, 48); /* 50 in struct */ + } + else + { + t->con.text[1] = '\0'; /* No text */ + } t->con.drawExtra = NULL; t->con.applyVec = applyAxisConstraintVec; @@ -618,11 +627,21 @@ void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text) { Mat3Ortho(space); Mat3CpyMat3(t->con.mtx, space); - t->con.mode = (CON_AXIS0|CON_AXIS1|CON_APPLY); + t->con.mode = CON_AXIS0|CON_AXIS1; + getConstraintMatrix(t); + + startConstraint(t); /* start copying with an offset of 1, to reserve a spot for the SPACE char */ - if(text) strncpy(t->con.text+1, text, 48); // 50 in struct + if(text) + { + strncpy(t->con.text+1, text, 48); /* 50 in struct */ + } + else + { + t->con.text[1] = '\0'; /* No text */ + } t->con.drawExtra = NULL; t->con.applyVec = applyAxisConstraintVec; diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 879577927ae..7a9a69f2acb 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -1689,7 +1689,12 @@ static void createTransEditVerts(TransInfo *t) float mtx[3][3], smtx[3][3], (*defmats)[3][3] = NULL, (*defcos)[3] = NULL; int count=0, countsel=0, a, totleft; int propmode = t->flag & T_PROP_EDIT; - int mirror= (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR); + int mirror = 0; + + if ((t->context & CTX_NO_MIRROR) == 0 || (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR)) + { + mirror = 1; + } // transform now requires awareness for select mode, so we tag the f1 flags in verts if(G.scene->selectmode & SCE_SELECT_VERTEX) { diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 72937fb10b6..a22d8ccdbf9 100644 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -377,7 +377,7 @@ void recalcData(TransInfo *t) if(t->state != TRANS_CANCEL) clipMirrorModifier(t, G.obedit); - if(G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR) + if((t->context & CTX_NO_MIRROR) == 0 && (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR)) editmesh_apply_to_mirror(t); DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); /* sets recalc flags */ |