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
This commit is contained in:
Sergey Sharybin 2010-07-26 19:07:33 +00:00
parent c1649dcf10
commit cc9dbc7ac2
2 changed files with 7 additions and 3 deletions

@ -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 */

@ -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]);