fix own error [#26522] Api autocomplete return many errors

collections were getting __call__ attribute from the StructRNA, now ignore all starting with '_'
This commit is contained in:
2011-03-16 21:58:45 +00:00
parent 4f5e20aeb4
commit dc5a78ac25

View File

@@ -3144,7 +3144,7 @@ static PyObject *pyrna_prop_collection_getattro(BPy_PropertyRNA *self, PyObject
PyObject *ret= PyObject_GenericGetAttr((PyObject *)self, pyname);
if(ret == NULL) {
if(ret == NULL && name[0] != '_') { /* avoid inheriting __call__ and similar */
/* since this is least common case, handle it last */
PointerRNA r_ptr;
if(RNA_property_collection_type_get(&self->ptr, self->prop, &r_ptr)) {