19using Alembic::Abc::ISampleSelector;
26 const int sample_count)
29 BLI_assert_msg(fcurve,
"The same F-Curve is being created twice, this is unexpected.");
39 BLI_assert(sample_index >= 0 && sample_index < fcu->totvert);
41 bez.
vec[1][0] = frame;
42 bez.
vec[1][1] = value;
58 const int sample_count)
76 Span<std::unique_ptr<FCurveCreationHelper>> helpers,
79 if (helpers.is_empty()) {
83 const double fps = scene->frames_per_second();
87 const int sample_count = end_frame - start_frame + 1;
89 for (
const std::unique_ptr<FCurveCreationHelper> &helper : helpers) {
90 helper->ensure_action_data(bmain, sample_count);
94 for (
int i = start_frame; i <= end_frame; i++) {
95 const double frame_time = (double(i) / fps);
96 const ISampleSelector selector = ISampleSelector(frame_time);
103 for (
const std::unique_ptr<FCurveCreationHelper> &helper : helpers) {
104 helper->set_fcurves_sample(sample_info);
108 for (
const std::unique_ptr<FCurveCreationHelper> &helper : helpers) {
Functions and classes to work with Actions.
Functions to work with AnimData.
#define BLI_assert_msg(a, msg)
Span< const FCurve * > fcurves() const
FCurve * fcurve_create_unique(Main *bmain, const FCurveDescriptor &fcurve_descriptor)
void ensure_action_data(Main *bmain, const int sample_count)
virtual ~FCurveCreationHelper()
FCurve * create_fcurve(const animrig::FCurveDescriptor &fcurve_descriptor, const int sample_count)
animrig::Channelbag * channelbag
virtual void create_fcurves(const int sample_count)=0
virtual void remove_unnecessary_fcurves()
bAction * id_action_ensure(Main *bmain, ID *id)
Channelbag & action_channelbag_ensure(bAction &dna_action, ID &animated_id)
void create_keyframes(Main *bmain, Scene *scene, Span< std::unique_ptr< FCurveCreationHelper > > helpers, const TimeInfo time_info)
static FCurve * create_fcurve(animrig::Channelbag &channelbag, const animrig::FCurveDescriptor &fcurve_descriptor, const int sample_count)
void set_fcurve_sample(FCurve *fcu, int64_t sample_index, const float frame, const float value)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BKE_fcurve_handles_recalc(FCurve &fcu)
void BKE_fcurve_bezt_resize(FCurve &fcu, int new_totvert)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eBezTriple_Interpolation ipo
Alembic::Abc::ISampleSelector selector
Alembic::Abc::chrono_t max_time
Alembic::Abc::chrono_t min_time