Blender Git Commit Log

Git Commits -> Revision 3ed5c9a

Revision 3ed5c9a by Campbell Barton (master)
July 26, 2017, 13:49 (GMT)
PyAPI: Store PyInstances for ID's

This means once an ID is created,
it will keep using the same PyObject instance.

This has some advantages:
- Avoids unnecessary re-creation of instances on UI poll / redraw.
- Accessing free'd ID's gives an exception instead of crashing.
(long standing annoyance!, though this only applies to ID's
and not yet other data that uses the ID's - vertices for eg).
- Allows using instance comparison (a little faster).

Note that the instances won't be kept between undo.

Commit Details:

Full Hash: 3ed5c9a610b348841f1e48736f02d73976f034d4
Parent Commit: 40a45e3
Lines Changed: +22, -7

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2020