Blender V5.3
blender::ed::animation Namespace Reference

Namespaces

namespace  greasepencil
namespace  tests

Classes

struct  KeyframeCopyBuffer

Typedefs

using pastebuf_match_func

Functions

std::optional< std::string > flip_names (const StringRefNull rna_path)
static SlotMatchMethod get_slot_match_method (const bool from_single, const bool to_single, const KeyframePasteContext &paste_context)
static const FCurve * pastebuf_find_matching_copybuf_item (const pastebuf_match_func strategy, Main *bmain, const bAnimListElem &ale_to_paste_into, const bool from_single, const bool to_single, const KeyframePasteContext &paste_context)
bool pastebuf_match_path_full (Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, animrig::slot_handle_t, const bool from_single, const bool to_single, const bool flip)
bool pastebuf_match_path_property_and_component_length (Main *bmain, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, const animrig::slot_handle_t slot_handle_in_copy_buffer, const bool from_single, const bool to_single, const bool flip)
bool pastebuf_match_path_property (Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, animrig::slot_handle_t, const bool from_single, const bool, const bool)
bool pastebuf_match_index_only (Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, animrig::slot_handle_t, const bool from_single, const bool, const bool)
static void do_curve_mirror_flippping (const FCurve &fcurve, BezTriple &bezt)
static void paste_animedit_keys_fcurve (FCurve *fcu, const FCurve &fcurve_in_copy_buffer, float offset[2], const eKeyMergeMode merge_mode, bool flip)

Variables

KeyframeCopyBuffer * keyframe_copy_buffer = nullptr

Typedef Documentation

◆ pastebuf_match_func

Initial value:
bool (*)(Main *bmain,
const FCurve &fcurve_to_match,
const FCurve &fcurve_in_copy_buffer,
animrig::slot_handle_t slot_handle_in_copy_buffer,
bool from_single,
bool to_single,
bool flip)
decltype(blender::ActionSlot::handle) slot_handle_t

Definition at line 1595 of file keyframes_general.cc.

Function Documentation

◆ do_curve_mirror_flippping()

◆ flip_names()

std::optional< std::string > blender::ed::animation::flip_names ( StringRefNull rna_path)

Flip bone names in the RNA path, returning the flipped path.

Returns empty optional if the rna_path is not animating a bone, i.e. doesn't have the pose.bones[" prefix.

Definition at line 1576 of file keyframes_general.cc.

References blender::BLI_str_quoted_substr_range(), blender::BLI_string_flip_side_name(), flip_names(), and MAX_VGROUP_NAME.

Referenced by flip_names(), pastebuf_match_path_full(), and blender::ed::animation::tests::TEST_F().

◆ get_slot_match_method()

SlotMatchMethod blender::ed::animation::get_slot_match_method ( const bool from_single,
const bool to_single,
const KeyframePasteContext & paste_context )
static

◆ paste_animedit_keys_fcurve()

◆ pastebuf_find_matching_copybuf_item()

const FCurve * blender::ed::animation::pastebuf_find_matching_copybuf_item ( const pastebuf_match_func strategy,
Main * bmain,
const bAnimListElem & ale_to_paste_into,
const bool from_single,
const bool to_single,
const KeyframePasteContext & paste_context )
static

◆ pastebuf_match_index_only()

bool blender::ed::animation::pastebuf_match_index_only ( Main * bmain,
const FCurve & fcurve_to_match,
const FCurve & fcurve_in_copy_buffer,
blender::animrig::slot_handle_t slot_handle_in_copy_buffer,
bool from_single,
bool to_single,
bool flip )

Least strict paste buffer matching method: array indices only.

Definition at line 1899 of file keyframes_general.cc.

References blender::FCurve::array_index, and pastebuf_match_index_only().

Referenced by blender::paste_animedit_keys(), pastebuf_match_index_only(), and blender::ed::animation::tests::TEST_F().

◆ pastebuf_match_path_full()

bool blender::ed::animation::pastebuf_match_path_full ( Main * bmain,
const FCurve & fcurve_to_match,
const FCurve & fcurve_in_copy_buffer,
blender::animrig::slot_handle_t slot_handle_in_copy_buffer,
bool from_single,
bool to_single,
bool flip )

◆ pastebuf_match_path_property()

bool blender::ed::animation::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,
bool from_single,
bool to_single,
bool flip )

Medium strict paste buffer matching method: match the property name (so not the entire RNA path) and the array index. This ignores the number of components, so c and a.b.c will match.

For RNA paths that end in a lookup index (like locations[0]), the property name preceding the index needs to match too.

Definition at line 1841 of file keyframes_general.cc.

References blender::FCurve::array_index, blender::Span< T >::is_empty(), blender::Span< T >::last(), pastebuf_match_path_property(), and blender::Span< T >::size().

Referenced by blender::paste_animedit_keys(), pastebuf_match_path_property(), pastebuf_match_path_property_and_component_length(), and blender::ed::animation::tests::TEST_F().

◆ pastebuf_match_path_property_and_component_length()

bool blender::ed::animation::pastebuf_match_path_property_and_component_length ( Main * bmain,
const FCurve & fcurve_to_match,
const FCurve & fcurve_in_copy_buffer,
animrig::slot_handle_t slot_handle_in_copy_buffer,
bool from_single,
bool to_single,
bool flip )

Medium strict paste buffer matching method: match the property name (so not the entire RNA path) and the array index, but only if the RNA path has the same number of components. For example, a.b.c and d.e.c match, but a.c does not.

Definition at line 1819 of file keyframes_general.cc.

References pastebuf_match_path_property(), and pastebuf_match_path_property_and_component_length().

Referenced by blender::paste_animedit_keys(), pastebuf_match_path_property_and_component_length(), and blender::ed::animation::tests::TEST_F().

Variable Documentation

◆ keyframe_copy_buffer