Merged changes in the trunk up to revision 54802.

This commit is contained in:
2013-02-24 03:39:20 +00:00
401 changed files with 4578 additions and 2960 deletions

View File

@@ -66,7 +66,7 @@ static PyObject *imp_reload_orig = NULL;
*
* However Python's alternative is to use import hooks,
* which are implemented in a way that we can't use our own importer as a
* fall-back (instead we must try and fail - raise an exception evert time).
* fall-back (instead we must try and fail - raise an exception every time).
* Since importing from blenders text-blocks is not the common case
* I prefer to use Pythons import by default and fall-back to
* Blenders - which we can only do by intercepting import calls I'm afraid.

View File

@@ -928,3 +928,20 @@ static void bpy_module_free(void *UNUSED(mod))
}
#endif
/* EVIL, define text.c functions here... */
extern int text_check_identifier_unicode(const unsigned int ch);
extern int text_check_identifier_nodigit_unicode(const unsigned int ch);
extern int text_check_identifier(const char ch);
extern int text_check_identifier_nodigit(const char ch);
int text_check_identifier_unicode(const unsigned int ch)
{
return (ch < 255 && text_check_identifier((char)ch)) || Py_UNICODE_ISALNUM(ch);
}
int text_check_identifier_nodigit_unicode(const unsigned int ch)
{
return (ch < 255 && text_check_identifier_nodigit((char)ch)) || Py_UNICODE_ISALPHA(ch);
}

View File

@@ -2796,12 +2796,17 @@ static PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject
}
PyDoc_STRVAR(BPy_RemoveProperty_doc,
".. function:: RemoveProperty(attr)\n"
".. function:: RemoveProperty(cls, attr="")\n"
"\n"
" Removes a dynamically defined property.\n"
"\n"
" :arg attr: Property name.\n"
" :arg cls: The class containing the property (must be a positional argument).\n"
" :type cls: type\n"
" :arg attr: Property name (must be passed as a keyword).\n"
" :type attr: string\n"
"\n"
".. note:: Typically this function doesn't need to be accessed directly.\n"
" Instead use ``del cls.attr``\n"
);
static PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw)
{
@@ -2816,7 +2821,7 @@ static PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw
return ret;
}
else if (PyTuple_GET_SIZE(args) > 1) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
PyErr_SetString(PyExc_ValueError, "expected one positional arg, one keyword arg");
return NULL;
}