diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-04-04 06:16:56 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-04-04 06:16:56 +0400 |
commit | fad97122aa908b7e95f35b829a61438efce18c91 (patch) | |
tree | 8f6e57f150c6a65f5708b7526cf6ec1cbd01480e /source/blender | |
parent | 7b0a661413cd32a575ba9effe7b3105b0b9b8654 (diff) |
Added a NO_NOR_RECALC context flag. With Individual extrude, the normals are already set by the extrude code, recalculating breaks them.
Cosmetic changes, renamed CTX_NOPET to CTX_NO_PET
CKey during transform now clears the constraint.
Diffstat (limited to 'source/blender')
-rwxr-xr-x | source/blender/include/BIF_transform.h | 9 | ||||
-rw-r--r-- | source/blender/src/editarmature.c | 4 | ||||
-rw-r--r-- | source/blender/src/editcurve.c | 6 | ||||
-rw-r--r-- | source/blender/src/editmball.c | 2 | ||||
-rw-r--r-- | source/blender/src/editmesh_add.c | 2 | ||||
-rw-r--r-- | source/blender/src/editmesh_tools.c | 4 | ||||
-rwxr-xr-x | source/blender/src/transform.c | 7 | ||||
-rwxr-xr-x | source/blender/src/transform_generics.c | 2 |
8 files changed, 21 insertions, 15 deletions
diff --git a/source/blender/include/BIF_transform.h b/source/blender/include/BIF_transform.h index f823193dcc6..44b90991d9f 100755 --- a/source/blender/include/BIF_transform.h +++ b/source/blender/include/BIF_transform.h @@ -50,10 +50,11 @@ #define TFM_PUSHPULL 12 /* TRANSFORM CONTEXTS */ -#define CTX_NONE 0 -#define CTX_TEXTURE 1 -#define CTX_EDGE 2 -#define CTX_NOPET 4 +#define CTX_NONE 0 +#define CTX_TEXTURE 1 +#define CTX_EDGE 2 +#define CTX_NO_PET 4 +#define CTX_NO_NOR_RECALC 8 /* TRANSFORM PROPORTIONAL FALLOFF MODES */ #define PROP_SHARP 0 diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index 9cd54a3a257..2c5dfd08ce7 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -1999,7 +1999,7 @@ void extrude_armature(void) /* Transform the endpoints */ countall(); - Transform(TFM_TRANSLATION, CTX_NOPET); + Transform(TFM_TRANSLATION, CTX_NO_PET); allqueue(REDRAWBUTSEDIT, 0); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWOOPS, 0); @@ -2163,7 +2163,7 @@ void adduplicate_armature(void) } - Transform(TFM_TRANSLATION, CTX_NOPET); + Transform(TFM_TRANSLATION, CTX_NO_PET); allqueue(REDRAWBUTSEDIT, 0); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWOOPS, 0); diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index 0e3c19740d0..ec956b8e991 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -2793,7 +2793,7 @@ void addvert_Nurb(int mode) allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSEDIT, 0); - if(mode=='e') Transform(TFM_TRANSLATION, CTX_NOPET); + if(mode=='e') Transform(TFM_TRANSLATION, CTX_NO_PET); else while(get_mbut()&R_MOUSE) BIF_wait_for_statechange(); if(mode!='e') { @@ -2830,7 +2830,7 @@ void extrude_nurb() makeDispList(G.obedit); BIF_undo_push("Extrude"); countall(); - Transform(TFM_TRANSLATION, CTX_NOPET); + Transform(TFM_TRANSLATION, CTX_NO_PET); } } } @@ -3058,7 +3058,7 @@ void adduplicate_nurb() adduplicateflagNurb(1); countall(); - Transform(TFM_TRANSLATION, CTX_NOPET); + Transform(TFM_TRANSLATION, CTX_NO_PET); } void delNurb() diff --git a/source/blender/src/editmball.c b/source/blender/src/editmball.c index 0cb3cb1b3b9..39b4fd4b99b 100644 --- a/source/blender/src/editmball.c +++ b/source/blender/src/editmball.c @@ -307,7 +307,7 @@ void adduplicate_mball() ml= ml->prev; } - Transform(TFM_TRANSLATION, CTX_NOPET); + Transform(TFM_TRANSLATION, CTX_NO_PET); allqueue(REDRAWBUTSEDIT, 0); } diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c index f2112e997d6..a86fd23cbae 100644 --- a/source/blender/src/editmesh_add.c +++ b/source/blender/src/editmesh_add.c @@ -437,7 +437,7 @@ void adduplicate_mesh(void) waitcursor(0); countall(); - Transform(TFM_TRANSLATION, CTX_NOPET); + Transform(TFM_TRANSLATION, CTX_NO_PET); } diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 64538e04c70..6b9a4a26a44 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -561,7 +561,7 @@ void extrude_mesh(void) /* individual faces? */ if(nr==2) { - Transform(TFM_SHRINKFATTEN, CTX_NOPET); + Transform(TFM_SHRINKFATTEN, CTX_NO_PET|CTX_NO_NOR_RECALC); } else { if(transmode=='n') { @@ -569,7 +569,7 @@ void extrude_mesh(void) VecSubf(nor, nor, G.obedit->obmat[3]); BIF_setSingleAxisConstraint(nor, NULL); } - Transform(TFM_TRANSLATION, CTX_NOPET); + Transform(TFM_TRANSLATION, CTX_NO_PET); } } diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 23f4774b3ac..2c3c2fa5c1b 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -1426,7 +1426,8 @@ static void createTransData(TransInfo *t) else if (G.obedit) { t->ext = NULL; if (G.obedit->type == OB_MESH) { - if(t->mode==TFM_SHRINKFATTEN) vertexnormals(0); + if(t->mode==TFM_SHRINKFATTEN && (t->context & CTX_NO_NOR_RECALC)==0) + vertexnormals(0); createTransEditVerts(t); } else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) { @@ -1655,6 +1656,10 @@ void Transform(int mode, int context) } Trans.redraw = 1; break; + case CKEY: + stopConstraint(&Trans); + Trans.redraw = 1; + break; case XKEY: if ((Trans.flag & T_NO_CONSTRAINT)==0) { if (cmode == 'X') { diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 2fed8368c91..31641962ced 100755 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -388,7 +388,7 @@ void initTrans (TransInfo *t) t->flag = 0; /* setting PET flag */ - if ((t->context & CTX_NOPET) == 0 && (G.f & G_PROPORTIONAL)) { + if ((t->context & CTX_NO_PET) == 0 && (G.f & G_PROPORTIONAL)) { t->flag |= T_PROP_EDIT; } |