DNA/RNA: add 'py_instance' for ID types
authorCampbell Barton <ideasman42@gmail.com>
Mon, 11 Dec 2017 07:37:54 +0000 (18:37 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 11 Dec 2017 07:37:54 +0000 (18:37 +1100)
commitdd4e0cd3e30a88657981064c3f8fcd81612d9394
tree341da6965d0831bca04de682ca64369c1e707590
parentc5689851186392407eab3ce3801db3270ce84cb6
DNA/RNA: add 'py_instance' for ID types

Avoid creating new Python instances
every time a scene, object, mesh .. etc are accessed.

Also resolves crashes T28724, T53530
although it's only valid for ID types, not modifiers vertices etc.

Back-ported from blender2.8 branch.
source/blender/blenkernel/intern/library_remap.c
source/blender/blenloader/intern/readfile.c
source/blender/makesdna/DNA_ID.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_internal.h
source/blender/python/intern/bpy_rna.c