|
Blender V4.3
|
Public Member Functions | |
| AnimDataConvertor (ConversionData &conversion_data, ID &id_src, const Array< AnimDataFCurveConvertor > fcurve_convertors={}) | |
| AnimDataConvertor (ConversionData &conversion_data, ID &id_dst, ID &id_src, const Array< AnimDataFCurveConvertor > fcurve_convertors={}) | |
| AnimDataConvertor ()=delete | |
| bool | source_has_animation_to_convert () const |
| void | fcurves_convert () |
| void | fcurves_convert_finalize () |
Public Attributes | |
| std::string | root_path_src = "" |
| std::string | root_path_dst = "" |
This class contains data and logic to handle conversion of animation data (FCurves).
It can be used to either:
RNA paths to convert can be specified in two ways:
Definition at line 137 of file grease_pencil_convert_legacy.cc.
|
inline |
Constructor to use when only processing FCurves within a same ID animation data.
Definition at line 188 of file grease_pencil_convert_legacy.cc.
|
inline |
Constructor to use when moving FCurves from one ID to another.
Definition at line 202 of file grease_pencil_convert_legacy.cc.
|
delete |
|
inline |
Convert relevant FCurves, i.e. modify their RNA path to match destination data.
Definition at line 443 of file grease_pencil_convert_legacy.cc.
References AnimData::action, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_strdupn(), blender::bke::greasepencil::convert::AnimDataFCurveConvertor::convert_cb, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), MEM_freeN(), blender::bke::greasepencil::convert::AnimDataFCurveConvertor::relative_rna_path_dst, blender::bke::greasepencil::convert::AnimDataFCurveConvertor::relative_rna_path_src, blender::StringRefBase::substr(), and AnimData::tmpact.
Referenced by blender::bke::greasepencil::convert::legacy_object_modifier_common().
|
inline |
Finalize FCurves conversion. Typically, this AnimDataConvertor should not be used after this call.
Currently, this call merely ensure depsgraph update in case of conversion of animation data within a same ID.
When transferring animation between source and destination IDs, this call actually moves the processed fcurves accumulated by previous call(s) to fcurves_convert.
Definition at line 526 of file grease_pencil_convert_legacy.cc.
References AnimData::action, blender::animrig::action_add(), blender::animrig::action_fcurve_move(), blender::animrig::assign_action(), blender::animrig::assign_tmpaction(), BKE_animdata_ensure_id(), BLI_addtail(), BLI_assert, BLI_assert_msg, BLI_findindex(), BLI_remlink(), blender::bke::greasepencil::convert::ConversionData::bmain, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), DEG_id_tag_update(), DEG_relations_tag_update(), AnimData::drivers, GS, ID_RECALC_ANIMATION, bAction::idroot, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), ID::name, blender::animrig::Action::slot_add_for_id(), AnimData::tmpact, UNUSED_VARS_NDEBUG, and USER_EXPERIMENTAL_TEST.
Referenced by blender::bke::greasepencil::convert::legacy_object_modifier_common().
|
inline |
Check whether the source animation data contains FCurves that need to be converted/moved to the destination animation data.
Definition at line 398 of file grease_pencil_convert_legacy.cc.
References GS, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), ID::name, and FCurve::rna_path.
| std::string blender::bke::greasepencil::convert::AnimDataConvertor::root_path_dst = "" |
Definition at line 170 of file grease_pencil_convert_legacy.cc.
Referenced by blender::bke::greasepencil::convert::legacy_object_modifier_common().
| std::string blender::bke::greasepencil::convert::AnimDataConvertor::root_path_src = "" |
Source and destination RNA root path. These can be modified by user code at any time (e.g. when processing animation data for different modifiers...).
Definition at line 169 of file grease_pencil_convert_legacy.cc.
Referenced by blender::bke::greasepencil::convert::legacy_object_modifier_common().