- Outliner: new items (on first show) come up collapsed now
authorTon Roosendaal <ton@blender.org>
Wed, 6 Oct 2004 20:44:11 +0000 (20:44 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 6 Oct 2004 20:44:11 +0000 (20:44 +0000)
- Outliner: click on Armature data goes in posemode

And long wanted, and found out is just a threeliner in code:

- Posemode: click-select-drag or grab-gesture switches to 'rotate'
  automatic when no bone can be translated.

source/blender/src/editarmature.c
source/blender/src/editobject.c
source/blender/src/outliner.c

index 027ccb76017821211b6173d48a7099ef7b109153..76ef91c587c39c7e43df0ccdb708c31421ec881f 100644 (file)
@@ -2222,7 +2222,6 @@ void mousepose_armature(void)
        allqueue(REDRAWIPO, 0);         /* To force action ipo update */
        allqueue(REDRAWBUTSOBJECT, 0);
 
-//     countall();
        rightmouse_transform();
        
 }
index c7a4896708c3a2b5f7bc4f6c46926820c06a3ae3..8c6852f812165df49962601999f90cee3289d213 100644 (file)
@@ -5045,6 +5045,12 @@ void transform(int mode)
                        figure_bone_nocalc(G.obpose);
                        figure_pose_updating();
                        make_trans_bones((char)mode);
+                       
+                       if(mode=='g' && tottrans==0) {
+                               mode= 'r';
+                               make_trans_bones((char)mode);
+                       }
+                       
                        break;
                }
        }
index 601329a08404502af89c5e752d7dbbd20c88d523..3f5687033de3a513ab3eeb5fd36563833f093efc 100644 (file)
@@ -75,6 +75,7 @@
 #include "BIF_outliner.h"
 #include "BIF_language.h"
 #include "BIF_mainqueue.h"
+#include "BIF_poseobject.h"
 #include "BIF_previewrender.h"
 #include "BIF_resources.h"
 #include "BIF_screen.h"
@@ -187,7 +188,7 @@ static void check_persistant(SpaceOops *soops, TreeElement *te, ID *id, short ty
        tselem->type= type;
        tselem->nr= nr;
        tselem->id= id;
-       tselem->flag= 0;
+       tselem->flag= TSE_CLOSED;
        te->store_index= ts->usedelem;
        
        ts->usedelem++;
@@ -798,10 +799,15 @@ static int do_outliner_mouse_event(SpaceOops *soops, TreeElement *te, short even
                                        set_scene((Scene *)tselem->id);
                                }
                        }
-                       else if(ELEM5(GS(tselem->id->name), ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) {
+                       else if(ELEM4(GS(tselem->id->name), ID_ME, ID_CU, ID_MB, ID_LT)) {
                                if(G.obedit) exit_editmode(2);
                                else enter_editmode();
                        }
+                       else if(GS(tselem->id->name)==ID_AR) {
+                               if(G.obedit) exit_editmode(2);
+                               if(G.obpose) exit_posemode(1);
+                               else enter_posemode();
+                       }
                        else {  // rest of types
                                tree_element_active(soops, te, 1);
                        }
@@ -933,6 +939,7 @@ static void outliner_draw_iconrow(SpaceOops *soops, TreeElement *parent, ListBas
                        /* active blocks get white circle */
                        active= 0;
                        if(GS(tselem->id->name)==ID_OB) active= (OBACT==(Object *)tselem->id);
+                       else if(G.obpose && G.obedit->data==tselem->id) active= 1;
                        else if(G.obedit && G.obedit->data==tselem->id) active= 1;
                        else active= tree_element_active(soops, te, 0);
                        
@@ -1144,7 +1151,6 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
        /* draw outliner stuff */
        outliner_back(soops);
        outliner_draw_tree(soops);
-
        
        /* drawoopsspace handles sliders and restores view */
 }