From e2015f14cd84cf0b90a935d6b64be78405c12c87 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 26 Jun 2023 09:46:11 +0200 Subject: [PATCH] Cleanup: animation: remove redundant/wrong comments These comments were copy-pasted around code and are either wrong (because they have been copied from another function) or redundant (since the function itself describes what is done here). --- source/blender/editors/animation/drivers.c | 5 ----- source/blender/editors/animation/keyframing.c | 3 --- source/blender/editors/animation/keyingsets.c | 2 -- 3 files changed, 10 deletions(-) diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 67e0220a5dd..eae9a66c202 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -1044,7 +1044,6 @@ static int add_driver_button_invoke(bContext *C, wmOperator *op, const wmEvent * PropertyRNA *prop = NULL; int index; - /* try to find driver using property retrieved from UI */ UI_context_active_but_prop_get(C, &ptr, &prop, &index); if (ptr.owner_id && ptr.data && prop && RNA_property_animateable(&ptr, prop)) { @@ -1101,7 +1100,6 @@ static int remove_driver_button_exec(bContext *C, wmOperator *op) int index; const bool all = RNA_boolean_get(op->ptr, "all"); - /* try to find driver using property retrieved from UI */ UI_context_active_but_prop_get(C, &ptr, &prop, &index); if (all) { @@ -1155,7 +1153,6 @@ static int edit_driver_button_exec(bContext *C, wmOperator *op) PropertyRNA *prop = NULL; int index; - /* try to find driver using property retrieved from UI */ UI_context_active_but_prop_get(C, &ptr, &prop, &index); if (ptr.owner_id && ptr.data && prop) { @@ -1190,7 +1187,6 @@ static int copy_driver_button_exec(bContext *C, wmOperator *op) bool changed = false; int index; - /* try to create driver using property retrieved from UI */ UI_context_active_but_prop_get(C, &ptr, &prop, &index); if (ptr.owner_id && ptr.data && prop && RNA_property_animateable(&ptr, prop)) { @@ -1234,7 +1230,6 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op) bool changed = false; int index; - /* try to create driver using property retrieved from UI */ UI_context_active_but_prop_get(C, &ptr, &prop, &index); if (ptr.owner_id && ptr.data && prop && RNA_property_animateable(&ptr, prop)) { diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index f2a16f6a33e..f721d9437ba 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -2534,7 +2534,6 @@ static int insert_key_button_exec(bContext *C, wmOperator *op) /* flags for inserting keyframes */ flag = ANIM_get_keyframing_flags(scene, true); - /* try to insert keyframe using property retrieved from UI */ if (!(but = UI_context_active_but_prop_get(C, &ptr, &prop, &index))) { /* pass event on if no active button found */ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); @@ -2701,7 +2700,6 @@ static int delete_key_button_exec(bContext *C, wmOperator *op) int index; const bool all = RNA_boolean_get(op->ptr, "all"); - /* try to insert keyframe using property retrieved from UI */ if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) { /* pass event on if no active button found */ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); @@ -2809,7 +2807,6 @@ static int clear_key_button_exec(bContext *C, wmOperator *op) int index; const bool all = RNA_boolean_get(op->ptr, "all"); - /* try to insert keyframe using property retrieved from UI */ if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) { /* pass event on if no active button found */ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 5fc96f714f5..ebdd9019f3f 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -278,7 +278,6 @@ static int add_keyingset_button_exec(bContext *C, wmOperator *op) int index = 0, pflag = 0; const bool all = RNA_boolean_get(op->ptr, "all"); - /* try to add to keyingset using property retrieved from UI */ if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) { /* pass event on if no active button found */ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); @@ -384,7 +383,6 @@ static int remove_keyingset_button_exec(bContext *C, wmOperator *op) bool changed = false; int index = 0; - /* try to add to keyingset using property retrieved from UI */ if (UI_context_active_but_prop_get(C, &ptr, &prop, &index)) { /* pass event on if no active button found */ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); -- 2.30.2