From 2e01f38885906bc14cb5a50cfe474aa562929ef3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 20 Jan 2014 18:13:15 +1100 Subject: Python API: fix for help() failing on bpy instances Caused by missing __name__ from bpy.types (alternate method to patch D232) --- source/blender/python/intern/bpy_rna.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 86ed459eb1f..16cedccf775 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6653,6 +6653,11 @@ PyObject *BPY_rna_types(void) return NULL; } + /* static members for the base class */ + /* add __name__ since help() expects its */ + PyDict_SetItem(pyrna_basetype_Type.tp_dict, bpy_intern_str___name__, bpy_intern_str_bpy_types); + + self = (BPy_BaseTypeRNA *)PyObject_NEW(BPy_BaseTypeRNA, &pyrna_basetype_Type); /* avoid doing this lookup for every getattr */ -- cgit v1.2.3