Cleanup work for 2.5 branch. Target is to get it compile and link
authorTon Roosendaal <ton@blender.org>
Sat, 29 Dec 2007 14:31:26 +0000 (14:31 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 29 Dec 2007 14:31:26 +0000 (14:31 +0000)
still!

source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/script.c
source/blender/blenlib/intern/fileops.c
source/blender/editors/screen/Makefile [new file with mode: 0644]
source/blender/editors/screen/stubs.c [new file with mode: 0644]
source/gameengine/BlenderRoutines/Makefile
source/gameengine/Converter/Makefile
source/gameengine/Ketsji/Makefile
source/nan_compile.mk

index f09c1103922dc3052c5b90253b408f7c4eaa8ca1..0935a7161b0f4aa7ddbf9d2e43ce388815e89503 100644 (file)
@@ -83,7 +83,6 @@
 #include "BLO_readfile.h" 
 #include "BLO_writefile.h" 
 
-#include "BKE_bad_level_calls.h" // for freeAllRad editNurb free_editMesh free_editText free_editArmature
 #include "BKE_utildefines.h" // O_BINARY FALSE
 #include "BIF_mainqueue.h" // mainqenter for onload script
 #include "mydevice.h"
@@ -238,21 +237,19 @@ void initglobals(void)
 
 static void clear_global(void) 
 {
-       extern short winqueue_break;    /* screen.c */
+//     extern short winqueue_break;    /* screen.c */
 
-       freeAllRad();
+// XXX freeAllRad();
        fastshade_free_render();        /* lamps hang otherwise */
        free_main(G.main);                      /* free all lib data */
-
-       /* force all queues to be left */
-       winqueue_break= 1;
        
        if (G.obedit) {
-               freeNurblist(&editNurb);
-               free_editMesh(G.editMesh);
-               free_editText();
-               free_editArmature();
+//             freeNurblist(&editNurb);
+//             free_editMesh(G.editMesh);
+//             free_editText();
+//             free_editArmature();
        }
+//     free_vertexpaint();
 
        G.curscreen= NULL;
        G.scene= NULL;
@@ -267,8 +264,6 @@ static void clear_global(void)
        G.sima= NULL;
        G.sipo= NULL;
        
-       free_vertexpaint();
-       
        G.f &= ~(G_WEIGHTPAINT + G_VERTEXPAINT + G_FACESELECT + G_PARTICLEEDIT);
 }
 
@@ -452,9 +447,6 @@ int BKE_read_file(bContext *C, char *dir, void *unused)
        BlendFileData *bfd;
        int retval= 1;
        
-       if (!G.background)
-               waitcursor(1);
-               
        bfd= BLO_read_from_file(dir, &bre);
        if (bfd) {
                if(bfd->user) retval= 2;
@@ -466,10 +458,7 @@ int BKE_read_file(bContext *C, char *dir, void *unused)
        else {
                error("Loading %s failed: %s", dir, BLO_bre_as_string(bre));
        }
-       
-       if (!G.background)
-               waitcursor(0);
-       
+               
        return (bfd?retval:0);
 }
 
@@ -477,20 +466,14 @@ int BKE_read_file_from_memory(bContext *C, char* filebuf, int filelength, void *
 {
        BlendReadError bre;
        BlendFileData *bfd;
-       
-       if (!G.background)
-               waitcursor(1);
-               
+                       
        bfd= BLO_read_from_memory(filebuf, filelength, &bre);
        if (bfd) {              
                setup_app_data(C, bfd, "<memory>");
        } else {
                error("Loading failed: %s", BLO_bre_as_string(bre));
        }
-       
-       if (!G.background)
-               waitcursor(0);
-       
+               
        return (bfd?1:0);
 }
 
@@ -500,19 +483,13 @@ int BKE_read_file_from_memfile(bContext *C, MemFile *memfile)
        BlendReadError bre;
        BlendFileData *bfd;
        
-       if (!G.background)
-               waitcursor(1);
-               
        bfd= BLO_read_from_memfile(G.sce, memfile, &bre);
        if (bfd) {
                setup_app_data(C, bfd, "<memory>");
        } else {
                error("Loading failed: %s", BLO_bre_as_string(bre));
        }
-       
-       if (!G.background)
-               waitcursor(0);
-       
+               
        return (bfd?1:0);
 }
 
index 0f1f8c6078aac60bd1ec3c8f8cdc3401f02912b6..3b6aa3bc1ebfa955ede02be7f505e8a2bd67b976 100644 (file)
@@ -2255,7 +2255,7 @@ static void displist_to_objects(ListBase *lbase)
        /* irst this: is still active */
        if(ivsurf) {
                where_is_object(ivsurf);
-               docenter_new();
+// XXX         docenter_new();
        }
 
        dl= lbase->first;
index f368a30afb3ff969df5699eed47c4ad623893324..7dab2e519932ce5b10e5faa6b4c3f26a81daf5ef 100644 (file)
@@ -193,7 +193,7 @@ bSensor *new_sensor(int type)
        init_sensor(sens);
        
        strcpy(sens->name, "sensor");
-       make_unique_prop_names(sens->name);
+// XXX make_unique_prop_names(sens->name);
        
        return sens;
 }
