diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-26 17:05:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-26 17:05:33 +0300 |
commit | b68aceda2f070207f65e2068d11ac9296a7c4b40 (patch) | |
tree | 8d8f552336cf7f20b2175aad4493bd3a733a626a /source | |
parent | 1eaff737fd60eedcae7276c8d80b992e6447b2b5 (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')
17 files changed, 106 insertions, 254 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 0f48133efc7..917fb7d1de4 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -55,7 +55,7 @@ #include "DNA_object_types.h" #include "DNA_object_force.h" #include "DNA_object_fluidsim.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" diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 249f67367f4..5e0c5740143 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -58,7 +58,7 @@ #include "DNA_object_types.h" #include "DNA_object_force.h" #include "DNA_object_fluidsim.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" @@ -554,15 +554,9 @@ void unlink_object(Scene *scene, Object *ob) // XXX if(v3d->localvd->persp==V3D_CAMOB) v3d->localvd->persp= V3D_PERSP; } } - else if(sl->spacetype==SPACE_OOPS) { + else if(sl->spacetype==SPACE_OUTLINER) { SpaceOops *so= (SpaceOops *)sl; - Oops *oops; - oops= so->oops.first; - while(oops) { - if(oops->id==(ID *)ob) oops->id= NULL; - oops= oops->next; - } if(so->treestore) { TreeStoreElem *tselem= so->treestore->data; int a; @@ -570,7 +564,6 @@ void unlink_object(Scene *scene, Object *ob) if(tselem->id==(ID *)ob) tselem->id= NULL; } } - so->lockpoin= NULL; } } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 046618a1f6d..b0b3e9daf2b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -81,7 +81,7 @@ #include "DNA_object_types.h" #include "DNA_object_force.h" #include "DNA_object_fluidsim.h" // NT -#include "DNA_oops_types.h" +#include "DNA_outliner_types.h" #include "DNA_object_force.h" #include "DNA_packedFile_types.h" #include "DNA_particle_types.h" @@ -4205,18 +4205,11 @@ static void lib_link_screen(FileData *fd, Main *main) } } } - else if(sl->spacetype==SPACE_OOPS) { + else if(sl->spacetype==SPACE_OUTLINER) { SpaceOops *so= (SpaceOops *)sl; - Oops *oops; TreeStoreElem *tselem; int a; - oops= so->oops.first; - while(oops) { - oops->id= newlibadr(fd, NULL, oops->id); - oops= oops->next; - } - so->lockpoin= NULL; so->tree.first= so->tree.last= NULL; so->search_tse.id= newlibadr(fd, NULL, so->search_tse.id); @@ -4414,17 +4407,10 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) SCRIPT_SET_NULL(scpt->script) } } - else if(sl->spacetype==SPACE_OOPS) { + else if(sl->spacetype==SPACE_OUTLINER) { SpaceOops *so= (SpaceOops *)sl; - Oops *oops; int a; - oops= so->oops.first; - while(oops) { - oops->id= restore_pointer_by_name(newmain, (ID *)oops->id, 0); - oops= oops->next; - } - so->lockpoin= NULL; so->search_tse.id= restore_pointer_by_name(newmain, so->search_tse.id, 0); if(so->treestore) { @@ -4529,7 +4515,6 @@ static void direct_link_screen(FileData *fd, bScreen *sc) ScrArea *sa; ScrVert *sv; ScrEdge *se; - Oops *oops; int a; link_list(fd, &(sc->vertbase)); @@ -4617,16 +4602,9 @@ static void direct_link_screen(FileData *fd, bScreen *sc) sipo->ads= newdataadr(fd, sipo->ads); } - else if (sl->spacetype==SPACE_OOPS) { + else if (sl->spacetype==SPACE_OUTLINER) { SpaceOops *soops= (SpaceOops*) sl; - link_list(fd, &(soops->oops)); - oops= soops->oops.first; - while(oops) { - oops->link.first= oops->link.last= 0; - oops= oops->next; - } - soops->treestore= newdataadr(fd, soops->treestore); if(soops->treestore) { soops->treestore->data= newdataadr(fd, soops->treestore->data); @@ -5525,7 +5503,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) view3d_split_250((View3D *)sl, lb); break; - case SPACE_OOPS: + case SPACE_OUTLINER: { SpaceOops *soops= (SpaceOops *)sl; @@ -5538,8 +5516,6 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) ar->v2d.keeptot = V2D_KEEPTOT_STRICT; ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f; //ar->v2d.flag |= V2D_IS_INITIALISED; - - soops->type= SO_OUTLINER; } break; case SPACE_TIME: @@ -7025,12 +7001,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) View3D *v3d= (View3D *)sl; if(v3d->twtype==0) v3d->twtype= V3D_MANIP_TRANSLATE; } -#ifndef SHOWDEPGRAPH - else if(sl->spacetype==SPACE_OOPS) { - if ( ((SpaceOops *)sl)->type==SO_DEPSGRAPH) - ((SpaceOops *)sl)->type=SO_OOPS; - } -#endif else if(sl->spacetype==SPACE_TIME) { SpaceTime *stime= (SpaceTime *)sl; if(stime->redraws==0) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 2aa87883fdb..1c9c5cad19f 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -121,7 +121,7 @@ Any case: direct data is ALWAYS after the lib block #include "DNA_node_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" -#include "DNA_oops_types.h" +#include "DNA_outliner_types.h" #include "DNA_packedFile_types.h" #include "DNA_particle_types.h" #include "DNA_property_types.h" @@ -1820,29 +1820,11 @@ static void write_screens(WriteData *wd, ListBase *scrbase) writestruct(wd, DATA, "SpaceSeq", 1, sl); if(sseq->gpd) write_gpencil(wd, sseq->gpd); } - else if(sl->spacetype==SPACE_OOPS) { + else if(sl->spacetype==SPACE_OUTLINER) { SpaceOops *so= (SpaceOops *)sl; - Oops *oops; - /* cleanup */ - oops= so->oops.first; - while(oops) { - Oops *oopsn= oops->next; - if(oops->id==0) { - BLI_remlink(&so->oops, oops); -// XXX free_oops(oops); - } - oops= oopsn; - } - - /* ater cleanup, because of listbase! */ writestruct(wd, DATA, "SpaceOops", 1, so); - - oops= so->oops.first; - while(oops) { - writestruct(wd, DATA, "Oops", 1, oops); - oops= oops->next; - } + /* outliner */ if(so->treestore) { writestruct(wd, DATA, "TreeStore", 1, so->treestore); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index b031a544953..d5e349fb7b3 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1889,10 +1889,10 @@ static int modify_key_op_poll(bContext *C) return 0; /* if Outliner, only allow in DataBlocks view */ - if (sa->spacetype == SPACE_OOPS) { + if (sa->spacetype == SPACE_OUTLINER) { SpaceOops *so= (SpaceOops *)CTX_wm_space_data(C); - if ((so->type != SO_OUTLINER) || (so->outlinevis != SO_DATABLOCKS)) + if ((so->outlinevis != SO_DATABLOCKS)) return 0; } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index c1beb4b1c58..039ebcc91f9 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -176,7 +176,7 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case SPACE_TEXT: ts= &btheme->text; break; - case SPACE_OOPS: + case SPACE_OUTLINER: ts= &btheme->toops; break; case SPACE_SOUND: diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 076f871c4c2..ff0a89b9e1c 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -134,11 +134,7 @@ int ED_operator_timeline_active(bContext *C) int ED_operator_outliner_active(bContext *C) { - if(ed_spacetype_test(C, SPACE_OOPS)) { - SpaceOops *so= (SpaceOops *)CTX_wm_space_data(C); - return (so->type == SO_OUTLINER); - } - return 0; + return ed_spacetype_test(C, SPACE_OUTLINER); } int ED_operator_file_active(bContext *C) 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; diff --git a/source/blender/makesdna/DNA_oops_types.h b/source/blender/makesdna/DNA_outliner_types.h index 0a6b1a45b11..b19db15d73b 100644 --- a/source/blender/makesdna/DNA_oops_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -1,6 +1,4 @@ /** - * blenlib/DNA_oops_types.h (mar-2001 nzc) - * * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -28,11 +26,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_OOPS_TYPES_H -#define DNA_OOPS_TYPES_H - -#define OOPSX 5.0 -#define OOPSY 1.8 +#ifndef DNA_OUTLINER_TYPES_H +#define DNA_OUTLINER_TYPES_H #include "DNA_listBase.h" @@ -48,30 +43,6 @@ typedef struct TreeStore { TreeStoreElem *data; } TreeStore; -typedef struct Oops { - struct Oops *next, *prev; - short type, flag, dt, hide; - float x, y; /* left - bottom */ - float dx, dy; /* shuffle */ - struct ID *id; - ListBase link; -} Oops; - -# -# -typedef struct OopsLink { - struct OopsLink *next, *prev; - short type, flag; - struct ID **idfrom; - Oops *to, *from; /* from is for temp */ - float xof, yof; - char name[12]; -} OopsLink; - -/* oops->flag (1==SELECT) */ -#define OOPS_DOSELECT 2 -#define OOPS_REFER 4 - /* TreeStoreElem->flag */ #define TSE_CLOSED 1 #define TSE_SELECTED 2 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index d4dffddcdcc..8a26a216e79 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -33,7 +33,7 @@ #include "DNA_listBase.h" #include "DNA_vec_types.h" -#include "DNA_oops_types.h" /* for TreeStoreElem */ +#include "DNA_outliner_types.h" /* for TreeStoreElem */ #include "DNA_image_types.h" /* ImageUser */ /* Hum ... Not really nice... but needed for spacebuts. */ #include "DNA_view2d_types.h" @@ -194,10 +194,6 @@ typedef struct SpaceOops { View2D v2d; /* depricated, copied to region */ - ListBase oops; - short pin, visiflag, flag, rt; - void *lockpoin; - ListBase tree; struct TreeStore *treestore; @@ -206,12 +202,7 @@ typedef struct SpaceOops { struct TreeStoreElem search_tse; int search_flags, do_; - short type, outlinevis, storeflag; - short deps_flags; - - /* RNA */ - char *rnapath; - + short flag, outlinevis, storeflag, pad; } SpaceOops; typedef struct SpaceImage { @@ -609,35 +600,12 @@ enum { /* stext->findstr/replacestr */ #define ST_MAX_FIND_STR 256 -/* SpaceOops->type */ -#define SO_OOPS 0 -#define SO_OUTLINER 1 -#define SO_DEPSGRAPH 2 - /* SpaceOops->flag */ #define SO_TESTBLOCKS 1 #define SO_NEWSELECTED 2 #define SO_HIDE_RESTRICTCOLS 4 #define SO_HIDE_KEYINGSETINFO 8 -/* SpaceOops->visiflag */ -#define OOPS_SCE 1 -#define OOPS_OB 2 -#define OOPS_ME 4 -#define OOPS_CU 8 -#define OOPS_MB 16 -#define OOPS_LT 32 -#define OOPS_LA 64 -#define OOPS_MA 128 -#define OOPS_TE 256 -#define OOPS_IP 512 -#define OOPS_LAY 1024 -#define OOPS_LI 2048 -#define OOPS_IM 4096 -#define OOPS_AR 8192 -#define OOPS_GR 16384 -#define OOPS_CA 32768 - /* SpaceOops->outlinevis */ #define SO_ALL_SCENES 0 #define SO_CUR_SCENE 1 @@ -738,7 +706,7 @@ enum { SPACE_EMPTY, SPACE_VIEW3D, SPACE_IPO, - SPACE_OOPS, + SPACE_OUTLINER, SPACE_BUTS, SPACE_FILE, SPACE_IMAGE, diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 17547c4eb1d..bf2f0f3900e 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -111,7 +111,7 @@ char *includefiles[] = { "DNA_fileglobal_types.h", "DNA_sequence_types.h", "DNA_effect_types.h", - "DNA_oops_types.h", + "DNA_outliner_types.h", "DNA_property_types.h", "DNA_sensor_types.h", "DNA_controller_types.h", @@ -1135,7 +1135,7 @@ int main(int argc, char ** argv) #include "DNA_fileglobal_types.h" #include "DNA_sequence_types.h" #include "DNA_effect_types.h" -#include "DNA_oops_types.h" +#include "DNA_outliner_types.h" #include "DNA_property_types.h" #include "DNA_sensor_types.h" #include "DNA_controller_types.h" diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 1d281c7d6a2..5184e904927 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -49,7 +49,7 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr) return &RNA_SpaceView3D; case SPACE_IPO: return &RNA_SpaceGraphEditor; - case SPACE_OOPS: + case SPACE_OUTLINER: return &RNA_SpaceOutliner; case SPACE_BUTS: return &RNA_SpaceButtonsWindow; @@ -122,7 +122,7 @@ static void rna_def_space(BlenderRNA *brna) {SPACE_EMPTY, "EMPTY", "Empty", ""}, {SPACE_VIEW3D, "VIEW_3D", "3D View", ""}, {SPACE_IPO, "GRAPH_EDITOR", "Graph Editor", ""}, - {SPACE_OOPS, "OUTLINER", "Outliner", ""}, + {SPACE_OUTLINER, "OUTLINER", "Outliner", ""}, {SPACE_BUTS, "BUTTONS_WINDOW", "Buttons Window", ""}, {SPACE_FILE, "FILE_BROWSER", "File Browser", ""}, {SPACE_IMAGE, "IMAGE_EDITOR", "Image Editor", ""}, diff --git a/source/blender/python/intern/bpy_ui.c b/source/blender/python/intern/bpy_ui.c index ca61c0b425b..a6fa5b27aaf 100644 --- a/source/blender/python/intern/bpy_ui.c +++ b/source/blender/python/intern/bpy_ui.c @@ -600,7 +600,7 @@ PyObject *BPY_ui_module( void ) PyModule_AddObject( mod, "EMPTY", PyLong_FromSize_t(SPACE_EMPTY) ); PyModule_AddObject( mod, "VIEW3D", PyLong_FromSize_t(SPACE_VIEW3D) ); PyModule_AddObject( mod, "IPO", PyLong_FromSize_t(SPACE_IPO) ); - PyModule_AddObject( mod, "OOPS", PyLong_FromSize_t(SPACE_OOPS) ); + PyModule_AddObject( mod, "OUTLINER", PyLong_FromSize_t(SPACE_OUTLINER) ); PyModule_AddObject( mod, "BUTS", PyLong_FromSize_t(SPACE_BUTS) ); PyModule_AddObject( mod, "FILE", PyLong_FromSize_t(SPACE_FILE) ); PyModule_AddObject( mod, "IMAGE", PyLong_FromSize_t(SPACE_IMAGE) ); diff --git a/source/blender/python/simple_enum_gen.py b/source/blender/python/simple_enum_gen.py index ad9dc3053d8..59f048c2842 100644 --- a/source/blender/python/simple_enum_gen.py +++ b/source/blender/python/simple_enum_gen.py @@ -22,7 +22,7 @@ defs = """ SPACE_EMPTY, SPACE_VIEW3D, SPACE_IPO, - SPACE_OOPS, + SPACE_OUTLINER, SPACE_BUTS, SPACE_FILE, SPACE_IMAGE, |