Cleanup: use proper RNA struct type for ListBase type

(otherwise all code using RNA has to link DNA_listbase.h, not clean at all!).
This commit is contained in:
Bastien Montagne 2016-06-22 18:04:04 +02:00
parent 897e97f078
commit fb1f7fad78
3 changed files with 7 additions and 2 deletions

View File

@ -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.

View File

@ -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>";

View File

@ -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);