diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-06-02 17:33:35 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-06-02 18:31:45 +0300 |
commit | cdf0d95a50e6ea5592e65242c3c8ffbdfd4629a0 (patch) | |
tree | 3e6a773b8a49cd0214658b1cc437c63b7cc4f957 /source/blender/python/intern/bpy_app_handlers.c | |
parent | 6a70d7e09f1163bee16570b1a0ec6887447f56e5 (diff) |
Fix T77126: Documented frame_change_pre and frame_change_post handlers
The documentation for the `frame_change_pre` and `frame_change_post`
handlers was really sparse, and suggested that `frame_change_pre` is
called before the frame changes. This is not the case; it's called after
the frame has changed, but before the dependency graph has been updated
for it.
No functional changes, just updated documentation.
Differential Revision: https://developer.blender.org/D7905
Reviewed by: sergey
Diffstat (limited to 'source/blender/python/intern/bpy_app_handlers.c')
-rw-r--r-- | source/blender/python/intern/bpy_app_handlers.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 28498e116df..dde1d13477f 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -44,8 +44,16 @@ void bpy_app_generic_callback(struct Main *main, static PyTypeObject BlenderAppCbType; static PyStructSequence_Field app_cb_info_fields[] = { - {"frame_change_pre", "on frame change for playback and rendering (before)"}, - {"frame_change_post", "on frame change for playback and rendering (after)"}, + {"frame_change_pre", + "Called after frame change for playback and rendering, before any data is evaluated for the " + "new frame. This makes it possible to change data and relations (for example swap an object " + "to another mesh) for the new frame. Note that this handler is **not** to be used as 'before " + "the frame changes' event. The dependency graph is not available in this handler, as data " + "and relations may have been altered and the dependency graph has not yet been updated for " + "that."}, + {"frame_change_post", + "Called after frame change for playback and rendering, after the data has been evaluated " + "for the new frame."}, {"render_pre", "on render (before)"}, {"render_post", "on render (after)"}, {"render_write", "on writing a render frame (directly after the frame is written)"}, |