diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-11-10 18:31:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-11-10 18:31:41 +0300 |
commit | 90b4ed95438d03c94870edef0061e1a2a9bfd31b (patch) | |
tree | 2cfb578690625cead2322094bd17f4d2d9c03971 /source/blender/blenkernel/intern | |
parent | 38d12b3c8de23acb7820b238523c9d28f83854d4 (diff) |
added buttons in the Transform Properties for changing curve handle types, (Similar to how Metaballs can be selected) for easier access then H,Shift H, V keys
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index ece0a7f1d6c..6676bf0e03f 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -2351,6 +2351,8 @@ void sethandlesNurb(short code) /* code==2: set vectorhandle */ /* code==3 (HD_ALIGN) it toggle, vectorhandles become HD_FREE */ /* code==4: sets icu flag to become IPO_AUTO_HORIZ, horizontal extremes on auto-handles */ + /* code==5: Set align, like 3 but no toggle */ + /* code==6: Clear align, like 3 but no toggle */ Nurb *nu; BezTriple *bezt; short a, ok=0; @@ -2381,22 +2383,28 @@ void sethandlesNurb(short code) /* there is 1 handle not FREE: FREE it all, else make ALIGNED */ nu= editNurb.first; - while(nu) { - if( (nu->type & 7)==1) { - bezt= nu->bezt; - a= nu->pntsu; - while(a--) { - if(bezt->f1 && bezt->h1) ok= 1; - if(bezt->f3 && bezt->h2) ok= 1; - if(ok) break; - bezt++; + if (code == 5) { + ok = HD_ALIGN; + } else if (code == 6) { + ok = HD_FREE; + } else { + /* Toggle */ + while(nu) { + if( (nu->type & 7)==1) { + bezt= nu->bezt; + a= nu->pntsu; + while(a--) { + if(bezt->f1 && bezt->h1) ok= 1; + if(bezt->f3 && bezt->h2) ok= 1; + if(ok) break; + bezt++; + } } + nu= nu->next; } - nu= nu->next; + if(ok) ok= HD_FREE; + else ok= HD_ALIGN; } - if(ok) ok= HD_FREE; - else ok= HD_ALIGN; - nu= editNurb.first; while(nu) { if( (nu->type & 7)==1) { |