Refactor: combine insert_keyframe() and insert_key_rna() into a single function #122053

Merged
Nathan Vegdahl merged 49 commits from nathanvegdahl/blender:combine_keying_functions into main 2024-06-11 16:43:08 +02:00
Showing only changes of commit a105641a02 - Show all commits

View File

@ -742,8 +742,8 @@ int clear_keyframe(Main *bmain,
return key_count;
}
static std::optional<StringRefNull> default_channel_group(const PointerRNA *ptr,
const StringRef rna_path)
static std::optional<StringRefNull> default_channel_group_for_path(const PointerRNA *ptr,
const StringRef rna_path)
{
if (ptr->type == &RNA_PoseBone) {
bPoseChannel *pose_channel = static_cast<bPoseChannel *>(ptr->data);
@ -782,7 +782,7 @@ CombinedKeyingResult insert_key_action(Main *bmain,
group = *channel_group;
}
else {
group = default_channel_group(ptr, rna_path);
group = default_channel_group_for_path(ptr, rna_path);
}
int property_array_index = 0;