diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-12-11 10:37:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-12-11 10:37:54 +0300 |
commit | dd4e0cd3e30a88657981064c3f8fcd81612d9394 (patch) | |
tree | 341da6965d0831bca04de682ca64369c1e707590 /source/blender/makesrna/intern/rna_internal.h | |
parent | c5689851186392407eab3ce3801db3270ce84cb6 (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal.h')
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 01c3c8033cf..2d513bd60b4 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -217,6 +217,7 @@ void rna_ID_name_set(struct PointerRNA *ptr, const char *value); struct StructRNA *rna_ID_refine(struct PointerRNA *ptr); struct IDProperty *rna_ID_idprops(struct PointerRNA *ptr, bool create); void rna_ID_fake_user_set(struct PointerRNA *ptr, int value); +void **rna_ID_instance(PointerRNA *ptr); struct IDProperty *rna_PropertyGroup_idprops(struct PointerRNA *ptr, bool create); void rna_PropertyGroup_unregister(struct Main *bmain, struct StructRNA *type); struct StructRNA *rna_PropertyGroup_register(struct Main *bmain, struct ReportList *reports, void *data, |