32static void rna_FCurve_convert_to_samples(
FCurve *fcu,
ReportList *reports,
int start,
int end)
44 else if (!fcu->bezt) {
53static void rna_FCurve_convert_to_keyframes(
FCurve *fcu,
ReportList *reports,
int start,
int end)
70static void rna_FCurve_bake(
FCurve *fcu,
75 int remove_existing_as_int)
78 if (start_frame >= end_frame) {
81 "Invalid frame range (%d - %d). Start Frame is larger than End Frame",
104 "Remove all keys within the defined range"},
109 "Remove all keys outside the defined range"},
111 {0,
nullptr, 0,
nullptr,
nullptr},
119 func =
RNA_def_function(srna,
"convert_to_samples",
"rna_FCurve_convert_to_samples");
121 func,
"Convert current FCurve from keyframes to sample points, if necessary");
129 func =
RNA_def_function(srna,
"convert_to_keyframes",
"rna_FCurve_convert_to_keyframes");
132 "Convert current FCurve from sample points to keyframes (linear interpolation), "
150 "Frame at which to start baking",
160 "Frame at which to end baking (inclusive)",
165 func,
"step", 1, 0.01,
FLT_MAX,
"Step",
"At which interval to add keys", 1, 16);
171 "Choose which keys should be automatically removed by the bake");
Functions to modify FCurves.
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
void bake_fcurve(FCurve *fcu, int2 range, float step, BakeCurveRemove remove_existing)
void WM_main_add_notifier(uint type, void *reference)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
static const EnumPropertyItem channel_bake_remove_options[]
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void BKE_report(ReportList *reports, eReportType type, const char *message)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
void RNA_api_fcurves(StructRNA *srna)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void fcurve_store_samples(FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
float fcurve_samplingcb_evalcurve(FCurve *fcu, void *data, float evaltime)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_api_drivers(StructRNA *)
void fcurve_samples_to_keyframes(FCurve *fcu, int start, int end)