[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19419] branches/blender2.5/blender/source /blender: 2.5: Remove OOPS code from the outliner space, as discussed

Brecht Van Lommel brecht at blender.org
Thu Mar 26 15:05:33 CET 2009


Revision: 19419
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19419
Author:   blendix
Date:     2009-03-26 15:05:33 +0100 (Thu, 26 Mar 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c
    branches/blender2.5/blender/source/blender/blenkernel/intern/object.c
    branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
    branches/blender2.5/blender/source/blender/blenloader/intern/writefile.c
    branches/blender2.5/blender/source/blender/editors/animation/keyframing.c
    branches/blender2.5/blender/source/blender/editors/interface/resources.c
    branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c
    branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
    branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c
    branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_ops.c
    branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c
    branches/blender2.5/blender/source/blender/makesdna/DNA_space_types.h
    branches/blender2.5/blender/source/blender/makesdna/intern/makesdna.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_space.c
    branches/blender2.5/blender/source/blender/python/intern/bpy_ui.c
    branches/blender2.5/blender/source/blender/python/simple_enum_gen.py

Added Paths:
-----------
    branches/blender2.5/blender/source/blender/makesdna/DNA_outliner_types.h

Removed Paths:
-------------
    branches/blender2.5/blender/source/blender/makesdna/DNA_oops_types.h

Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -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"

Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/object.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/object.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -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 @@
 						// 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 @@
 							if(tselem->id==(ID *)ob) tselem->id= NULL;
 						}
 					}
-					so->lockpoin= NULL;
 				}
 			}
 

Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -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 @@
 							}
 						}
 					}
-					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 @@
 						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 @@
 	ScrArea *sa;
 	ScrVert *sv;
 	ScrEdge *se;
-	Oops *oops;
 	int a;
 	
 	link_list(fd, &(sc->vertbase));
@@ -4617,16 +4602,9 @@
 				
 				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 @@
 				view3d_split_250((View3D *)sl, lb);
 				break;		
 						
-			case SPACE_OOPS:
+			case SPACE_OUTLINER:
 			{
 				SpaceOops *soops= (SpaceOops *)sl;
 				
@@ -5538,8 +5516,6 @@
 				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 @@
 						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)

Modified: branches/blender2.5/blender/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/writefile.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/writefile.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -121,7 +121,7 @@
 #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 @@
 					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);

Modified: branches/blender2.5/blender/source/blender/editors/animation/keyframing.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/keyframing.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/editors/animation/keyframing.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -1889,10 +1889,10 @@
 		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;
 	}
 	

Modified: branches/blender2.5/blender/source/blender/editors/interface/resources.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/resources.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/editors/interface/resources.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -176,7 +176,7 @@
 			case SPACE_TEXT:
 				ts= &btheme->text;
 				break;
-			case SPACE_OOPS:
+			case SPACE_OUTLINER:
 				ts= &btheme->toops;
 				break;
 			case SPACE_SOUND:

Modified: branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -134,11 +134,7 @@
 
 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)

Modified: branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -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 @@
 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;
 }

Modified: branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c	2009-03-26 13:56:32 UTC (rev 19418)
+++ branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c	2009-03-26 14:05:33 UTC (rev 19419)
@@ -88,9 +88,6 @@
 			/* using event B_FULL */
 			break;
 			break;
-		case 14: /* show outliner viewer */
-			soops->type= SO_OUTLINER;
-			break;
 		case 6:
 			//outliner_toggle_visible(curarea);
 			break;
@@ -124,24 +121,22 @@
 	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)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list