[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36999] trunk/blender/source: fix from last commit, also remove unused includes from blenders python import replacement.

Campbell Barton ideasman42 at gmail.com
Sun May 29 13:17:25 CEST 2011


Revision: 36999
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36999
Author:   campbellbarton
Date:     2011-05-29 11:17:25 +0000 (Sun, 29 May 2011)
Log Message:
-----------
fix from last commit, also remove unused includes from blenders python import replacement.

Modified Paths:
--------------
    trunk/blender/source/blender/python/generic/bpy_internal_import.c
    trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp

Modified: trunk/blender/source/blender/python/generic/bpy_internal_import.c
===================================================================
--- trunk/blender/source/blender/python/generic/bpy_internal_import.c	2011-05-29 11:05:52 UTC (rev 36998)
+++ trunk/blender/source/blender/python/generic/bpy_internal_import.c	2011-05-29 11:17:25 UTC (rev 36999)
@@ -34,9 +34,6 @@
 #include <Python.h>
 #include <stddef.h>
 
-#include "compile.h"	/* for the PyCodeObject */
-#include "eval.h"		/* for PyEval_EvalCode */
-
 #include "bpy_internal_import.h"
 
 #include "MEM_guardedalloc.h"
@@ -51,7 +48,6 @@
  /* UNUSED */	
 #include "BKE_text.h" /* txt_to_buf */	
 #include "BKE_main.h"
-#include "BKE_global.h" /* grr, only for G.main->name */
 
 static Main *bpy_import_main= NULL;
 
@@ -97,7 +93,7 @@
 /* returns a dummy filename for a textblock so we can tell what file a text block comes from */
 void bpy_text_filename_get(char *fn, size_t fn_len, Text *text)
 {
-	BLI_snprintf(fn, fn_len, "%s%c%s", text->id.lib ? text->id.lib->filepath : G.main->name, SEP, text->id.name+2);
+	BLI_snprintf(fn, fn_len, "%s%c%s", text->id.lib ? text->id.lib->filepath : bpy_import_main->name, SEP, text->id.name+2);
 }
 
 PyObject *bpy_text_import(Text *text)

Modified: trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp	2011-05-29 11:05:52 UTC (rev 36998)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp	2011-05-29 11:17:25 UTC (rev 36999)
@@ -357,7 +357,7 @@
 	
 	m_function_argc = 0; /* rare cases this could be a function that isnt defined in python, assume zero args */
 	if (PyFunction_Check(m_function)) {
-		m_function_argc ((PyCodeObject *)PyFunction_GET_CODE(m_function))->co_argcount;
+		m_function_argc= ((PyCodeObject *)PyFunction_GET_CODE(m_function))->co_argcount;
 	}
 	
 	if(m_function_argc > 1) {




More information about the Bf-blender-cvs mailing list