From 25c52c19e94c227764ae4037c2e643af250d583d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 6 Oct 2004 20:44:11 +0000 Subject: [PATCH] - Outliner: new items (on first show) come up collapsed now - 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 | 1 - source/blender/src/editobject.c | 6 ++++++ source/blender/src/outliner.c | 12 +++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index 027ccb76017..76ef91c587c 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -2222,7 +2222,6 @@ void mousepose_armature(void) allqueue(REDRAWIPO, 0); /* To force action ipo update */ allqueue(REDRAWBUTSOBJECT, 0); -// countall(); rightmouse_transform(); } diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index c7a4896708c..8c6852f8121 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -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; } } diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index 601329a0840..3f5687033de 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -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 */ }