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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-06-22 19:04:04 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-06-22 19:04:04 +0300
commitfb1f7fad78e4a0a1220c7472e1332043b2ee0f85 (patch)
treee703d27283d12a43fda848369211780b81aafb25 /source
parent897e97f078e64e5ee5fbbd929fd1e46240371ef4 (diff)
Cleanup: use proper RNA struct type for ListBase type
(otherwise all code using RNA has to link DNA_listbase.h, not clean at all!).
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/RNA_types.h5
-rw-r--r--source/blender/makesrna/intern/makesrna.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index d8bea93bcbc..1d5f46a1814 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -285,6 +285,11 @@ typedef struct CollectionPointerLink {
PointerRNA ptr;
} CollectionPointerLink;
+/* Copy of ListBase for RNA... */
+typedef struct CollectionListBase {
+ struct CollectionPointerLink *first, *last;
+} CollectionListBase;
+
typedef enum RawPropertyType {
PROP_RAW_UNSET = -1,
PROP_RAW_INT, // XXX - abused for types that are not set, eg. MFace.verts, needs fixing.
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 535847cfc78..8d3c6cb19cf 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -466,7 +466,7 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
}
case PROP_COLLECTION:
{
- return "ListBase";
+ return "CollectionListBase";
}
default:
return "<error, no type specified>";
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 49b806347d6..1c6471c2cca 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -5220,7 +5220,7 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat
}
case PROP_COLLECTION:
{
- ListBase *lb = (ListBase *)data;
+ CollectionListBase *lb = (CollectionListBase *)data;
CollectionPointerLink *link;
ret = PyList_New(0);