Merged changes in the trunk up to revision 51448.

Conflicts resolved:
source/blender/blenkernel/CMakeLists.txt
source/blender/blenloader/intern/readfile.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/makesrna/intern/rna_main_api.c
This commit is contained in:
2012-10-20 16:48:48 +00:00
1248 changed files with 37069 additions and 20324 deletions

View File

@@ -30,13 +30,13 @@ set(INC
../../blenlib
../../blenloader
../../editors/include
../../gpu
../../makesdna
../../makesrna
../../windowmanager
../../gpu
../../../../intern/cycles/blender
../../freestyle/intern/python
../../../../intern/guardedalloc
../../../../intern/cycles/blender
)
set(INC_SYS

View File

@@ -29,4 +29,4 @@
PyObject *BPY_app_struct(void);
#endif // __BPY_APP_H__
#endif /* __BPY_APP_H__ */

View File

@@ -29,4 +29,4 @@
PyObject *BPY_app_ffmpeg_struct(void);
#endif // __BPY_APP_FFMPEG_H__
#endif /* __BPY_APP_FFMPEG_H__ */

View File

@@ -284,7 +284,7 @@ void bpy_app_generic_callback(struct Main *UNUSED(main), struct ID *id, void *ar
if (PyList_GET_SIZE(cb_list) > 0) {
PyGILState_STATE gilstate = PyGILState_Ensure();
PyObject *args = PyTuple_New(1); // save python creating each call
PyObject *args = PyTuple_New(1); /* save python creating each call */
PyObject *func;
PyObject *ret;
Py_ssize_t pos;

View File

@@ -29,4 +29,4 @@
PyObject *BPY_app_handlers_struct(void);
#endif // __BPY_APP_HANDLERS_H__
#endif /* __BPY_APP_HANDLERS_H__ */

View File

@@ -280,7 +280,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
}
#if 0 // slow, with this can avoid all Py_CompileString above.
#if 0 /* slow, with this can avoid all Py_CompileString above. */
/* execute expression to get a value */
retval = PyRun_String(expr, Py_eval_input, bpy_pydriver_Dict, driver_vars);
#else

View File

@@ -36,4 +36,4 @@ extern PyObject *bpy_pydriver_Dict;
float BPY_driver_exec(struct ChannelDriver *driver, const float evaltime);
void BPY_driver_reset(void);
#endif // __BPY_DRIVER_H__
#endif /* __BPY_DRIVER_H__ */

View File

@@ -69,7 +69,7 @@
#include "BPY_extern.h"
#include "../generic/bpy_internal_import.h" // our own imports
#include "../generic/bpy_internal_import.h" /* our own imports */
#include "../generic/py_capi_utils.h"
/* inittab initialization functions */
@@ -180,10 +180,10 @@ void BPY_text_free_code(Text *text)
void BPY_modules_update(bContext *C)
{
#if 0 // slow, this runs all the time poll, draw etc 100's of time a sec.
#if 0 /* slow, this runs all the time poll, draw etc 100's of time a sec. */
PyObject *mod = PyImport_ImportModuleLevel("bpy", NULL, NULL, NULL, 0);
PyModule_AddObject(mod, "data", BPY_rna_module());
PyModule_AddObject(mod, "types", BPY_rna_types()); // atm this does not need updating
PyModule_AddObject(mod, "types", BPY_rna_types()); /* atm this does not need updating */
#endif
/* refreshes the main struct */
@@ -268,7 +268,7 @@ void BPY_python_start(int argc, const char **argv)
Py_Initialize();
// PySys_SetArgv(argc, argv); // broken in py3, not a huge deal
// PySys_SetArgv(argc, argv); /* broken in py3, not a huge deal */
/* sigh, why do python guys not have a (char **) version anymore? */
{
int i;

View File

@@ -28,4 +28,4 @@
void python_script_error_jump(const char *filepath, int *lineno, int *offset);
#endif // __BPY_TRACEBACK_H__
#endif /* __BPY_TRACEBACK_H__ */

View File

@@ -35,6 +35,8 @@
#include "BKE_report.h"
#include "BKE_context.h"
#include "BLF_translation.h"
#include "../generic/py_capi_utils.h"
static bContext *__py_context = NULL;
@@ -79,7 +81,7 @@ short BPy_reports_to_error(ReportList *reports, PyObject *exception, const short
short BPy_errors_to_report(ReportList *reports)
{
PyObject *pystring;
PyObject *pystring_format = NULL; // workaround, see below
PyObject *pystring_format = NULL; /* workaround, see below */
char *cstring;
const char *filename;
@@ -98,7 +100,7 @@ short BPy_errors_to_report(ReportList *reports)
pystring = PyC_ExceptionBuffer();
if (pystring == NULL) {
BKE_report(reports, RPT_ERROR, "unknown py-exception, couldn't convert");
BKE_report(reports, RPT_ERROR, "Unknown py-exception, couldn't convert");
return 0;
}
@@ -108,17 +110,18 @@ short BPy_errors_to_report(ReportList *reports)
cstring = _PyUnicode_AsString(pystring);
#if 0 // ARG!. workaround for a bug in blenders use of vsnprintf
#if 0 /* ARG!. workaround for a bug in blenders use of vsnprintf */
BKE_reportf(reports, RPT_ERROR, "%s\nlocation:%s:%d\n", cstring, filename, lineno);
#else
pystring_format = PyUnicode_FromFormat("%s\nlocation:%s:%d\n", cstring, filename, lineno);
pystring_format = PyUnicode_FromFormat(TIP_("%s\nlocation:%s:%d\n"), cstring, filename, lineno);
cstring = _PyUnicode_AsString(pystring_format);
BKE_report(reports, RPT_ERROR, cstring);
#endif
fprintf(stderr, "%s\nlocation:%s:%d\n", cstring, filename, lineno); // not exactly needed. just for testing
/* not exactly needed. just for testing */
fprintf(stderr, TIP_("%s\nlocation:%s:%d\n"), cstring, filename, lineno);
Py_DECREF(pystring);
Py_DECREF(pystring_format); // workaround
Py_DECREF(pystring_format); /* workaround */
return 1;
}