Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-11-20 19:58:25 +0300
committerTon Roosendaal <ton@blender.org>2007-11-20 19:58:25 +0300
commitb7e0da6c3a83bd5aa8d3ad4aa285904d5c121f91 (patch)
treea2bc329c2f9f36166e198c3efb6b5eca09ba963d /source/blender/blenkernel/intern
parent0ec59425210033b9158bd8d2fbc5c6de1bc62bbb (diff)
Another feature request from the animation dept:
Relative shapekeys now allow to define the Shape it is relative to! (It used to be relative with respect to the first key, which is still default). The reason for this feature is that keys don't always add together well when they're all derived from the same base shape. A clear example is hard to make... will wait for someone posting it. :)
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/key.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 8da3ea0b994..234a096edce 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -680,11 +680,15 @@ static void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, i
/* only with value, and no difference allowed */
if(icuval!=0.0f && kb->totelem==tot) {
+ KeyBlock *refb;
float weight, *weights= kb->weights;
poin= basispoin;
- reffrom= key->refkey->data;
from= kb->data;
+ /* reference now can be any block */
+ refb= BLI_findlink(&key->block, kb->relative);
+ if(refb==NULL) continue;
+ reffrom= refb->data;
poin+= start*ofs[0];
reffrom+= key->elemsize*start; // key elemsize yes!