Refactor: combine insert_keyframe() and insert_key_rna() into a single function #122053
@ -329,10 +329,10 @@ bool autokeyframe_property(bContext *C,
|
||||
BLI_assert((fcu->array_index == rnaindex) || (rnaindex == -1));
|
||||
}
|
||||
|
||||
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) ? std::optional(fcu->grp->name) :
|
||||
std::nullopt;
|
||||
const std::string path = fcu ? fcu->rna_path :
|
||||
RNA_path_from_ID_to_property(ptr, prop).value_or("");
|
||||
/* 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);
|
||||
|
@ -754,11 +754,11 @@ TEST_F(KeyframingTest, insert_keyframes__layered_action__only_needed)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* Tests for `insert_key_rna()` with legacy actions.
|
||||
* Tests for `insert_keyframes()` with legacy actions.
|
||||
*/
|
||||
|
||||
/* Keying a non-array property. */
|
||||
TEST_F(KeyframingTest, insert_key_rna__legacy_action__non_array_property)
|
||||
TEST_F(KeyframingTest, insert_keyframes__legacy_action__non_array_property)
|
||||
{
|
||||
AnimationEvalContext anim_eval_context = {nullptr, 1.0};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user