Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-08 14:07:59 +0300
committerCampbell Barton <campbell@blender.org>2022-03-08 14:15:12 +0300
commit73dc8c24e44ba8b462f88c1c629a84c98979ef41 (patch)
tree4b3cb93544a04a319ac79b8bf91e94cb76c201af /source/blender/python/intern/bpy_intern_string.h
parentf76f48be23e04dbbbe313e428636cfcbcf2be59c (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.h1
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