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>2016-07-07 17:49:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-07-07 17:50:08 +0300
commit6e6073e13ccf7965bb36c2b4d3349ca967bc505e (patch)
treeaeedc98bbb44fd877ba5757f02b52f94949fad68 /source/blender/editors/animation
parent124bfa4d2d4027cdb2cd2b9375b99c8d98b106de (diff)
Skip the ID part of object names when comparing
Also no need to calloc arrays which are immediately filled
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_filter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index a4d5fefe2eb..88d96c531e0 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -2788,10 +2788,10 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Scene *scene, Base *base
/* Helper for animdata_filter_ds_sorted_bases() - Comparison callback for two Base pointers... */
static int ds_base_sorting_cmp(const void *base1_ptr, const void *base2_ptr)
{
- const Base *b1 = *((Base **)base1_ptr);
- const Base *b2 = *((Base **)base2_ptr);
+ const Base *b1 = *((const Base **)base1_ptr);
+ const Base *b2 = *((const Base **)base2_ptr);
- return strcmp(b1->object->id.name, b2->object->id.name);
+ return strcmp(b1->object->id.name + 2, b2->object->id.name + 2);
}
/* Get a sorted list of all the bases - for inclusion in dopesheet (when drawing channels) */
@@ -2801,7 +2801,7 @@ static Base **animdata_filter_ds_sorted_bases(bDopeSheet *ads, Scene *scene, int
size_t tot_bases = BLI_listbase_count(&scene->base);
size_t num_bases = 0;
- Base **sorted_bases = MEM_callocN(sizeof(Base *) * tot_bases, "Dopesheet Usable Sorted Bases");
+ Base **sorted_bases = MEM_mallocN(sizeof(Base *) * tot_bases, "Dopesheet Usable Sorted Bases");
for (Base *base = scene->base.first; base; base = base->next) {
if (animdata_filter_base_is_ok(ads, scene, base, filter_mode)) {
sorted_bases[num_bases++] = base;