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 <ideasman42@gmail.com>2021-06-02 10:15:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-02 10:35:24 +0300
commit507c19c0f7a1dc7a46ec8ac19d9e904c9e825a9b (patch)
treec1bd0ecc61a155a299a19038dccdd4ca34f32205 /source/blender/python
parent3b3742c75fb0960997cb28742c0879412004358d (diff)
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.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c3
1 files changed, 3 insertions, 0 deletions
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 "