Merged changes in the trunk up to revision 25863.

This commit is contained in:
2010-01-10 15:28:24 +00:00
487 changed files with 14606 additions and 8024 deletions

View File

@@ -226,12 +226,15 @@ static void bpy_init_modules( void )
/* blender info that wont change at runtime, add into _bpy */
{
extern char bprogname[]; /* argv[0] from creator.c */
PyObject *mod_dict= PyModule_GetDict(mod);
char tmpstr[256];
PyModule_AddStringConstant(mod, "_HOME", BLI_gethome());
PyDict_SetItemString(mod_dict, "_VERSION", Py_BuildValue("(iii)", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION));
sprintf(tmpstr, "%d.%02d (sub %d)", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION);
PyModule_AddStringConstant(mod, "_VERSION_STR", tmpstr);
PyModule_AddStringConstant(mod, "_BINPATH", bprogname);
}
/* add our own modules dir, this is a python package */