diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-07-26 23:07:33 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-07-26 23:07:33 +0400 |
commit | cc9dbc7ac259e6f8547a58904bf5f834e14d58bc (patch) | |
tree | 9a75014d9398a3ffafa8dbae5969a9ee2df85e4b /source | |
parent | c1649dcf103919b90ea8d8f90bef5ea9eb5ca674 (diff) |
Curve shape keys:
- Fixed incorrect working of "from mix" insert keyblock operator property
shapekey coordinated are applying on curve's data when creating displist,
so curve's nurbs can't be used as unchanged data -- use basis keyblock data instead
- Fixed tilt damaging when loading editcurve -- made a typo in array indexes
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 01724b7e9fd..81799a5409d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2955,7 +2955,11 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, char *name, int from_ if(newkey || from_mix==FALSE) { /* create from curve */ kb= add_keyblock(key, name); - curve_to_key(cu, kb, lb); + if (!newkey) { + KeyBlock *basekb= (KeyBlock *)key->block.first; + kb->data= MEM_dupallocN(basekb->data); + kb->totelem= basekb->totelem; + } else curve_to_key(cu, kb, lb); } else { /* copy from current values */ diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 8d8dac33f9f..d38c91da5c5 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -884,7 +884,7 @@ static void calc_shapeKeys(Object *obedit) fp+= 3; curofp+= 3; } - fp[0]= ofp[0]; + fp[0]= curofp[0]; if(apply_offset) { /* apply alfa offsets */ @@ -914,7 +914,7 @@ static void calc_shapeKeys(Object *obedit) if (index >= 0) { curofp= ofp + index; VECCOPY(fp, curofp); - fp[3]= curofp[4]; + fp[3]= curofp[3]; if(apply_offset) { VECADD(fp, fp, ofs[i]); |