Blender V4.3
blender::bke::greasepencil::convert::AnimDataConvertor Class Reference

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 = ""
 

Detailed Description

This class contains data and logic to handle conversion of animation data (FCurves).

It can be used to either:

  • Convert FCurves within a same animation data (essentially updating the RNA paths).
  • Convert FCurves and move them from the source to the destination IDs animation data. The constructor used defines which of these two 'modes' will be the used by a given convertor.

RNA paths to convert can be specified in two ways:

  • Complete paths, with a list of source to destination pairs of paths (relative to the relevant root paths).
  • Only by the source and destination root paths (in which case all FCurves starting by these paths will be converted).
Note
In case of transfer of animation data between IDs, NLA animation in source data is not converted. This would require (partially) re-creating a copy of the potential source NLA into the destination NLA, which is too complex for the few potential use cases.

Definition at line 137 of file grease_pencil_convert_legacy.cc.

Constructor & Destructor Documentation

◆ AnimDataConvertor() [1/3]

blender::bke::greasepencil::convert::AnimDataConvertor::AnimDataConvertor ( ConversionData & conversion_data,
ID & id_src,
const Array< AnimDataFCurveConvertor > fcurve_convertors = {} )
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.

◆ AnimDataConvertor() [2/3]

blender::bke::greasepencil::convert::AnimDataConvertor::AnimDataConvertor ( ConversionData & conversion_data,
ID & id_dst,
ID & id_src,
const Array< AnimDataFCurveConvertor > fcurve_convertors = {} )
inline

Constructor to use when moving FCurves from one ID to another.

Definition at line 202 of file grease_pencil_convert_legacy.cc.

◆ AnimDataConvertor() [3/3]

blender::bke::greasepencil::convert::AnimDataConvertor::AnimDataConvertor ( )
delete

Member Function Documentation

◆ fcurves_convert()

void blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert ( )
inline

◆ fcurves_convert_finalize()

void blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize ( )
inline

◆ source_has_animation_to_convert()

bool blender::bke::greasepencil::convert::AnimDataConvertor::source_has_animation_to_convert ( ) const
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.

Member Data Documentation

◆ root_path_dst

std::string blender::bke::greasepencil::convert::AnimDataConvertor::root_path_dst = ""

◆ root_path_src

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().


The documentation for this class was generated from the following file: