diff options
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 3 | ||||
-rw-r--r-- | source/blender/python/generic/idprop_py_api.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 63b8d90b510..cd2b1fb148e 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -134,7 +134,8 @@ static Py_hash_t BPy_IDGroup_hash(BPy_IDProperty *self) static PyObject *BPy_IDGroup_repr(BPy_IDProperty *self) { - return PyUnicode_FromFormat("<bpy id property from \"%s\">", self->id->name); + return PyUnicode_FromFormat("<bpy id prop: owner=\"%s\", name=\"%s\", address=%p>", + self->id ? self->id->name : "<NONE>", self->prop->name, self->prop); } PyObject *BPy_IDGroup_WrapData(ID *id, IDProperty *prop, IDProperty *parent) diff --git a/source/blender/python/generic/idprop_py_api.h b/source/blender/python/generic/idprop_py_api.h index f053f212a23..35b130d005e 100644 --- a/source/blender/python/generic/idprop_py_api.h +++ b/source/blender/python/generic/idprop_py_api.h @@ -34,7 +34,7 @@ struct BPy_IDGroup_Iter; typedef struct BPy_IDProperty { PyObject_VAR_HEAD - struct ID *id; + struct ID *id; /* can be NULL */ struct IDProperty *prop; /* must be second member */ struct IDProperty *parent; PyObject *data_wrap; @@ -42,7 +42,7 @@ typedef struct BPy_IDProperty { typedef struct BPy_IDArray { PyObject_VAR_HEAD - struct ID *id; + struct ID *id; /* can be NULL */ struct IDProperty *prop; /* must be second member */ } BPy_IDArray; |