Merged changes in the trunk up to revision 31987.
This commit is contained in:
@@ -170,15 +170,7 @@ void BPY_start_python_path(void)
|
||||
/* 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);
|
||||
BLI_setenv("PYTHONPATH", py_path_bundle);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,9 +45,6 @@ static void operator_properties_init(wmOperatorType *ot)
|
||||
PyErr_Print(); /* failed to register operator props */
|
||||
PyErr_Clear();
|
||||
}
|
||||
|
||||
// see bpy_types.py:Operator, May redo this some other way!
|
||||
PyObject_CallMethod(py_class, "easy_getsets", NULL);
|
||||
}
|
||||
|
||||
void operator_wrapper(wmOperatorType *ot, void *userdata)
|
||||
|
||||
@@ -5121,13 +5121,17 @@ static int bpy_class_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *par
|
||||
err= -1;
|
||||
}
|
||||
else {
|
||||
if(ret_len==1) {
|
||||
if(ret_len==0 && ret != Py_None) {
|
||||
PyErr_Format(PyExc_RuntimeError, "expected class %.200s, function %.200s to return None, got a %.200s type instead.", RNA_struct_identifier(ptr->type), RNA_function_identifier(func), Py_TYPE(ret)->tp_name);
|
||||
err= -1;
|
||||
}
|
||||
else if(ret_len==1) {
|
||||
err= pyrna_py_to_prop(&funcptr, pret_single, parms, retdata_single, ret, "calling class function:");
|
||||
}
|
||||
else if (ret_len > 1) {
|
||||
|
||||
if(PyTuple_Check(ret)==0) {
|
||||
PyErr_Format(PyExc_RuntimeError, "expected class %.200s, function %.200s to return a tuple of size %d.", RNA_struct_identifier(ptr->type), RNA_function_identifier(func), ret_len);
|
||||
PyErr_Format(PyExc_RuntimeError, "expected class %.200s, function %.200s to return a tuple of size %d, got a %.200s type instead.", RNA_struct_identifier(ptr->type), RNA_function_identifier(func), ret_len, Py_TYPE(ret)->tp_name);
|
||||
err= -1;
|
||||
}
|
||||
else if (PyTuple_GET_SIZE(ret) != ret_len) {
|
||||
|
||||
Reference in New Issue
Block a user