diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-07-25 15:57:36 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-07-25 15:57:36 +0400 |
commit | cc0f3146e798479be0758b5c152ef67ef42ea8dc (patch) | |
tree | 669704799ec2a83908777d1b0d9cc1517dfb871c /source/blender/blenkernel/intern/curve.c | |
parent | 61a09d96b1c10decb732f77a50421101e43cf401 (diff) |
Shapekeys for curves/surfeces
Fix #21498: Edit curve Shape key /252_r 27318
Added full support of shape keys for curves and nurbs surfaces including
topology changing in edit mode, undo stuff, updating relative keys when
working under basis and so on.
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index d355a520a8c..4142ad7128f 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -58,6 +58,8 @@ #include "BKE_object.h" #include "BKE_utildefines.h" // VECCOPY +#include "ED_curve.h" + /* globals */ /* local */ @@ -104,13 +106,8 @@ void free_curve(Curve *cu) BLI_freelistN(&cu->bev); freedisplist(&cu->disp); BKE_free_editfont(cu); - - if(cu->editnurb) { - freeNurblist(cu->editnurb); - MEM_freeN(cu->editnurb); - cu->editnurb= NULL; - } + free_curve_editNurb(cu); unlink_curve(cu); BKE_free_animdata((ID *)cu); @@ -2008,8 +2005,10 @@ void makeBevelList(Object *ob) /* STEP 1: MAKE POLYS */ BLI_freelistN(&(cu->bev)); - if(cu->editnurb && ob->type!=OB_FONT) nu= cu->editnurb->first; - else nu= cu->nurb.first; + if(cu->editnurb && ob->type!=OB_FONT) { + ListBase *nurbs= ED_curve_editnurbs(cu); + nu= nurbs->first; + } else nu= cu->nurb.first; while(nu) { @@ -2999,7 +2998,7 @@ float (*curve_getKeyVertexCos(Curve *cu, ListBase *lb, float *key))[3] VECCOPY(co, key); co+=3; key+=3; VECCOPY(co, key); co+=3; key+=3; VECCOPY(co, key); co+=3; key+=3; - key++; /* skip tilt */ + key+=3; /* skip tilt */ } } else { @@ -3099,5 +3098,12 @@ int clamp_nurb_order_v( struct Nurb *nu) return change; } +/* Get edit nurbs or normal nurbs list */ +ListBase *BKE_curve_nurbs(Curve *cu) +{ + if (cu->editnurb) { + return ED_curve_editnurbs(cu); + } - + return &cu->nurb; +} |