diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-29 22:35:30 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-29 22:35:30 +0300 |
commit | 18e5f7b50b33f1cb1f71ee3d1cc19477310ed87e (patch) | |
tree | 9393392a6b690b5b92d890e41f0f40a30d650bf3 /source/blender/blenkernel/intern/key.c | |
parent | 0d8b28e2a39d55e346e0342d6e305a811e0ce05b (diff) |
Shape Keys
==========
- Added a Mute button for shape keys, useful for debugging the influence
of driven shape keys.
- Bugfix for the shape keys relative to others keys, was hanging in
an eternal loop when deleting the other key.
Diffstat (limited to 'source/blender/blenkernel/intern/key.c')
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 234a096edce..b57b799001a 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -672,14 +672,12 @@ static void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, i /* step 2: do it */ - kb= key->block.first; - while(kb) { - + for(kb=key->block.first; kb; kb=kb->next) { if(kb!=key->refkey) { float icuval= kb->curval; /* only with value, and no difference allowed */ - if(icuval!=0.0f && kb->totelem==tot) { + if(!(kb->flag & KEYBLOCK_MUTE) && icuval!=0.0f && kb->totelem==tot) { KeyBlock *refb; float weight, *weights= kb->weights; @@ -738,7 +736,6 @@ static void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, i } } } - kb= kb->next; } } @@ -1312,6 +1309,9 @@ int do_ob_key(Object *ob) if(ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)) { KeyBlock *kb= BLI_findlink(&key->block, ob->shapenr-1); + if(kb && (kb->flag & KEYBLOCK_MUTE)) + kb= key->refkey; + if(kb==NULL) { kb= key->block.first; ob->shapenr= 1; |