diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-16 23:45:40 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-17 13:19:54 +0300 |
commit | b7f5ab0cd33bc7632bd71af5f883745e340d6e18 (patch) | |
tree | 44319a121504220313b7af8bf63eec659034985d /source/blender/editors/curve/editcurve.c | |
parent | d526ef607d0a8741799ede335c2c64dc87e4f094 (diff) |
ShapeKeys: Add `BKE_keyblock_is_basis` to check whether a given keyblock is used a basis by others.
Also fix stupid debug-only error in previous commit.
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index c279e83ad7d..d1208b8ba1c 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -766,16 +766,7 @@ static void calc_shapeKeys(Object *obedit) /* editing the base key should update others */ if (cu->key->type == KEY_RELATIVE) { - int act_is_basis = 0; - /* find if this key is a basis for any others */ - for (currkey = cu->key->block.first; currkey; currkey = currkey->next) { - if (editnurb->shapenr - 1 == currkey->relative) { - act_is_basis = 1; - break; - } - } - - if (act_is_basis) { /* active key is a base */ + if (BKE_keyblock_is_basis(cu->key, editnurb->shapenr - 1)) { /* active key is a base */ int totvec = 0; /* Calculate needed memory to store offset */ |