Cleanup: Anim, add explanation to bone collection assign operator

Just a little explanation of the code, because I got confused by my own.

No functional changes, except for the addition of a `BLI_assert_msg()`.
This commit is contained in:
Sybren A. Stüvel
2023-12-11 15:10:21 +01:00
parent a494d6a641
commit b5e7e6b214

View File

@@ -417,7 +417,10 @@ static int bone_collection_assign_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
/* NOTE: this operator can be called through the M/Shift+M shortcuts, which
* allow assigning to a newly-created bone collection. */
BoneCollection *bcoll = get_bonecoll_named_or_active(C, op, ob, CREATE_IF_MISSING);
BLI_assert_msg(bcoll, "Bone Collection should always be created");
if (bcoll == nullptr) {
return OPERATOR_CANCELLED;
}