Anim: Detailed report if no keyframes have been inserted #119201

Merged
Christoph Lendenfeld merged 13 commits from ChrisLend/blender:return_keying_result into main 2024-04-09 09:39:25 +02:00
1 changed files with 8 additions and 0 deletions
Showing only changes of commit 09303663e7 - Show all commits

View File

@ -335,7 +335,15 @@ static int insert_key(bContext *C, wmOperator *op)
ListBase selection = {nullptr, nullptr};
const bool found_selection = get_selection(C, &selection);
if (!found_selection) {
BLI_freelistN(&selection);
BKE_reportf(op->reports, RPT_ERROR, "Unsupported context mode");
return OPERATOR_CANCELLED;
}
if (BLI_listbase_is_empty(&selection)) {
BKE_reportf(op->reports, RPT_WARNING, "Nothing selected to keyframe");

In the rest of this PR "keyframe" is only used as a noun. Maybe "Nothing selected to key" is better?

In the rest of this PR "keyframe" is only used as a noun. Maybe "Nothing selected to key" is better?
BLI_freelistN(&selection);
return OPERATOR_CANCELLED;
}
Main *bmain = CTX_data_main(C);