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:
authorJoshua Leung <aligorith@gmail.com>2014-05-22 07:37:32 +0400
committerJoshua Leung <aligorith@gmail.com>2014-05-22 07:37:32 +0400
commit6f99699d7d5a362e669b86cee6487e1397b017ba (patch)
tree60c03c5d5d5412042cb7bc0a00229253167debb1 /source/blender
parent9e76f13e6b1b3c5f9760879ba3c026b491330b14 (diff)
Previous commit uncovered another bug - Ungrouped FCurves couldn't be rearranged still
This was because to the filtering code, those FCurves still weren't in any groups, and so couldn't be visible (since a temporary group is created to house them). As a result, the visible-channels list would be empty, causing all hidden FCurves to be treated as hidden.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index eab78f19932..a7e7cb2df1a 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -891,8 +891,9 @@ static void rearrange_animchannels_filter_visible(ListBase *anim_data_visible, b
for (ale = anim_data.first; ale; ale = ale_next) {
ale_next = ale->next;
- if (ale->type != type)
+ if (ale->type != type) {
BLI_freelinkN(&anim_data, ale);
+ }
}
/* return cleaned up list */
@@ -1045,6 +1046,13 @@ static void split_groups_action_temp(bAction *act, bActionGroup *tgrp)
fcu->next = NULL;
tgrp->channels.last = fcu;
act->curves.last = NULL;
+
+ /* ensure that all of these get their group set to this temp group
+ * (so that visibility filtering works)
+ */
+ for (fcu = tgrp->channels.first; fcu; fcu = fcu->next) {
+ fcu->grp = tgrp;
+ }
}
/* Add temp-group to list */
@@ -1067,8 +1075,17 @@ static void join_groups_action_temp(bAction *act)
/* clear moved flag */
agrp->flag &= ~AGRP_MOVED;
- /* if temp-group... remove from list (but don't free as it's on the stack!) */
+ /* if group was temporary one:
+ * - unassign all FCurves which were temporarily added to it
+ * - remove from list (but don't free as it's on the stack!)
+ */
if (agrp->flag & AGRP_TEMP) {
+ FCurve *fcu;
+
+ for (fcu = agrp->channels.first; fcu; fcu = fcu->next) {
+ fcu->grp = NULL;
+ }
+
BLI_remlink(&act->groups, agrp);
break;
}