Anim: Detailed report if no keyframes have been inserted #119201
|
@ -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");
|
||||
|
||||
BLI_freelistN(&selection);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
Main *bmain = CTX_data_main(C);
|
||||
|
|
Loading…
Reference in New Issue
In the rest of this PR "keyframe" is only used as a noun. Maybe "Nothing selected to key" is better?