index b99c2c514410289976edc2b142a7a6eaa2fb90f6..fda5cf892984b55972cda7bb5aefbfc6dca7cbfc 100644 (file)
@@ -38,9 +38,8 @@
 #include "BPI_script.h"
 
 #include "MEM_guardedalloc.h"
-#include "BKE_bad_level_calls.h" /* for BPY_clear_script */
 
-/*
+
 #include "BLI_blenlib.h"
 #include "BKE_utildefines.h"
 #include "BKE_library.h"
 
 #include "BPY_extern.h" // Blender Python library
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-*/
-
 /* XXX this function and so also the file should not be needed anymore,
  * since we have to force clearing all Python related data before freeing
  * Blender's library. Still testing, will decide later (Willian). */
index fcea30982bd9e5fc271d945d9e38171b06f25543..94ed64d00d2b9e65e283b2dde4f9d064f580c197 100644 (file)
@@ -1,21 +1,12 @@
 /*
- * blenlib/fileops.h 
- *
- * cleaned up (a bit) mar-01 nzc
- *
- * More low-level file things.
- *
  * $Id$
  *
- * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+ * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License.  See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version. 
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  *
  * Contributor(s): none yet.
  *
- * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ * ***** END GPL LICENSE BLOCK *****
  */
 
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
diff --git a/source/blender/editors/screen/Makefile b/source/blender/editors/screen/Makefile
new file mode 100644 (file)
index 0000000..302267b
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. 
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2007 Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL LICENSE BLOCK *****
+#
+# Makes module object directory and bounces make to subdirectories.
+
+LIBNAME = editors_datafiles
+DIR = $(OCGDIR)/blender/$(LIBNAME)
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+
+CPPFLAGS += -I$(OPENGL_HEADERS)
+
+# not very neat....
+CPPFLAGS += -I../../../blenkernel
+CPPFLAGS += -I../../../blenlib
+CPPFLAGS += -I../../../makesdna
+CPPFLAGS += -I../../../imbuf
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+
+# own include 
+
+CPPFLAGS += -I../include 
diff --git a/source/blender/editors/screen/stubs.c b/source/blender/editors/screen/stubs.c
new file mode 100644 (file)
index 0000000..c9725e6
--- /dev/null
@@ -0,0 +1,45 @@
+/**
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+
+void blender_test_break() {}
+void do_render_seq() {}
+void allqueue() {}
+void error() {}
+
+void *curarea;
+
+/* blenkernel errors */
+void copy_view3d_lock() {}
+void PE_recalc_world_cos() {}
+
+void BPY_clear_script() {}
+
+
+
index f0097e40807e103c403eea8cd8fccce25b34df34..036621fca74781ca07f0ae4a0415051311aa5604 100644 (file)
@@ -48,7 +48,7 @@ CPPFLAGS += -I$(NAN_FUZZICS)/include
 CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
 # because of kernel dependency on makesdna
 CPPFLAGS += -I../../blender/makesdna
-CPPFLAGS += -I../../blender/include
+CPPFLAGS += -I../../blender/editors/include
 # because of kernel dependency on imbuf
 CPPFLAGS += -I../../blender/imbuf
 CPPFLAGS += -I../../blender/blenlib
index 4ba34952d40f1299b2b433033dd5803fc7a8541d..f4604f19dcb32d074b0fda55a8e7429e76f56d95 100644 (file)
@@ -50,7 +50,7 @@ CPPFLAGS += -I../../blender
 # these two needed because of blenkernel
 CPPFLAGS += -I../../blender/imbuf
 CPPFLAGS += -I../../blender/makesdna
-CPPFLAGS += -I../../blender/include
+CPPFLAGS += -I../../blender/editors/include
 CPPFLAGS += -I../../blender/blenlib
 CPPFLAGS += -I../../blender/blenkernel
 CPPFLAGS += -I../../blender/render/extern/include
index f7813c80a59c23188b60b0060ed47df7f8ad6463..29f4fee847bdc56c10b693e345d778cd7024bdbc 100644 (file)
@@ -60,7 +60,7 @@ CPPFLAGS += -I.
 CPPFLAGS += -I../Converter
 CPPFLAGS += -I../../blender/blenkernel
 CPPFLAGS += -I../../blender/blenlib
-CPPFLAGS += -I../../blender/include
+CPPFLAGS += -I../../blender/editors/include
 CPPFLAGS += -I../../blender/makesdna
 CPPFLAGS += -I../../blender/imbuf
 CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
index a5f0dccce3557b0af1355f6e53dbf6d68b8616e9..5946a1d4f0684dac6ef157a8d6e9317647a443f3 100644 (file)
@@ -87,8 +87,8 @@ ifeq ($(OS),darwin)
         CFLAGS += -pipe -fPIC -ffast-math -march=pentium-m -funsigned-char -fno-strict-aliasing
         CCFLAGS        += -pipe -fPIC  -funsigned-char -fno-strict-aliasing
        endif
-    REL_CFLAGS += -O2
-    REL_CCFLAGS        += -O2
+#    REL_CFLAGS        += -O2
+#    REL_CCFLAGS       += -O2
     CPPFLAGS   += -D_THREAD_SAFE
     NAN_DEPEND = true
     OPENGL_HEADERS = /System/Library/Frameworks/OpenGL.framework