Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editcurve.c
| Context not available. | |||||
| int a, i; | int a, i; | ||||
| EditNurb *editnurb = cu->editnurb; | EditNurb *editnurb = cu->editnurb; | ||||
| KeyBlock *currkey; | KeyBlock *currkey; | ||||
| KeyBlock *actkey = BLI_findlink(&cu->key->block, editnurb->shapenr - 1); | KeyBlock *actkey = BLI_findlink(&cu->key->block, editnurb->shapenr); | ||||
| BezTriple *bezt, *oldbezt; | BezTriple *bezt, *oldbezt; | ||||
| BPoint *bp, *oldbp; | BPoint *bp, *oldbp; | ||||
| Nurb *nu, *newnu; | Nurb *nu, *newnu; | ||||
| Context not available. | |||||
| /* editing the base key should update others */ | /* editing the base key should update others */ | ||||
| if (cu->key->type == KEY_RELATIVE) { | if (cu->key->type == KEY_RELATIVE) { | ||||
| if (BKE_keyblock_is_basis(cu->key, editnurb->shapenr - 1)) { /* active key is a base */ | if (BKE_keyblock_is_basis(cu->key, editnurb->shapenr)) { /* active key is a base */ | ||||
| int totvec = 0; | int totvec = 0; | ||||
| /* Calculate needed memory to store offset */ | /* Calculate needed memory to store offset */ | ||||
| Context not available. | |||||
| currkey = cu->key->block.first; | currkey = cu->key->block.first; | ||||
| while (currkey) { | while (currkey) { | ||||
| const bool apply_offset = (ofs && (currkey != actkey) && (editnurb->shapenr - 1 == currkey->relative)); | const bool apply_offset = (ofs && (currkey != actkey) && (editnurb->shapenr == currkey->relative)); | ||||
| float *fp = newkey = MEM_callocN(cu->key->elemsize * totvert, "currkey->data"); | float *fp = newkey = MEM_callocN(cu->key->elemsize * totvert, "currkey->data"); | ||||
| ofp = oldkey = currkey->data; | ofp = oldkey = currkey->data; | ||||
| Context not available. | |||||