Refactor: combine insert_keyframe() and insert_key_rna() into a single function #122053
@ -331,7 +331,8 @@ bool autokeyframe_property(bContext *C,
|
||||
|
||||
const std::string path = fcu ? fcu->rna_path :
|
||||
RNA_path_from_ID_to_property(ptr, prop).value_or("");
|
||||
const std::optional<std::string> group = (fcu && fcu->grp) ? fcu->grp->name : nullptr;
|
||||
const std::optional<std::string> group = (fcu && fcu->grp) ? std::optional(fcu->grp->name) :
|
||||
std::nullopt;
|
||||
/* NOTE: `rnaindex == -1` is a magic number, meaning either "operate on
|
||||
* all elements" or "not an array property". */
|
||||
const std::optional<int> array_index = rnaindex < 0 ? std::nullopt : std::optional(rnaindex);
|
||||
|
Loading…
Reference in New Issue
Block a user