2.5: Remove OOPS code from the outliner space, as discussed
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 26 Mar 2009 14:05:33 +0000 (14:05 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 26 Mar 2009 14:05:33 +0000 (14:05 +0000)
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.

17 files changed:
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/object.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/keyframing.c
source/blender/editors/interface/resources.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_outliner/outliner_header.c
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/makesdna/DNA_outliner_types.h [moved from source/blender/makesdna/DNA_oops_types.h with 70% similarity]
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_space.c
source/blender/python/intern/bpy_ui.c
source/blender/python/simple_enum_gen.py

index 0f48133efc73e889753bcaf30ac7ade29a10f623..917fb7d1de4712944e51dc1d3e2c3c4286ffe500 100644 (file)
@@ -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"
index 249f67367f418726ff0348164cc6be89b58fde75..5e0c574014384abd7a7f150ed0c180de9d43c640 100644 (file)
@@ -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;
                                }
                        }
 
index 046618a1f6d22d53967010d1ff321d1f3e3104d3..b0b3e9daf2b2e9d8309ae52fab97a445f79d2a7e 100644 (file)
@@ -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)
index 2aa87883fdbfd280b1b365105bc8f06780aecf11..1c9c5cad19f17859b5b9b06809c3c1ad676b72df 100644 (file)
@@ -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);
index b031a54495378c770f8842f272866364f545e9f3..d5e349fb7b3ecdcbf82912f830210effb5c60331 100644 (file)
@@ -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;
        }
        
index c1beb4b1c58c1aacd89957d55b60309b49967aac..039ebcc91f96c3955fcb8da9889772f533ad8c0d 100644 (file)
@@ -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:
index 076f871c4c27ff2324f85308482a1b0edd428136..ff0a89b9e1c2068968c99c064d2a7301d642c773 100644 (file)
@@ -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)
index 389878f7b6cf3f108a0a5d5445f097da5880da5e..54652587c53b3d4cf56f726651934088f90b83f3 100644 (file)
@@ -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;
 }
index b42f6ec16ff9a36880438804651219c3e5603213..ecff2d8a417cfc3dadf90ef1c593378b9cc7c635 100644 (file)
@@ -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));
index 8ed4c9ed9869e3df9261058bbb02c9a9e38a0bdf..920ccb62a7a66c8ba5522f680dd8a437651f61c2 100644 (file)
@@ -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);
        
index b8187309c0d63dc87fe0a4a2c406664fe216361b..4add1e889860cea11086b31d5007a50b04c10442 100644 (file)
@@ -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;
similarity index 70%
rename from source/blender/makesdna/DNA_oops_types.h
rename to source/blender/makesdna/DNA_outliner_types.h
index 0a6b1a45b1182143640eebb60454c4bdeae6c48d..b19db15d73b618eb6382dc59655974df8f2eaff5 100644 (file)
@@ -1,6 +1,4 @@
 /**
- * blenlib/DNA_oops_types.h (mar-2001 nzc)
- *     
  * $Id$ 
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * ***** 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
index d4dffddcdccaafce140b98b213027942e736449b..8a26a216e79845f8f696f4c42f9d81bbd412ec69 100644 (file)
@@ -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,            
index 17547c4eb1db6f4006738cf96db1e0ebd70851f3..bf2f0f3900e2d04a35ee4e069e6defd5846fae31 100644 (file)
@@ -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"
index 1d281c7d6a24e7023a84fc2fd5bc9166ff283529..5184e904927ca0102c7e68f8396c11b931229a19 100644 (file)
@@ -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", ""},
index ca61c0b425b174998c78416124a33f842632104d..a6fa5b27aaf62e941f2a7db22176d7565e0d360e 100644 (file)
@@ -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) );
index ad9dc3053d8af7c6c3b86e1c38ea6f95252b6d01..59f048c28425a589c3dd7267f52af25865b0f019 100644 (file)
@@ -22,7 +22,7 @@ defs = """
        SPACE_EMPTY,
        SPACE_VIEW3D,
        SPACE_IPO,
-       SPACE_OOPS,
+       SPACE_OUTLINER,
        SPACE_BUTS,
        SPACE_FILE,
        SPACE_IMAGE,