Merged changes in the trunk up to revision 46787.

Conflicts resolved:
source/blender/blenkernel/intern/idcode.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/UI_resources.h
source/blender/makesrna/intern/rna_main.c
This commit is contained in:
Tamito Kajiyama
2012-05-19 08:40:56 +00:00
1103 changed files with 77192 additions and 35047 deletions

View File

@@ -223,6 +223,7 @@ void BPY_python_start(int argc, const char **argv)
{
#ifndef WITH_PYTHON_MODULE
PyThreadState *py_tstate = NULL;
const char *py_path_bundle = BLI_get_folder(BLENDER_SYSTEM_PYTHON, NULL);
/* not essential but nice to set our name */
static wchar_t program_path_wchar[FILE_MAX]; /* python holds a reference */
@@ -233,7 +234,7 @@ void BPY_python_start(int argc, const char **argv)
PyImport_ExtendInittab(bpy_internal_modules);
/* allow to use our own included python */
PyC_SetHomePath(BLI_get_folder(BLENDER_SYSTEM_PYTHON, NULL));
PyC_SetHomePath(py_path_bundle);
/* without this the sys.stdout may be set to 'ascii'
* (it is on my system at least), where printing unicode values will raise
@@ -245,7 +246,11 @@ void BPY_python_start(int argc, const char **argv)
/* Python 3.2 now looks for '2.xx/python/include/python3.2d/pyconfig.h' to
* parse from the 'sysconfig' module which is used by 'site',
* so for now disable site. alternatively we could copy the file. */
Py_NoSiteFlag = 1;
if (py_path_bundle) {
Py_NoSiteFlag = 1;
}
Py_FrozenFlag = 1;
Py_Initialize();

View File

@@ -176,13 +176,13 @@ static GHash *id_weakref_pool_get(ID *id)
}
else {
/* first time, allocate pool */
id_weakref_pool = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "rna_global_pool");
id_weakref_pool = BLI_ghash_ptr_new("rna_global_pool");
weakinfo_hash = NULL;
}
if (weakinfo_hash == NULL) {
/* we're using a ghash as a set, could use libHX's HXMAP_SINGULAR but would be an extra dep. */
weakinfo_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "rna_id");
weakinfo_hash = BLI_ghash_ptr_new("rna_id");
BLI_ghash_insert(id_weakref_pool, (void *)id, weakinfo_hash);
}
@@ -986,7 +986,7 @@ static PyObject *pyrna_prop_repr(BPy_PropertyRNA *self)
ret = PyUnicode_FromFormat("bpy.data.%s[%R].%s",
BKE_idcode_to_name_plural(GS(id->name)),
tmp_str,
path);
path);
}
MEM_freeN((void *)path);

View File

@@ -107,7 +107,7 @@ PyObject *pyrna_callback_add(BPy_StructRNA *self, PyObject *args)
Py_INCREF(args);
}
else {
PyErr_SetString(PyExc_TypeError, "callback_add(): type does not suppport callbacks");
PyErr_SetString(PyExc_TypeError, "callback_add(): type does not support callbacks");
return NULL;
}