[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15381] trunk/blender/source/blender/src: Action Editor - Group drawing tweaks:
Joshua Leung
aligorith at gmail.com
Sun Jun 29 07:52:11 CEST 2008
Revision: 15381
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15381
Author: aligorith
Date: 2008-06-29 07:52:11 +0200 (Sun, 29 Jun 2008)
Log Message:
-----------
Action Editor - Group drawing tweaks:
* When all the action-channels for a group are hidden (i.e. their related bones are not visible), the group in question is also not drawn. This helps reduce clutter. (slikdigit funboard request)
* When a group has no channels belonging to it, the expand icon/button isn't drawn for that group.
Modified Paths:
--------------
trunk/blender/source/blender/src/drawaction.c
trunk/blender/source/blender/src/editaction.c
Modified: trunk/blender/source/blender/src/drawaction.c
===================================================================
--- trunk/blender/source/blender/src/drawaction.c 2008-06-29 03:58:46 UTC (rev 15380)
+++ trunk/blender/source/blender/src/drawaction.c 2008-06-29 05:52:11 UTC (rev 15381)
@@ -474,10 +474,13 @@
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;
Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c 2008-06-29 03:58:46 UTC (rev 15380)
+++ trunk/blender/source/blender/src/editaction.c 2008-06-29 05:52:11 UTC (rev 15381)
@@ -390,7 +390,7 @@
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 @@
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 @@
{
bActionGroup *agrp= (bActionGroup *)act_channel;
- if (mval[0] < 16) {
+ if ((mval[0] < 16) && (agrp->channels.first)) {
/* toggle expand */
agrp->flag ^= AGRP_EXPANDED;
}
More information about the Bf-blender-cvs
mailing list