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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-05 09:51:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-05 09:51:26 +0400
commitf4ccee2785f91efd4acceeae0713b93b7afaeccd (patch)
tree17dae274c05977b9b860cfe32c3fb3ce76f7a27e /source/blender/blenkernel/intern/key.c
parent0aa6ade75a0004d00f769589ae24ef0b152bba9d (diff)
adding shape key blocks to absolute shape keys would not set the position (which is odd since its the only time they are used).
also re-sort the shape keys after adding them in for absolute keyblocks.
Diffstat (limited to 'source/blender/blenkernel/intern/key.c')
-rw-r--r--source/blender/blenkernel/intern/key.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index e81cb235c4c..62701f4e98e 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1136,9 +1136,11 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
else {
if (key->type==KEY_RELATIVE) {
KeyBlock *kb;
-
- for (kb= key->block.first; kb; kb= kb->next)
+ float f = 0.0;
+ for (kb= key->block.first; kb; kb= kb->next, f += 0.1f) {
kb->weights= get_weights_array(ob, kb->vgroup);
+ // kb->pos = f;
+ }
do_rel_key(0, tot, tot, (char *)out, key, actkb, KEY_MODE_DUMMY);
@@ -1472,18 +1474,12 @@ KeyBlock *add_keyblock(Key *key, const char *name)
kb->slidermax= 1.0f;
// XXX kb->pos is the confusing old horizontal-line RVK crap in old IPO Editor...
- if (key->type == KEY_RELATIVE)
+ if (key->type == KEY_RELATIVE) {
kb->pos= curpos + 0.1f;
+ }
else {
-#if 0 // XXX old animation system
- curpos= BKE_curframe(scene);
- if (calc_ipo_spec(key->ipo, KEY_SPEED, &curpos)==0) {
- curpos /= 100.0;
- }
- kb->pos= curpos;
-
+ kb->pos = key->ctime / 100.0f;
sort_keys(key);
-#endif // XXX old animation system
}
return kb;
}