Merged changes in the trunk up to revision 26083.

This commit is contained in:
2010-01-18 20:01:58 +00:00
265 changed files with 6079 additions and 2044 deletions

View File

@@ -302,9 +302,20 @@ void BPY_start_python_path(void)
\nThis may make python import function fail\n");
#endif
#if 0
BLI_setenv("PYTHONHOME", py_path_bundle);
BLI_setenv("PYTHONPATH", py_path_bundle);
#ifdef _WIN32
/* cmake/MSVC debug build crashes without this, why only
in this case is unknown.. */
{
char *envpath = getenv("PYTHONPATH");
if(envpath && envpath[0]) {
char *newenvpath = BLI_sprintfN("%s;%s", py_path_bundle, envpath);
BLI_setenv("PYTHONPATH", newenvpath);
MEM_freeN(newenvpath);
}
else
BLI_setenv("PYTHONPATH", py_path_bundle);
}
#endif
{
@@ -701,8 +712,13 @@ int BPY_button_eval(bContext *C, char *expr, double *value)
void BPY_load_user_modules(bContext *C)
{
PyGILState_STATE gilstate;
Main *bmain= CTX_data_main(C);
Text *text;
/* can happen on file load */
if(bmain==NULL)
return;
bpy_context_set(C, &gilstate);
for(text=CTX_data_main(C)->text.first; text; text= text->id.next) {