diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-08-10 10:36:42 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-08-10 10:36:42 +0400 |
commit | c0e39df6ac42d137fd51eeea463aace856bf97d4 (patch) | |
tree | 86be54ecb6f01b8192905a05707b12402970d5a4 /source/blender/editors/curve | |
parent | 41531e4fb6547df543a80d62b473c250d5b78753 (diff) |
- Enable shape key switching in edit mode for curves, surfaces and latticies
- Disable changing of lattice size if there are shape keys
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 7150070dd65..b85429e36a9 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -724,7 +724,7 @@ static void calc_shapeKeys(Object *obedit) int a, i, j; EditNurb *editnurb= cu->editnurb; KeyBlock *currkey; - KeyBlock *actkey= ob_get_keyblock(obedit); + KeyBlock *actkey= BLI_findlink(&cu->key->block, editnurb->shapenr-1); BezTriple *bezt, *oldbezt; BPoint *bp, *oldbp; Nurb *nu; @@ -738,7 +738,7 @@ static void calc_shapeKeys(Object *obedit) int act_is_basis = 0; /* find if this key is a basis for any others */ for(currkey = cu->key->block.first; currkey; currkey= currkey->next) { - if(obedit->shapenr-1 == currkey->relative) { + if(editnurb->shapenr-1 == currkey->relative) { act_is_basis = 1; break; } @@ -806,7 +806,7 @@ static void calc_shapeKeys(Object *obedit) currkey = cu->key->block.first; while(currkey) { - int apply_offset = (ofs && (currkey != actkey) && (obedit->shapenr-1 == currkey->relative)); + int apply_offset = (ofs && (currkey != actkey) && (editnurb->shapenr-1 == currkey->relative)); fp= newkey= MEM_callocN(cu->key->elemsize * totvert, "currkey->data"); ofp= oldkey = currkey->data; @@ -1035,6 +1035,7 @@ void make_editNurb(Object *obedit) } if(actkey) { + editnurb->shapenr= obedit->shapenr; init_editNurb_keyIndex(editnurb, &cu->nurb); } } |