diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-08 14:07:59 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-08 14:15:12 +0300 |
commit | 73dc8c24e44ba8b462f88c1c629a84c98979ef41 (patch) | |
tree | 4b3cb93544a04a319ac79b8bf91e94cb76c201af /source/blender/python/intern/bpy_intern_string.h | |
parent | f76f48be23e04dbbbe313e428636cfcbcf2be59c (diff) |
PyAPI: optimize depsgraph use in PyDrivers
Avoid re-creating & freeing the depsgraph for every driver evaluation.
Now the depsgraph is kept in the name-space (matching self),
only re-created when the value changes.
In a contrived test-case with many drivers this gave ~15% overall
speedup for animation playback.
Diffstat (limited to 'source/blender/python/intern/bpy_intern_string.h')
-rw-r--r-- | source/blender/python/intern/bpy_intern_string.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_intern_string.h b/source/blender/python/intern/bpy_intern_string.h index 1d74e8c31c5..cc8bf8a6f3b 100644 --- a/source/blender/python/intern/bpy_intern_string.h +++ b/source/blender/python/intern/bpy_intern_string.h @@ -28,6 +28,7 @@ extern PyObject *bpy_intern_str_frame; extern PyObject *bpy_intern_str_properties; extern PyObject *bpy_intern_str_register; extern PyObject *bpy_intern_str_self; +extern PyObject *bpy_intern_str_depsgraph; extern PyObject *bpy_intern_str_unregister; #ifdef __cplusplus |