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:
authorGaia Clary <gaiaclary>2021-09-28 15:07:02 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2021-09-29 14:09:17 +0300
commit78b9a8c7b993991c22ac2bd1ffbfaf1d896e4431 (patch)
tree801d8318c5d650edb262b2192fb6b61f1670db0f /source/blender/blenkernel/BKE_asset_library.h
parent6351c73b758d1b2f4d6b9e85c9bf07074b369be5 (diff)
Add an option to silence bpy.ops.anim.keyframe_delete_v3d when used in Addons
The issues: 1.) When we want to remove keyframes from a range of frames in an action, then we can use bpy.ops.anim.keyframe_delete_v3d to remove the keys frame by frame. However, whenever the operator hits a frame with no keyframes, then it generates an error. While when it hits a frame with keyframes, then it reports the numbner of removed keys. This creates a lot of unnecessary noise in the Blender console. 2.) Furthermore a related issue is that WM_event_add_notifier() is called also when no frames where removed. This seems to significantly slow down the removal of keyframes in a range of frames at least when i use vscode for debugging. A proposal for improvement: This patch adds an attribute 'confirm_success' which controls if the operator reports back what it did (or did not) while executing. Silent mode would then be called like this: bpy.ops.anim.keyframe_delete_v3d(confirm_success=False) Note: confirm_success is True by default so this patchj does not change the behavior of Blender, it only gives the option to scripts. 3.) Personal note: I have chosen the attribute name to be equal as it is used in other related operators. However i rather would rename the attribute to "verbose" (preferred) or "with_confirm". But i let this to be decided by the reviewers. Thanks for your time to review! Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12629
Diffstat (limited to 'source/blender/blenkernel/BKE_asset_library.h')
0 files changed, 0 insertions, 0 deletions