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/blenloader | |
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/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index caf58ba3f86..5e12fc969ab 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2210,6 +2210,7 @@ static void direct_link_id(FileData *fd, ID *id) /* this case means the data was written incorrectly, it should not happen */ IDP_DirectLinkGroup_OrFree(&id->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); } + id->py_instance = NULL; } /* ************ READ CurveMapping *************** */ |