Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-17 15:54:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-17 15:54:29 +0300
commitf7682e2e0f5401a5cd2f394ed17fd29613b5381f (patch)
tree342e707f0afe9d8a88ed8d55c4cb6943f59e0046 /source/blender/python
parent51f2dcd08ccde78223449383b98b9f7e35062b24 (diff)
- in pose mode, pose bone properties are edited rather then armature bone
- new id property array method convert_to_pyobject() - editing an array in the UI broke - fixed for own error when updating ID prop api
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/generic/IDProp.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/python/generic/IDProp.c b/source/blender/python/generic/IDProp.c
index 68d3e3879e5..6d71332b9ec 100644
--- a/source/blender/python/generic/IDProp.c
+++ b/source/blender/python/generic/IDProp.c
@@ -346,7 +346,7 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
static int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject *val)
{
- BPy_Wrap_SetMapItem(self->prop, key, val);
+ return BPy_Wrap_SetMapItem(self->prop, key, val);
}
static PyObject *BPy_IDGroup_SpawnIterator(BPy_IDProperty *self)
@@ -478,7 +478,7 @@ static PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self)
}
/* utility function */
-static BPy_IDGroup_CorrectListLen(IDProperty *prop, PyObject *seq, int len)
+static void BPy_IDGroup_CorrectListLen(IDProperty *prop, PyObject *seq, int len)
{
int i, j;
@@ -753,6 +753,17 @@ static PyGetSetDef BPy_IDArray_getseters[] = {
{NULL, NULL, NULL, NULL, NULL},
};
+static PyObject *BPy_IDArray_ConvertToPy(BPy_IDArray *self)
+{
+ return BPy_IDGroup_MapDataToPy(self->prop);
+}
+
+static PyMethodDef BPy_IDArray_methods[] = {
+ {"convert_to_pyobject", (PyCFunction)BPy_IDArray_ConvertToPy, METH_NOARGS,
+ "return a purely python version of the group."},
+ {0, NULL, 0, NULL}
+};
+
static int BPy_IDArray_Len(BPy_IDArray *self)
{
return self->prop->len;
@@ -893,7 +904,7 @@ PyTypeObject IDArray_Type = {
NULL, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
- NULL, /* struct PyMethodDef *tp_methods; */
+ BPy_IDArray_methods, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
BPy_IDArray_getseters, /* struct PyGetSetDef *tp_getset; */
NULL, /* struct _typeobject *tp_base; */