Bugfix #3772: Allows "Center Cursor" for 3D curves to modify the curve

center's Z location.  An eons-old comment in the code said:

/* Curves need to be 2d, never offset in
 * Z. Is a somewhat arbitrary restriction,
 * would probably be nice to remove. */

I couldn't find any other reason for the restriction other than 2D curves
limit the point's Z component to 0, so added a check to only forve the
center Z to 0 when the curve is 2D.  If there are other reasons for the
restriction, then this commit may need to be rolled back.
This commit is contained in:
Ken Hughes
2006-03-24 20:39:38 +00:00
parent 97a4e4f88d
commit b174a988ae

View File

@@ -1734,12 +1734,10 @@ void docentre(int centremode)
VECCOPY(cent, give_cursor());
Mat4Invert(base->object->imat, base->object->obmat);
Mat4MulVecfl(base->object->imat, cent);
/* Curves need to be 2d, never offset in
* Z. Is a somewhat arbitrary restriction,
* would probably be nice to remove.
*/
cent[2]= 0.0;
/* don't allow Z change if curve is 2D */
if( !( cu->flag & CU_3D ) )
cent[2] = 0.0;
} else {
INIT_MINMAX(min, max);