diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-07-06 18:49:12 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-07-06 19:20:26 +0300 |
commit | 563ef943c741eebd2fc7eaecd3984a0f5a17b7b2 (patch) | |
tree | e36c2637c7ae28511ee1a6e0bcddfb48ec1a4468 /source/blender/editors/animation | |
parent | e2c4a4c5104d0dc7bffa24da58ce532500e32719 (diff) |
Cleanup: Keyframing, remove duplicate code
Remove duplicate code from the `ANIM_OT_keyframe_delete` operator. The
actions of the removed code are already performed by the preceding
`keyingset_get_from_op_with_error()` call.
No functional changes.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 3751555f18c..08756252001 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -2087,29 +2087,6 @@ static int delete_key_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - const int prop_type = RNA_property_type(op->type->prop); - if (prop_type == PROP_ENUM) { - int type = RNA_property_enum_get(op->ptr, op->type->prop); - ks = ANIM_keyingset_get_from_enum_type(scene, type); - if (ks == NULL) { - BKE_report(op->reports, RPT_ERROR, "No active Keying Set"); - return OPERATOR_CANCELLED; - } - } - else if (prop_type == PROP_STRING) { - char type_id[MAX_ID_NAME - 2]; - RNA_property_string_get(op->ptr, op->type->prop, type_id); - ks = ANIM_keyingset_get_from_idname(scene, type_id); - - if (ks == NULL) { - BKE_reportf(op->reports, RPT_ERROR, "Active Keying Set '%s' not found", type_id); - return OPERATOR_CANCELLED; - } - } - else { - BLI_assert(0); - } - /* report failure */ if (ks == NULL) { BKE_report(op->reports, RPT_ERROR, "No active Keying Set"); |