Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-26 17:05:33 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-26 17:05:33 +0300
commitb68aceda2f070207f65e2068d11ac9296a7c4b40 (patch)
tree8d8f552336cf7f20b2175aad4493bd3a733a626a /source/blender/editors/space_outliner
parent1eaff737fd60eedcae7276c8d80b992e6447b2b5 (diff)
2.5: Remove OOPS code from the outliner space, as discussed
this can be brought back as a new space if someone decides to work on it. This also fixes remaining issues with the outliner tree open and close buttons not working sometimes.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner.c6
-rw-r--r--source/blender/editors/space_outliner/outliner_header.c151
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c2
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c29
4 files changed, 80 insertions, 108 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 389878f7b6c..54652587c53 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -50,7 +50,7 @@
#include "DNA_modifier_types.h"
#include "DNA_nla_types.h"
#include "DNA_object_types.h"
-#include "DNA_oops_types.h"
+#include "DNA_outliner_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
@@ -3063,9 +3063,9 @@ enum {
static int ed_operator_outliner_datablocks_active(bContext *C)
{
ScrArea *sa= CTX_wm_area(C);
- if ((sa) && (sa->spacetype==SPACE_OOPS)) {
+ if ((sa) && (sa->spacetype==SPACE_OUTLINER)) {
SpaceOops *so= (SpaceOops *)CTX_wm_space_data(C);
- return ((so->type == SO_OUTLINER) && (so->outlinevis == SO_DATABLOCKS));
+ return (so->outlinevis == SO_DATABLOCKS);
}
return 0;
}
diff --git a/source/blender/editors/space_outliner/outliner_header.c b/source/blender/editors/space_outliner/outliner_header.c
index b42f6ec16ff..ecff2d8a417 100644
--- a/source/blender/editors/space_outliner/outliner_header.c
+++ b/source/blender/editors/space_outliner/outliner_header.c
@@ -88,9 +88,6 @@ static void do_viewmenu(bContext *C, void *arg, int event)
/* using event B_FULL */
break;
break;
- case 14: /* show outliner viewer */
- soops->type= SO_OUTLINER;
- break;
case 6:
//outliner_toggle_visible(curarea);
break;
@@ -124,23 +121,21 @@ static uiBlock *outliner_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
block= uiBeginBlock(C, ar, "outliner_viewmenu", UI_EMBOSSP, UI_HELV);
uiBlockSetButmFunc(block, do_viewmenu, NULL);
- if(soops->type==SO_OUTLINER) {
- if (soops->flag & SO_HIDE_RESTRICTCOLS)
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Restriction Columns", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
- else
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Restriction Columns", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Expand One Level|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Collapse One Level|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show/Hide All", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hierarchy|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Active|NumPad .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
- }
+ if (soops->flag & SO_HIDE_RESTRICTCOLS)
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Restriction Columns", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
+ else
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Restriction Columns", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Expand One Level|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Collapse One Level|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show/Hide All", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hierarchy|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Active|NumPad .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, "");
// uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
// if(!curarea->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
@@ -239,73 +234,71 @@ void outliner_header_buttons(const bContext *C, ARegion *ar)
uiBlockSetEmboss(block, UI_EMBOSS);
}
- //if (outliner->type==SO_OUTLINER) {
- /* data selector*/
- if(G.main->library.first)
- uiDefButS(block, MENU, B_REDR, "Outliner Display%t|Libraries %x7|All Scenes %x0|Current Scene %x1|Visible Layers %x2|Groups %x6|Same Types %x5|Selected %x3|Active %x4|Sequence %x10|Datablocks %x11|User Preferences %x12", xco, yco, 120, 20, &soutliner->outlinevis, 0, 0, 0, 0, "");
- else
- uiDefButS(block, MENU, B_REDR, "Outliner Display%t|All Scenes %x0|Current Scene %x1|Visible Layers %x2|Groups %x6|Same Types %x5|Selected %x3|Active %x4|Sequence %x10|Datablocks %x11|User Preferences %x12", xco, yco, 120, 20, &soutliner->outlinevis, 0, 0, 0, 0, "");
- xco += 120;
+ /* data selector*/
+ if(G.main->library.first)
+ uiDefButS(block, MENU, B_REDR, "Outliner Display%t|Libraries %x7|All Scenes %x0|Current Scene %x1|Visible Layers %x2|Groups %x6|Same Types %x5|Selected %x3|Active %x4|Sequence %x10|Datablocks %x11|User Preferences %x12", xco, yco, 120, 20, &soutliner->outlinevis, 0, 0, 0, 0, "");
+ else
+ uiDefButS(block, MENU, B_REDR, "Outliner Display%t|All Scenes %x0|Current Scene %x1|Visible Layers %x2|Groups %x6|Same Types %x5|Selected %x3|Active %x4|Sequence %x10|Datablocks %x11|User Preferences %x12", xco, yco, 120, 20, &soutliner->outlinevis, 0, 0, 0, 0, "");
+ xco += 120;
+
+ /* KeyingSet editing buttons */
+ if ((soutliner->flag & SO_HIDE_KEYINGSETINFO)==0 && (soutliner->outlinevis==SO_DATABLOCKS)) {
+ KeyingSet *ks= NULL;
+ char *menustr= NULL;
- /* KeyingSet editing buttons */
- if ((soutliner->flag & SO_HIDE_KEYINGSETINFO)==0 && (soutliner->outlinevis==SO_DATABLOCKS)) {
- KeyingSet *ks= NULL;
- char *menustr= NULL;
-
- xco+= (int)(XIC*1.5);
+ xco+= (int)(XIC*1.5);
+
+ if (scene->active_keyingset)
+ ks= (KeyingSet *)BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+
+ uiBlockBeginAlign(block);
+ /* currently 'active' KeyingSet */
+ menustr= ANIM_build_keyingsets_menu(&scene->keyingsets, 1);
+ uiDefButI(block, MENU, B_KEYINGSET_CHANGE, menustr, xco,yco, 18,20, &scene->active_keyingset, 0, 0, 0, 0, "Browse Keying Sets");
+ MEM_freeN(menustr);
+ xco += 18;
- if (scene->active_keyingset)
- ks= (KeyingSet *)BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ /* currently 'active' KeyingSet - change name */
+ if (ks) {
+ /* active KeyingSet */
+ uiDefBut(block, TEX, B_KEYINGSET_CHANGE,"", xco,yco,120,20, ks->name, 0, 63, 0, 0, "Name of Active Keying Set");
+ xco += 120;
+ uiDefIconBut(block, BUT, B_KEYINGSET_REMOVE, VICON_X, xco, yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Remove this Keying Set");
+ xco += 20;
+ }
+ else {
+ /* no active KeyingSet... so placeholder instead */
+ uiDefBut(block, LABEL, 0,"<No Keying Set Active>", xco,yco,140,20, NULL, 0, 63, 0, 0, "Name of Active Keying Set");
+ xco += 140;
+ }
+ uiBlockEndAlign(block);
+
+ /* current 'active' KeyingSet */
+ if (ks) {
+ xco += 5;
+ /* operator buttons to add/remove selected items from set */
uiBlockBeginAlign(block);
- /* currently 'active' KeyingSet */
- menustr= ANIM_build_keyingsets_menu(&scene->keyingsets, 1);
- uiDefButI(block, MENU, B_KEYINGSET_CHANGE, menustr, xco,yco, 18,20, &scene->active_keyingset, 0, 0, 0, 0, "Browse Keying Sets");
- MEM_freeN(menustr);
- xco += 18;
-
- /* currently 'active' KeyingSet - change name */
- if (ks) {
- /* active KeyingSet */
- uiDefBut(block, TEX, B_KEYINGSET_CHANGE,"", xco,yco,120,20, ks->name, 0, 63, 0, 0, "Name of Active Keying Set");
- xco += 120;
- uiDefIconBut(block, BUT, B_KEYINGSET_REMOVE, VICON_X, xco, yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Remove this Keying Set");
- xco += 20;
- }
- else {
- /* no active KeyingSet... so placeholder instead */
- uiDefBut(block, LABEL, 0,"<No Keying Set Active>", xco,yco,140,20, NULL, 0, 63, 0, 0, "Name of Active Keying Set");
- xco += 140;
- }
+ // XXX the icons here are temporary
+ uiDefIconButO(block, BUT, "OUTLINER_OT_keyingset_remove_selected", WM_OP_INVOKE_REGION_WIN, ICON_ZOOMOUT, xco,yco,XIC,YIC, "Remove selected properties from active Keying Set (Alt-K)");
+ xco += XIC;
+ uiDefIconButO(block, BUT, "OUTLINER_OT_keyingset_add_selected", WM_OP_INVOKE_REGION_WIN, ICON_ZOOMIN, xco,yco,XIC,YIC, "Add selected properties to active Keying Set (K)");
+ xco += XIC;
uiBlockEndAlign(block);
- /* current 'active' KeyingSet */
- if (ks) {
- xco += 5;
-
- /* operator buttons to add/remove selected items from set */
- uiBlockBeginAlign(block);
- // XXX the icons here are temporary
- uiDefIconButO(block, BUT, "OUTLINER_OT_keyingset_remove_selected", WM_OP_INVOKE_REGION_WIN, ICON_ZOOMOUT, xco,yco,XIC,YIC, "Remove selected properties from active Keying Set (Alt-K)");
- xco += XIC;
- uiDefIconButO(block, BUT, "OUTLINER_OT_keyingset_add_selected", WM_OP_INVOKE_REGION_WIN, ICON_ZOOMIN, xco,yco,XIC,YIC, "Add selected properties to active Keying Set (K)");
- xco += XIC;
- uiBlockEndAlign(block);
-
- xco += 10;
-
- /* operator buttons to insert/delete keyframes for the active set */
- uiBlockBeginAlign(block);
- uiDefIconButO(block, BUT, "ANIM_OT_delete_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_DEHLT, xco,yco,XIC,YIC, "Delete Keyframes for the Active Keying Set (Alt-I)");
- xco+= XIC;
- uiDefIconButO(block, BUT, "ANIM_OT_insert_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_HLT, xco,yco,XIC,YIC, "Insert Keyframes for the Active Keying Set (I)");
- xco+= XIC;
- uiBlockEndAlign(block);
- }
+ xco += 10;
- xco += XIC*2;
+ /* operator buttons to insert/delete keyframes for the active set */
+ uiBlockBeginAlign(block);
+ uiDefIconButO(block, BUT, "ANIM_OT_delete_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_DEHLT, xco,yco,XIC,YIC, "Delete Keyframes for the Active Keying Set (Alt-I)");
+ xco+= XIC;
+ uiDefIconButO(block, BUT, "ANIM_OT_insert_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_HLT, xco,yco,XIC,YIC, "Insert Keyframes for the Active Keying Set (I)");
+ xco+= XIC;
+ uiBlockEndAlign(block);
}
- //}
+
+ xco += XIC*2;
+ }
/* always as last */
UI_view2d_totRect_set(&ar->v2d, xco+XIC+100, (int)(ar->v2d.tot.ymax-ar->v2d.tot.ymin));
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index 8ed4c9ed986..920ccb62a7a 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -51,7 +51,7 @@ void outliner_operatortypes(void)
void outliner_keymap(wmWindowManager *wm)
{
- ListBase *keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OOPS, 0);
+ ListBase *keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OUTLINER, 0);
WM_keymap_verify_item(keymap, "OUTLINER_OT_activate_click", LEFTMOUSE, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index b8187309c0d..4add1e88986 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -31,7 +31,7 @@
#include "DNA_color_types.h"
#include "DNA_object_types.h"
-#include "DNA_oops_types.h"
+#include "DNA_outliner_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
@@ -78,7 +78,7 @@ static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OOPS, 0); /* XXX weak? */
+ keymap= WM_keymap_listbase(wm, "Outliner", SPACE_OUTLINER, 0); /* XXX weak? */
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -190,7 +190,7 @@ static SpaceLink *outliner_new(const bContext *C)
SpaceOops *soutliner;
soutliner= MEM_callocN(sizeof(SpaceOops), "initoutliner");
- soutliner->spacetype= SPACE_OOPS;
+ soutliner->spacetype= SPACE_OUTLINER;
/* header */
ar= MEM_callocN(sizeof(ARegion), "header for outliner");
@@ -214,27 +214,10 @@ static SpaceLink *outliner_new(const bContext *C)
return (SpaceLink*)soutliner;
}
-static void free_oops(Oops *oops) /* also oops itself */
-{
- BLI_freelistN(&oops->link);
- MEM_freeN(oops);
-}
-
/* not spacelink itself */
static void outliner_free(SpaceLink *sl)
{
SpaceOops *soutliner= (SpaceOops*)sl;
- Oops *oops;
-
- if(soutliner->rnapath) {
- MEM_freeN(soutliner->rnapath);
- soutliner->rnapath= NULL;
- }
-
- while( (oops= soutliner->oops.first) ) {
- BLI_remlink(&soutliner->oops, oops);
- free_oops(oops);
- }
outliner_free_tree(&soutliner->tree);
if(soutliner->treestore) {
@@ -255,10 +238,6 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl)
SpaceOops *soutliner= (SpaceOops *)sl;
SpaceOops *soutlinern= MEM_dupallocN(soutliner);
- if(soutlinern->rnapath)
- soutlinern->rnapath= MEM_dupallocN(soutlinern->rnapath);
-
- soutlinern->oops.first= soutlinern->oops.last= NULL;
soutlinern->tree.first= soutlinern->tree.last= NULL;
soutlinern->treestore= NULL;
@@ -271,7 +250,7 @@ void ED_spacetype_outliner(void)
SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype time");
ARegionType *art;
- st->spaceid= SPACE_OOPS;
+ st->spaceid= SPACE_OUTLINER;
strncpy(st->name, "Outliner", BKE_ST_MAXNAME);
st->new= outliner_new;