From 507c19c0f7a1dc7a46ec8ac19d9e904c9e825a9b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 2 Jun 2021 17:15:05 +1000 Subject: Docs: formalize naming for generic callbacks in BKE_callbacks.h Add a doc-string explaining the purpose of each call back and how they should be used. Also add a currently unused callback 'POST_FAIL' that is to be used in cases the action fails - giving script authors, a guarantee that a call to `pre` will always have a matching `post/post_fail` call. - D11422: adds a callback that can use 'post_fail'. - T88696: proposed these conventions. --- source/blender/python/intern/bpy_app_handlers.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/python/intern') diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index a0b543097e6..bc05c51414f 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -43,6 +43,9 @@ void bpy_app_generic_callback(struct Main *main, static PyTypeObject BlenderAppCbType; +/** + * See `BKE_callbacks.h` #eCbEvent declaration for the policy on naming. + */ static PyStructSequence_Field app_cb_info_fields[] = { {"frame_change_pre", "Called after frame change for playback and rendering, before any data is evaluated for the " -- cgit v1.2.3