diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-20 11:13:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-20 11:13:15 +0400 |
commit | 2e01f38885906bc14cb5a50cfe474aa562929ef3 (patch) | |
tree | 4a1310aa9611adb9852e35439f82decf0f2012bb | |
parent | a696a0ff1e9c55c21696c18a6cf6e5b1b2a40e37 (diff) |
Python API: fix for help() failing on bpy instances
Caused by missing __name__ from bpy.types (alternate method to patch D232)
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 */ |