Action Editor - More Bugfixes for Action-Groups:
authorJoshua Leung <aligorith@gmail.com>
Sun, 20 Jan 2008 04:27:54 +0000 (04:27 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 20 Jan 2008 04:27:54 +0000 (04:27 +0000)
* Wrong selection functions were being used for borderselect when handling groups. This resulted in all of the keyframes for a group getting selected
* Select row was not working for groups either, as there was missing code there...

source/blender/src/editaction.c

index 6029762e9e6fb069f0937a7bf65903b1bd3f6432..7f8c645757476212491c3aaadc738aad524d9236 100644 (file)
@@ -2492,6 +2492,20 @@ void selectall_action_keys (short mval[], short mode, short select_mode)
                        /* get channel, and act according to type */
                        act_channel= get_nearest_act_channel(mval, &chantype);
                        switch (chantype) {
+                               case ACTTYPE_GROUP:     
+                               {
+                                       bActionGroup *agrp= (bActionGroup *)act_channel;
+                                       bActionChannel *achan;
+                                       bConstraintChannel *conchan;
+                                       
+                                       for (achan= agrp->channels.first; achan && achan->grp==agrp; achan= achan->next) {
+                                               select_ipo_bezier_keys(achan->ipo, select_mode);
+                                               
+                                               for (conchan=achan->constraintChannels.first; conchan; conchan=conchan->next) 
+                                                       select_ipo_bezier_keys(conchan->ipo, select_mode);
+                                       }
+                               }
+                                       break;
                                case ACTTYPE_ACHAN:
                                {
                                        bActionChannel *achan= (bActionChannel *)act_channel;
@@ -2937,10 +2951,10 @@ void borderselect_action (void)
                                                bConstraintChannel *conchan;
                                                
                                                for (achan= agrp->channels.first; achan && achan->grp==agrp; achan= achan->next) {
-                                                       select_ipo_bezier_keys(achan->ipo, selectmode);
+                                                       borderselect_ipo_key(achan->ipo, rectf.xmin, rectf.xmax, selectmode);
                                                        
                                                        for (conchan=achan->constraintChannels.first; conchan; conchan=conchan->next)
-                                                               select_ipo_bezier_keys(conchan->ipo, selectmode);
+                                                               borderselect_ipo_key(conchan->ipo, rectf.xmin, rectf.xmax, selectmode);
                                                }
                                        }
                                }