Blender V5.0
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 blender::StringRefNull rna_path)
static SlotMatchMethod get_slot_match_method (const bool from_single, const bool to_single, const KeyframePasteContext &paste_context)
static const FCurvepastebuf_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, 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)
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)
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

KeyframeCopyBufferkeyframe_copy_buffer = nullptr

Typedef Documentation

◆ pastebuf_match_func

Initial value:
bool (*)(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)
decltype(::ActionSlot::handle) slot_handle_t

Definition at line 1588 of file keyframes_general.cc.

Function Documentation

◆ do_curve_mirror_flippping()

void blender::ed::animation::do_curve_mirror_flippping ( const FCurve & fcurve,
BezTriple & bezt )
static

◆ 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 1569 of file keyframes_general.cc.

References BLI_str_quoted_substr_range(), BLI_string_flip_side_name(), blender::StringRefNull::c_str(), MAX_VGROUP_NAME, and blender::StringRefBase::substr().

Referenced by 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

Determine whether slot names matter when matching copied data to selected-to-paste-into channels.

Definition at line 1617 of file keyframes_general.cc.

References BLI_assert_msg, keyframe_copy_buffer, KeyframePasteContext::num_fcurves_selected, KeyframePasteContext::num_slots_selected, and UNUSED_VARS_NDEBUG.

Referenced by pastebuf_find_matching_copybuf_item().

◆ 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,
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 1873 of file keyframes_general.cc.

References FCurve::array_index.

Referenced by paste_animedit_keys(), 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,
animrig::slot_handle_t slot_handle_in_copy_buffer,
bool from_single,
bool to_single,
bool flip )

Most strict paste buffer matching method: exact matches on RNA path and array index only.

Definition at line 1781 of file keyframes_general.cc.

References FCurve::array_index, flip_names(), keyframe_copy_buffer, FCurve::rna_path, and STREQ.

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

◆ 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,
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.

Definition at line 1812 of file keyframes_general.cc.

References FCurve::array_index, BLI_findindex(), blender::StringRefBase::endswith(), GS, keyframe_copy_buffer, ID::name, printf, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_property_identifier(), and which_libbase().

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

Variable Documentation

◆ keyframe_copy_buffer