[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13331] trunk/blender/source/blender/src/ editaction.c: Now, when rearranging channels in the Action Editor, Action-Channel's only get rearranged if no groups were moved (i.e.
Joshua Leung
aligorith at gmail.com
Mon Jan 21 12:30:54 CET 2008
Revision: 13331
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13331
Author: aligorith
Date: 2008-01-21 12:30:54 +0100 (Mon, 21 Jan 2008)
Log Message:
-----------
Now, when rearranging channels in the Action Editor, Action-Channel's only get rearranged if no groups were moved (i.e. not groups were selected). This should be less annoying for users.
Modified Paths:
--------------
trunk/blender/source/blender/src/editaction.c
Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c 2008-01-21 11:26:24 UTC (rev 13330)
+++ trunk/blender/source/blender/src/editaction.c 2008-01-21 11:30:54 UTC (rev 13331)
@@ -3558,6 +3558,7 @@
short datatype;
short (*rearrange_func)(ListBase *, Link *, short);
+ short do_channels = 1;
char undostr[60];
/* Get the active action, exit if none are selected */
@@ -3591,7 +3592,7 @@
/* make sure we're only operating with groups */
split_groups_action_temp(act, &tgrp);
- /* rearrange groups, and channels */
+ /* rearrange groups first (and then, only consider channels if the groups weren't moved) */
#define GET_FIRST(list) ((mode > 0) ? (list.first) : (list.last))
#define GET_NEXT(item) ((mode > 0) ? (item->next) : (item->prev))
@@ -3600,18 +3601,27 @@
grp= GET_NEXT(agrp);
/* try to do group first */
- if (rearrange_func(&act->groups, (Link *)agrp, ACTTYPE_GROUP))
+ if (rearrange_func(&act->groups, (Link *)agrp, ACTTYPE_GROUP)) {
+ do_channels= 0;
agrp->flag |= AGRP_MOVED;
+ }
+ }
+
+ if (do_channels) {
+ for (agrp= GET_FIRST(act->groups); agrp; agrp= grp) {
+ /* Get next group to consider */
+ grp= GET_NEXT(agrp);
- /* only consider action-channels if they're visible (group expanded) */
- if (EXPANDED_AGRP(agrp)) {
- for (achan= GET_FIRST(agrp->channels); achan; achan= chan) {
- /* Get next channel to consider */
- chan= GET_NEXT(achan);
-
- /* Try to do channel */
- if (rearrange_func(&agrp->channels, (Link *)achan, ACTTYPE_ACHAN))
- achan->flag |= ACHAN_MOVED;
+ /* only consider action-channels if they're visible (group expanded) */
+ if (EXPANDED_AGRP(agrp)) {
+ for (achan= GET_FIRST(agrp->channels); achan; achan= chan) {
+ /* Get next channel to consider */
+ chan= GET_NEXT(achan);
+
+ /* Try to do channel */
+ if (rearrange_func(&agrp->channels, (Link *)achan, ACTTYPE_ACHAN))
+ achan->flag |= ACHAN_MOVED;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list