de-duplicate some idproperty py api code, also improve some exception messages.

This commit is contained in:
2011-11-15 10:19:44 +00:00
parent 995ca539d0
commit 4de917326b
3 changed files with 227 additions and 193 deletions

View File

@@ -2782,7 +2782,7 @@ static PyObject *pyrna_struct_subscript(BPy_StructRNA *self, PyObject *key)
return NULL;
}
return BPy_IDGroup_WrapData(self->ptr.id.data, idprop);
return BPy_IDGroup_WrapData(self->ptr.id.data, idprop, group);
}
static int pyrna_struct_ass_subscript(BPy_StructRNA *self, PyObject *key, PyObject *value)
@@ -3892,7 +3892,7 @@ static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args)
idprop= IDP_GetPropertyFromGroup(group, key);
if (idprop) {
return BPy_IDGroup_WrapData(self->ptr.id.data, idprop);
return BPy_IDGroup_WrapData(self->ptr.id.data, idprop, group);
}
}