bpy's __rna__ attribute doesnt work as it should, since the parent classes __rna__...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 22 Aug 2009 17:06:10 +0000 (17:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 22 Aug 2009 17:06:10 +0000 (17:06 +0000)
commit215f80361cfeb294aed9e93cb6899d18c28d8bbf
treeb4395a2a2354fc8940d931fd77ad84557db53161
parent98e9ddbf5b2b9dcf8a6a2440126f928d4394a5f4
bpy's __rna__ attribute doesnt work as it should, since the parent classes __rna__ overrides the subtypes.

For now have pyrna_struct_as_srna look in the dict first for __rna__ before using PyDict_GetItemString.
Somehow __rna__ is not calling the pyrna_struct_getattro function, python find it first.

The only relyable way to get the rna from python currently is.
bpy.types.SomeType.__dict__['__rna__']
source/blender/python/intern/bpy_rna.c