Merged changes in the trunk up to revision 33894.
A note for branch users: CMake 2.8 on 64-bit Windows Vista raised
an error in line 948 of soc-2008-mxcurioni/CMakeLists.txt due to
an invalid argument for the blender_include_dirs macro:
blender_include_dirs(${OPENGL_INCLUDE_DIR})
The command above should be:
blender_include_dirs("${OPENGL_INCLUDE_DIR}")
This commit is contained in:
@@ -67,4 +67,4 @@ if(WITH_BUILDINFO)
|
||||
add_definitions(-DBUILD_DATE)
|
||||
endif()
|
||||
|
||||
blenderlib(bf_python "${SRC}" "${INC}")
|
||||
blender_add_lib(bf_python "${SRC}" "${INC}")
|
||||
|
||||
@@ -252,11 +252,24 @@ void BPY_start_python( int argc, char **argv )
|
||||
|
||||
{ /* our own import and reload functions */
|
||||
PyObject *item;
|
||||
PyObject *mod;
|
||||
//PyObject *m = PyImport_AddModule("__builtin__");
|
||||
//PyObject *d = PyModule_GetDict(m);
|
||||
PyObject *d = PyEval_GetBuiltins( );
|
||||
PyDict_SetItemString(d, "reload", item=PyCFunction_New(&bpy_reload_meth, NULL)); Py_DECREF(item);
|
||||
// PyDict_SetItemString(d, "reload", item=PyCFunction_New(&bpy_reload_meth, NULL)); Py_DECREF(item);
|
||||
PyDict_SetItemString(d, "__import__", item=PyCFunction_New(&bpy_import_meth, NULL)); Py_DECREF(item);
|
||||
|
||||
/* move reload here
|
||||
* XXX, use import hooks */
|
||||
mod= PyImport_ImportModuleLevel((char *)"imp", NULL, NULL, NULL, 0);
|
||||
if(mod) {
|
||||
PyDict_SetItemString(PyModule_GetDict(mod), "reload", item=PyCFunction_New(&bpy_reload_meth, NULL)); Py_DECREF(item);
|
||||
Py_DECREF(mod);
|
||||
}
|
||||
else {
|
||||
BKE_assert(!"unable to load 'imp' module.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pyrna_alloc_types();
|
||||
|
||||
Reference in New Issue
Block a user