Revision: 17449
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17449
Author:   aligorith
Date:     2008-11-14 04:01:39 +0100 (Fri, 14 Nov 2008)

Log Message:
-----------
AnimSys2: Dopesheet - Object Selection

Improved the Object channel selection behaviour to be more consistent with the 
rest of Blender

Modified Paths:
--------------
    branches/animsys2/source/blender/src/editaction.c

Modified: branches/animsys2/source/blender/src/editaction.c
===================================================================
--- branches/animsys2/source/blender/src/editaction.c   2008-11-14 02:13:10 UTC 
(rev 17448)
+++ branches/animsys2/source/blender/src/editaction.c   2008-11-14 03:01:39 UTC 
(rev 17449)
@@ -4444,6 +4444,7 @@
        switch (chantype) {
                case ACTTYPE_OBJECT:
                        {
+                               Scene *sce= (Scene *)G.saction->ads.source;
                                Base *base= (Base *)act_channel;
                                Object *ob= base->object;
                                
@@ -4452,9 +4453,27 @@
                                        ob->nlaflag ^= OB_ADS_COLLAPSED;
                                }
                                else {
-                                       // TODO: selection stuff?
-                                       base->flag ^= SELECT;
-                                       ob->flag ^= SELECT;
+                                       /* set selection status */
+                                       if (G.qual & LR_SHIFTKEY) {
+                                               /* swap select */
+                                               base->flag ^= SELECT;
+                                               ob->flag= base->flag;
+                                       }
+                                       else {
+                                               Base *b;
+                                               
+                                               /* deleselect all */
+                                               for (b= sce->base.first; b; b= 
b->next) {
+                                                       b->flag &= ~SELECT;
+                                                       b->object->flag= 
b->flag;
+                                               }
+                                               
+                                               /* select object now */
+                                               base->flag |= SELECT;
+                                               ob->flag |= SELECT;
+                                       }
+                                       
+                                       set_active_base(base);  /* editview.c */
                                }
                        }
                                break;


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to