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:
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawaction.c11
-rw-r--r--source/blender/src/editaction.c13
2 files changed, 18 insertions, 6 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index 8c4958a651a..89466151a39 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -474,10 +474,13 @@ static void draw_channel_names(void)
indent= 0;
special= -1;
- if (EXPANDED_AGRP(agrp))
- expand = ICON_TRIA_DOWN;
- else
- expand = ICON_TRIA_RIGHT;
+ /* only show expand if there are any channels */
+ if (agrp->channels.first) {
+ if (EXPANDED_AGRP(agrp))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+ }
if (EDITABLE_AGRP(agrp))
protect = ICON_UNLOCKED;
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index 40b6b7ba6fe..f93a1526e3c 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -390,7 +390,7 @@ static void actdata_filter_actionchannel (ListBase *act_data, bActionChannel *ac
static void actdata_filter_action (ListBase *act_data, bAction *act, int filter_mode)
{
- bActListElem *ale;
+ bActListElem *ale=NULL;
bActionGroup *agrp;
bActionChannel *achan, *lastchan=NULL;
@@ -429,6 +429,15 @@ static void actdata_filter_action (ListBase *act_data, bAction *act, int filter_
for (achan= agrp->channels.first; achan && achan->grp==agrp; achan= achan->next) {
actdata_filter_actionchannel(act_data, achan, filter_mode);
}
+
+ /* remove group from filtered list if last element is group
+ * (i.e. only if group had channels, which were all hidden)
+ */
+ if ( (ale) && (act_data->last == ale) &&
+ (ale->data == agrp) && (agrp->channels.first) )
+ {
+ BLI_freelinkN(act_data, ale);
+ }
}
}
}
@@ -3648,7 +3657,7 @@ static void mouse_actionchannels (short mval[])
{
bActionGroup *agrp= (bActionGroup *)act_channel;
- if (mval[0] < 16) {
+ if ((mval[0] < 16) && (agrp->channels.first)) {
/* toggle expand */
agrp->flag ^= AGRP_EXPANDED;
}