Blender V5.0
keyframes_general_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_map.hh"
12#include "BLI_set.hh"
13#include "BLI_string_ref.hh"
14
15#include "ANIM_action.hh"
16
17#include <limits>
18#include <optional>
19#include <string>
20
21struct FCurve;
22struct ID;
23struct Main;
24
25namespace blender::ed::animation {
26
43
50 static constexpr const char *SLOTLESS_SLOT_IDENTIFIER = "";
51
60
70
84
91
92 /* The first and last frames that got copied. */
93 float first_frame = std::numeric_limits<float>::infinity();
94 float last_frame = -std::numeric_limits<float>::infinity();
95
97 float current_frame = 0.0f;
98
99 KeyframeCopyBuffer() = default;
102
103 bool is_empty() const;
104 bool is_single_fcurve() const;
105 bool is_bone(const FCurve &fcurve) const;
106 int num_slots() const;
107
109
113 void debug_print() const;
114};
115
117
124std::optional<std::string> flip_names(StringRefNull rna_path);
125
130 const FCurve &fcurve_to_match,
131 const FCurve &fcurve_in_copy_buffer,
132 animrig::slot_handle_t slot_handle_in_copy_buffer,
133 bool from_single,
134 bool to_single,
135 bool flip);
136
142 const FCurve &fcurve_to_match,
143 const FCurve &fcurve_in_copy_buffer,
144 animrig::slot_handle_t slot_handle_in_copy_buffer,
145 bool from_single,
146 bool to_single,
147 bool flip);
148
153 const FCurve &fcurve_to_match,
154 const FCurve &fcurve_in_copy_buffer,
155 animrig::slot_handle_t slot_handle_in_copy_buffer,
156 bool from_single,
157 bool to_single,
158 bool flip);
159
160} // namespace blender::ed::animation
Functions and classes to work with Actions.
decltype(::ActionSlot::handle) slot_handle_t
KeyframeCopyBuffer * keyframe_copy_buffer
bool pastebuf_match_index_only(Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, blender::animrig::slot_handle_t, const bool from_single, const bool, const bool)
bool pastebuf_match_path_full(Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, blender::animrig::slot_handle_t, const bool from_single, const bool to_single, const bool flip)
bool pastebuf_match_path_property(Main *bmain, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, blender::animrig::slot_handle_t slot_handle_in_copy_buffer, const bool from_single, const bool, const bool)
std::optional< std::string > flip_names(const blender::StringRefNull rna_path)
Definition DNA_ID.h:414
Map< animrig::slot_handle_t, ID * > slot_animated_ids
static constexpr animrig::slot_handle_t DEFAULT_LAST_USED_SLOT_HANDLE
bool is_bone(const FCurve &fcurve) const
Map< animrig::slot_handle_t, std::string > slot_identifiers
KeyframeCopyBuffer(const KeyframeCopyBuffer &other)=delete
animrig::Channelbag * channelbag_for_slot(StringRef slot_identifier)