diff options
author | Martin Poirier <theeth@yahoo.com> | 2007-11-26 04:52:48 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2007-11-26 04:52:48 +0300 |
commit | 121dab1bcd9467bd8e11d0a82e83a1621758fd8e (patch) | |
tree | 65e16dcee40385dd5c92878fdda6ce0ca28fce02 /source/blender/src/transform_constraints.c | |
parent | a29f08272808dd0a6101943abe1f90e7718de48e (diff) |
Fixes for some long standing transform bugs.
- [#6112] is this an extrusion bug?
When extruding, x-mirror was giving weird behavior since the extruded vertice could match with their non-extruded counterpart on the other side.
The solution is to disable x-mirror (with a transform context flag, like disabling PET) in that case.
- External constraint setup calls (BIF_*) didn't setup some internal structs properly.
For the user, this resulted in some transform (extrude particularly) showing a full 3d vector in the header instead of a scalar along the constraint axis (this messed up num input a bit too, you could type values in unused axis).
Diffstat (limited to 'source/blender/src/transform_constraints.c')
-rw-r--r-- | source/blender/src/transform_constraints.c | 29 |
1 files changed, 24 insertions, 5 deletions
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; |