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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-10-13 20:22:44 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-16 19:27:10 +0300
commitc7a84c23f11cfccfeacf7ccfdbe7eca967c9b4ed (patch)
treedad85fe356ddde3637544036879ef67dd7f37843 /source/blender/editors/space_action
parentbd24ee8cb6ee295b7249c7a3e9dce482799c4599 (diff)
Dope Sheet: rewrite computation of keyframe hold blocks.
Computation of hold blocks was done by storing ranges (with start and an end, and likely overlapping) in a tree keyed only by the block start. This cannot work well, and there even were comments that it is not reliable in complex cases. A much better way to deal with it is to split all ranges so they don't overlap. The most thorough way of doing this is to split at all and every known keyframe, and in this case the data can actually be stored in the key column data structures, avoiding the need for a second tree. In practice, splitting requires a pass to copy this data to newly added keys, and the necessity to loop over all keyframes in the range being added. Both are linear and don't add excess algorithmic complexity. The new implementation also calls BLI_dlrbTree_linkedlist_sync for its own needs, so the users of the *_to_keylist functions don't have to do it themselves anymore. Differential Revision: https://developer.blender.org/D3790
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_select.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index f85177f5228..59211ba01d7 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -1449,37 +1449,37 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_
case ALE_SCE:
{
Scene *scene = (Scene *)ale->key_data;
- scene_to_keylist(ads, scene, &anim_keys, NULL);
+ scene_to_keylist(ads, scene, &anim_keys);
break;
}
case ALE_OB:
{
Object *ob = (Object *)ale->key_data;
- ob_to_keylist(ads, ob, &anim_keys, NULL);
+ ob_to_keylist(ads, ob, &anim_keys);
break;
}
case ALE_ACT:
{
bAction *act = (bAction *)ale->key_data;
- action_to_keylist(adt, act, &anim_keys, NULL);
+ action_to_keylist(adt, act, &anim_keys);
break;
}
case ALE_FCURVE:
{
FCurve *fcu = (FCurve *)ale->key_data;
- fcurve_to_keylist(adt, fcu, &anim_keys, NULL);
+ fcurve_to_keylist(adt, fcu, &anim_keys);
break;
}
}
}
else if (ale->type == ANIMTYPE_SUMMARY) {
/* dopesheet summary covers everything */
- summary_to_keylist(ac, &anim_keys, NULL);
+ summary_to_keylist(ac, &anim_keys);
}
else if (ale->type == ANIMTYPE_GROUP) {
// TODO: why don't we just give groups key_data too?
bActionGroup *agrp = (bActionGroup *)ale->data;
- agroup_to_keylist(adt, agrp, &anim_keys, NULL);
+ agroup_to_keylist(adt, agrp, &anim_keys);
}
else if (ale->type == ANIMTYPE_GPLAYER) {
// TODO: why don't we just give gplayers key_data too?