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/makesdna | |
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/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 923df70dd4d..564aa994df1 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -131,6 +131,10 @@ typedef struct ID { int us; int icon_id; IDProperty *properties; + + void *py_instance; + + void *pad1; } ID; /** |