27#include <fmt/format.h>
35 "Generate a curve using a factorized or expanded polynomial"},
40 "Generate a curve using standard math functions such as sin and cos"},
45 "Reshape F-Curve values, e.g. change amplitude of movements"},
52 "Restrict maximum and minimum values of F-Curve"},
56 "Stepped Interpolation",
57 "Snap values to nearest grid step, e.g. for a stop-motion look"},
58 {0,
nullptr, 0,
nullptr,
nullptr},
66 "Automatic handles only take immediately adjacent keys into account"},
70 "Continuous Acceleration",
71 "Automatic handles are adjusted to avoid jumps in acceleration, resulting "
72 "in smoother curves. However, key changes may affect interpolation over a "
73 "larger stretch of the curve."},
74 {0,
nullptr, 0,
nullptr,
nullptr},
80 ICON_KEYTYPE_KEYFRAME_VEC,
82 "Normal keyframe, e.g. for key poses"},
85 ICON_KEYTYPE_BREAKDOWN_VEC,
87 "A breakdown pose, e.g. for transitions between key poses"},
90 ICON_KEYTYPE_MOVING_HOLD_VEC,
92 "A keyframe that is part of a moving hold"},
95 ICON_KEYTYPE_EXTREME_VEC,
97 "An \"extreme\" pose, or some other purpose as needed"},
100 ICON_KEYTYPE_JITTER_VEC,
102 "A filler or baked keyframe for keying on ones, or some other purpose as needed"},
105 ICON_KEYTYPE_GENERATED_VEC,
107 "A key generated automatically by a tool, not manually created"},
108 {0,
nullptr, 0,
nullptr,
nullptr},
115 ICON_IPO_EASE_IN_OUT,
117 "Easing type is chosen automatically based on what the type of interpolation used "
118 "(e.g. Ease In for transitional types, and Ease Out for dynamic effects)"},
124 "Only on the end closest to the next keyframe"},
129 "Only on the end closest to the first keyframe"},
132 ICON_IPO_EASE_IN_OUT,
134 "Segment between both keyframes"},
135 {0,
nullptr, 0,
nullptr,
nullptr},
139 {
DTAR_ROTMODE_AUTO,
"AUTO", 0,
"Auto Euler",
"Euler using the rotation order of the target"},
151 "Decompose into a swing rotation to aim the X axis, followed by twist around it"},
156 "Decompose into a swing rotation to aim the Y axis, followed by twist around it"},
161 "Decompose into a swing rotation to aim the Z axis, followed by twist around it"},
162 {0,
nullptr, 0,
nullptr,
nullptr},
170 "Currently evaluating scene"},
175 "Currently evaluating view layer"},
176 {0,
nullptr, 0,
nullptr,
nullptr},
207 return &RNA_FModifierGenerator;
209 return &RNA_FModifierFunctionGenerator;
211 return &RNA_FModifierEnvelope;
213 return &RNA_FModifierCycles;
215 return &RNA_FModifierNoise;
217 return &RNA_FModifierLimits;
219 return &RNA_FModifierStepped;
221 return &RNA_UnknownType;
235 if (driver ==
nullptr) {
255 if (driver ==
nullptr) {
270static bool rna_ChannelDriver_is_simple_expression_get(
PointerRNA *
ptr)
277static void rna_ChannelDriver_update_data_impl(
Main *bmain,
293 ID *
id =
ptr->owner_id;
295 rna_ChannelDriver_update_data_impl(bmain, scene,
id, driver);
306 rna_ChannelDriver_update_data(bmain, scene,
ptr);
312 FCurve *fcu = rna_FCurve_find_driver_by_target(
ptr->owner_id, dtar);
320 rna_ChannelDriver_update_data_impl(bmain, scene,
ptr->owner_id, driver);
326 FCurve *fcu = rna_FCurve_find_driver_by_variable(
ptr->owner_id, dvar);
334 rna_ChannelDriver_update_data_impl(bmain, scene,
ptr->owner_id, driver);
341 FCurve *fcu = rna_FCurve_find_driver_by_variable(
ptr->owner_id, dvar);
349 rna_ChannelDriver_update_data_impl(bmain, scene,
ptr->owner_id, driver);
358 dtar->
id =
static_cast<ID *
>(value.data);
367static int rna_DriverTarget_id_editable(
const PointerRNA *
ptr,
const char ** )
373static int rna_DriverTarget_id_type_editable(
const PointerRNA *
ptr,
const char ** )
383static void rna_DriverTarget_id_type_set(
PointerRNA *
ptr,
int value)
390 data->idtype = value;
403static void rna_DriverTarget_RnaPath_get(
PointerRNA *
ptr,
char *value)
425static void rna_DriverTarget_RnaPath_set(
PointerRNA *
ptr,
const char *value)
443static void rna_DriverVariable_type_set(
PointerRNA *
ptr,
int value)
451void rna_DriverVariable_name_set(
PointerRNA *
ptr,
const char *value)
484static void rna_FKeyframe_handle1_get(
PointerRNA *
ptr,
float *values)
488 values[0] = bezt->vec[0][0];
489 values[1] = bezt->vec[0][1];
492static void rna_FKeyframe_handle1_set(
PointerRNA *
ptr,
const float *values)
496 bezt->vec[0][0] = values[0];
497 bezt->vec[0][1] = values[1];
500static void rna_FKeyframe_handle2_get(
PointerRNA *
ptr,
float *values)
504 values[0] = bezt->vec[2][0];
505 values[1] = bezt->vec[2][1];
508static void rna_FKeyframe_handle2_set(
PointerRNA *
ptr,
const float *values)
512 bezt->vec[2][0] = values[0];
513 bezt->vec[2][1] = values[1];
516static void rna_FKeyframe_ctrlpoint_get(
PointerRNA *
ptr,
float *values)
520 values[0] = bezt->vec[1][0];
521 values[1] = bezt->vec[1][1];
524static void rna_FKeyframe_ctrlpoint_set(
PointerRNA *
ptr,
const float *values)
528 bezt->vec[1][0] = values[0];
529 bezt->vec[1][1] = values[1];
532static void rna_FKeyframe_ctrlpoint_ui_set(
PointerRNA *
ptr,
const float *values)
536 const float frame_delta = values[0] - bezt->vec[1][0];
537 const float value_delta = values[1] - bezt->vec[1][1];
543 bezt->vec[0][0] += frame_delta;
544 bezt->vec[0][1] += value_delta;
546 bezt->vec[1][0] = values[0];
547 bezt->vec[1][1] = values[1];
549 bezt->vec[2][0] += frame_delta;
550 bezt->vec[2][1] += value_delta;
555static std::optional<std::string> rna_FCurve_path(
const PointerRNA *
ptr)
570 if (strip->type() != animrig::Strip::Type::Keyframe) {
576 const int fcurve_index = channelbag->fcurves().first_index_try(fcurve);
577 if (fcurve_index != -1) {
579 &action.
id, &RNA_ActionChannelbag, channelbag);
581 return fmt::format(
"{}.fcurves[{}]", *channelbag_path, fcurve_index);
590static void rna_FCurve_RnaPath_get(
PointerRNA *
ptr,
char *value)
612static void rna_FCurve_RnaPath_set(
PointerRNA *
ptr,
const char *value)
631 ID *pid =
ptr->owner_id;
637 if (
ELEM(
nullptr, pid, vid)) {
638 printf(
"ERROR: one of the ID's for the groups to assign to is invalid (ptr=%p, val=%p)\n",
643 if (value.
data && (pid != vid)) {
645 printf(
"ERROR: IDs differ - ptr=%p vs value=%p\n", pid, vid);
663 printf(
"ERROR: F-Curve already belongs to this group\n");
670 if (act ==
nullptr) {
672 printf(
"ERROR: cannot assign F-Curve to group, since F-Curve is not attached to any ID\n");
683 printf(
"ERROR: F-Curve (%p) doesn't exist in action '%s'\n", fcu, act->
id.
name);
713 "ERROR: F-Curve (datapath: '%s') doesn't belong to the same channel bag as "
714 "channel group '%s'\n",
722static void rna_FCurve_range(
FCurve *fcu,
float range[2])
733static void rna_tag_animation_update(
Main *bmain,
ID *
id)
747static void rna_FCurve_update_data_ex(
ID *
id,
FCurve *fcu,
Main *bmain)
753 rna_tag_animation_update(bmain,
id);
760 rna_FCurve_update_data_ex(
ptr->owner_id, (
FCurve *)
ptr->data, bmain);
773 rna_tag_animation_update(bmain,
ptr->owner_id);
817static void rna_FModifier_start_frame_set(
PointerRNA *
ptr,
float value)
828static void rna_FModifier_end_frame_set(
PointerRNA *
ptr,
float value)
839static void rna_FModifier_start_frame_range(
854static void rna_FModifier_end_frame_range(
868static void rna_FModifier_blending_range(
874 *
max = fcm->efra - fcm->sfra;
879 ID *
id =
ptr->owner_id;
886 rna_tag_animation_update(bmain,
id);
889static void rna_fModifier_name_set(
PointerRNA *
ptr,
const char *value)
905 rna_FModifier_update(bmain, scene,
ptr);
913 for (fm = fmo->prev; fm; fm = fm->prev) {
916 for (fm = fmo->next; fm; fm = fm->next) {
920 rna_FModifier_update(bmain, scene,
ptr);
923static int rna_FModifierGenerator_coefficients_get_length(
const PointerRNA *
ptr,
939static void rna_FModifierGenerator_coefficients_get(
PointerRNA *
ptr,
float *values)
946static void rna_FModifierGenerator_coefficients_set(
PointerRNA *
ptr,
const float *values)
953static void rna_FModifierLimits_minx_set(
PointerRNA *
ptr,
float value)
958 data->rect.xmin = value;
960 data->rect.xmax = std::max(
data->rect.xmin,
data->rect.xmax);
963static void rna_FModifierLimits_maxx_set(
PointerRNA *
ptr,
float value)
968 data->rect.xmax = value;
970 data->rect.xmin = std::min(
data->rect.xmax,
data->rect.xmin);
973static void rna_FModifierLimits_miny_set(
PointerRNA *
ptr,
float value)
978 data->rect.ymin = value;
980 data->rect.ymax = std::max(
data->rect.ymin,
data->rect.ymax);
983static void rna_FModifierLimits_maxy_set(
PointerRNA *
ptr,
float value)
988 data->rect.ymax = value;
990 data->rect.ymin = std::min(
data->rect.ymax,
data->rect.ymin);
993static void rna_FModifierLimits_minx_range(
1005static void rna_FModifierLimits_maxx_range(
1018static void rna_FModifierLimits_miny_range(
1030static void rna_FModifierLimits_maxy_range(
1043static void rna_FModifierStepped_start_frame_range(
1053static void rna_FModifierStepped_end_frame_range(
1063static void rna_FModifierStepped_frame_start_set(
PointerRNA *
ptr,
float value)
1068 float prop_clamp_min = -
FLT_MAX, prop_clamp_max =
FLT_MAX, prop_soft_min, prop_soft_max;
1069 rna_FModifierStepped_start_frame_range(
1070 ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);
1071 value = std::clamp(value, prop_clamp_min, prop_clamp_max);
1076 data->start_frame = value;
1080static void rna_FModifierStepped_frame_end_set(
PointerRNA *
ptr,
float value)
1085 float prop_clamp_min = -
FLT_MAX, prop_clamp_max =
FLT_MAX, prop_soft_min, prop_soft_max;
1086 rna_FModifierStepped_end_frame_range(
1087 ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);
1088 value = std::clamp(value, prop_clamp_min, prop_clamp_max);
1093 data->end_frame = value;
1097static BezTriple *rna_FKeyframe_points_insert(
1098 ID *
id,
FCurve *fcu,
Main *bmain,
float frame,
float value,
int flag,
int keyframe_type)
1107 rna_tag_animation_update(bmain,
id);
1112 return fcu->
bezt + index;
1118static void rna_FKeyframe_points_add(
ID *
id,
FCurve *fcu,
Main *bmain,
int tot)
1125 rna_tag_animation_update(bmain,
id);
1128static void rna_FKeyframe_points_remove(
1132 int index = int(bezt - fcu->
bezt);
1133 if (index < 0 || index >= fcu->
totvert) {
1145 rna_tag_animation_update(bmain,
id);
1148static void rna_FKeyframe_points_clear(
ID *
id,
FCurve *fcu,
Main *bmain)
1152 rna_tag_animation_update(bmain,
id);
1155static void rna_FKeyframe_points_sort(
ID *
id,
FCurve *fcu,
Main *bmain)
1158 rna_tag_animation_update(bmain,
id);
1161static void rna_FKeyframe_points_deduplicate(
ID *
id,
FCurve *fcu,
Main *bmain)
1164 rna_tag_animation_update(bmain,
id);
1167static void rna_FKeyframe_points_handles_recalc(
ID *
id,
FCurve *fcu,
Main *bmain)
1170 rna_tag_animation_update(bmain,
id);
1180 rna_tag_animation_update(bmain,
id);
1186 fed.f1 = fed.f2 = 0;
1214 *(env->data +
i) = fed;
1215 return (env->data +
i);
1218static void rna_FModifierEnvelope_points_remove(
1224 int index = int(cp - env->data);
1227 if (index < 0 || index >= env->totvert) {
1232 rna_tag_animation_update(bmain,
id);
1234 if (env->totvert > 1) {
1237 memmove(env->data + index,
1238 env->data + (index + 1),
1250 env->data =
nullptr;
1254 point->invalidate();
1259 rna_tag_animation_update(bmain,
ptr->owner_id);
1262static void rna_FModifier_show_expanded_set(
PointerRNA *
ptr,
bool value)
1278 "POLYNOMIAL_FACTORISED",
1280 "Factorized Polynomial",
1282 {0,
nullptr, 0,
nullptr,
nullptr},
1287 srna,
"Generator F-Modifier",
"Deterministically generate values for the modified F-Curve");
1296 "Values generated by this modifier are applied on top of "
1297 "the existing values instead of overwriting them");
1313 "The highest power of 'x' for this polynomial (number of coefficients - 1)");
1325 "rna_FModifierGenerator_coefficients_get",
1326 "rna_FModifierGenerator_coefficients_set",
1329 prop,
"Coefficients",
"Coefficients for 'x' (starting from lowest power of x^0)");
1342 {0,
"SIN", 0,
"Sine",
""},
1343 {1,
"COS", 0,
"Cosine",
""},
1344 {2,
"TAN", 0,
"Tangent",
""},
1345 {3,
"SQRT", 0,
"Square Root",
""},
1346 {4,
"LN", 0,
"Natural Logarithm",
""},
1347 {5,
"SINC", 0,
"Normalized Sine",
"sin(x) / x"},
1348 {0,
nullptr, 0,
nullptr,
nullptr},
1351 srna =
RNA_def_struct(brna,
"FModifierFunctionGenerator",
"FModifier");
1353 srna,
"Built-In Function F-Modifier",
"Generate values using a built-in function");
1360 prop,
"Amplitude",
"Scale factor determining the maximum/minimum values");
1367 prop,
"Phase Multiple",
"Scale factor determining the 'speed' of the function");
1387 "Values generated by this modifier are applied on top of "
1388 "the existing values instead of overwriting them");
1406 srna =
RNA_def_struct(brna,
"FModifierEnvelopeControlPoint",
nullptr);
1445 srna =
RNA_def_struct(brna,
"FModifierEnvelopeControlPoints",
nullptr);
1449 srna,
"Control Points",
"Control points defining the shape of the envelope");
1460 "Frame to add this control-point",
1465 func,
"point",
"FModifierEnvelopeControlPoint",
"",
"Newly created control-point");
1468 func =
RNA_def_function(srna,
"remove",
"rna_FModifierEnvelope_points_remove");
1472 func,
"point",
"FModifierEnvelopeControlPoint",
"",
"Control-point to remove");
1491 prop,
"Control Points",
"Control points defining the shape of the envelope");
1499 prop,
"Reference Value",
"Value that envelope's influence is centered around / based on");
1506 prop,
"Default Minimum",
"Lower distance from Reference Value for 1:1 default influence");
1514 prop,
"Default Maximum",
"Upper distance from Reference Value for 1:1 default influence");
1532 "Repeat with Offset",
1533 "Repeat keyframe range, but with offset based on gradient between "
1534 "start and end values"},
1539 "Alternate between forward and reverse playback of keyframe range"},
1540 {0,
nullptr, 0,
nullptr,
nullptr},
1561 "Maximum number of cycles to allow before first keyframe (0 = infinite)");
1577 "Maximum number of cycles to allow after last keyframe (0 = infinite)");
1590 srna,
"Limit F-Modifier",
"Limit the time/value ranges of the modified F-Curve");
1621 prop,
nullptr,
"rna_FModifierLimits_minx_set",
"rna_FModifierLimits_minx_range");
1629 prop,
nullptr,
"rna_FModifierLimits_miny_set",
"rna_FModifierLimits_miny_range");
1637 prop,
nullptr,
"rna_FModifierLimits_maxx_set",
"rna_FModifierLimits_maxx_range");
1645 prop,
nullptr,
"rna_FModifierLimits_maxy_set",
"rna_FModifierLimits_maxy_range");
1662 {0,
nullptr, 0,
nullptr,
nullptr},
1689 "Amplitude of the noise - the amount that it modifies the underlying curve");
1714 "Gap between successive frequencies. Depth needs to be greater than 0 "
1715 "for this to have an effect");
1724 "Amount of high frequency detail. Depth needs to be greater than 0 for "
1725 "this to have an effect");
1739 "Use the legacy way of generating noise. Has the issue that it can "
1740 "produce values outside of -1/1");
1754 "Stepped Interpolation F-Modifier",
1755 "Hold each interpolated value from the F-Curve for several frames without "
1756 "changing the timing");
1772 "Reference number of frames before frames get held "
1773 "(use to get hold for '1-3' vs '5-7' holding patterns)");
1780 prop,
"Use Start Frame",
"Restrict modifier to only act after its 'start' frame");
1787 prop,
"Use End Frame",
"Restrict modifier to only act before its 'end' frame");
1795 "rna_FModifierStepped_frame_start_set",
1796 "rna_FModifierStepped_start_frame_range");
1798 prop,
"Start Frame",
"Frame that modifier's influence starts (if applicable)");
1805 prop,
nullptr,
"rna_FModifierStepped_frame_end_set",
"rna_FModifierStepped_end_frame_range");
1807 prop,
"End Frame",
"Frame that modifier's influence ends (if applicable)");
1858 prop,
"Disabled",
"F-Curve Modifier has invalid settings and will not be evaluated");
1876 "Restrict Frame Range",
1877 "F-Curve Modifier is only applied for the specified frame range to help "
1878 "mask off effects in order to chain them");
1885 prop,
nullptr,
"rna_FModifier_start_frame_set",
"rna_FModifier_start_frame_range");
1889 "Frame that modifier's influence starts (if Restrict Frame Range is in use)");
1896 prop,
nullptr,
"rna_FModifier_end_frame_set",
"rna_FModifier_end_frame_range");
1900 "Frame that modifier's influence ends (if Restrict Frame Range is in use)");
1908 prop,
"Blend In",
"Number of frames from start frame for influence to take effect");
1916 prop,
"Blend Out",
"Number of frames from end frame for influence to fade out");
1924 prop,
"Use Influence",
"F-Curve Modifier's effects will be tempered by a default factor");
1933 prop,
"Influence",
"Amount of influence F-Curve Modifier will have when not fading in/out");
1958 {0,
nullptr, 0,
nullptr,
nullptr},
1966 "Transforms include effects of parenting/restpose and constraints"},
1971 "Transforms don't include parenting/restpose or constraints"},
1976 "Transforms include effects of constraints but not "
1977 "parenting/restpose"},
1978 {0,
nullptr, 0,
nullptr,
nullptr},
1992 prop,
nullptr,
"rna_DriverTarget_id_set",
"rna_DriverTarget_id_typef",
nullptr);
1995 "ID-block that the specific property used can be found from "
1996 "(id_type property must be set first)");
2012 "rna_DriverTarget_RnaPath_get",
2013 "rna_DriverTarget_RnaPath_length",
2014 "rna_DriverTarget_RnaPath_set");
2046 prop,
"Context Property",
"Type of a context-dependent data-block to access property from");
2053 "Use the fallback value if the data path can't be resolved, instead of "
2054 "failing to evaluate the driver");
2060 prop,
"Fallback",
"The value to use if the data path can't be resolved");
2069 "Indicates that the most recent variable evaluation used the fallback value");
2082 "Use the value from some RNA property"},
2085 ICON_DRIVER_TRANSFORM,
2086 "Transform Channel",
2087 "Final transformation value of object or bone"},
2090 ICON_DRIVER_ROTATIONAL_DIFFERENCE,
2091 "Rotational Difference",
2092 "Use the angle between two bones"},
2095 ICON_DRIVER_DISTANCE,
2097 "Distance between two bones or objects"},
2102 "Use the value from some RNA property within the current evaluation context"},
2103 {0,
nullptr, 0,
nullptr,
nullptr},
2109 srna,
"Driver Variable",
"Variable from some source/target for driver relationship");
2118 "Name to use in scripted expressions/functions (no spaces or dots are allowed, "
2119 "and must start with a letter)");
2158 srna,
"ChannelDriver Variables",
"Collection of channel driver Variables");
2164 parm =
RNA_def_pointer(func,
"var",
"DriverVariable",
"",
"Newly created Driver Variable");
2173 func,
"variable",
"DriverVariable",
"",
"Variable to remove from the driver");
2189 {0,
nullptr, 0,
nullptr,
nullptr},
2195 srna,
"Driver",
"Driver for the value of a setting based on an external value");
2223 "Include a 'self' variable in the name-space, "
2224 "so drivers can easily reference the data being modified (object, bone, etc...)");
2230 prop,
"Invalid",
"Driver could not be evaluated in past, so should be skipped");
2237 "Simple Expression",
2238 "The scripted expression can be evaluated without using the full Python interpreter");
2281 srna,
"Keyframe",
"Bézier curve point with two handles defining a Keyframe on an F-Curve");
2317 "Interpolation method to use for segment of the F-Curve from "
2318 "this Keyframe until the next Keyframe");
2334 "Which ends of the segment between this and the next keyframe easing "
2335 "interpolation is applied to");
2348 prop,
"Amplitude",
"Amount to boost elastic bounces for 'elastic' easing");
2361 prop,
"rna_FKeyframe_handle1_get",
"rna_FKeyframe_handle1_set",
nullptr);
2363 prop,
"Left Handle",
"Coordinates of the left handle (before the control point)");
2369 prop,
"rna_FKeyframe_ctrlpoint_get",
"rna_FKeyframe_ctrlpoint_set",
nullptr);
2377 prop,
"rna_FKeyframe_ctrlpoint_get",
"rna_FKeyframe_ctrlpoint_ui_set",
nullptr);
2381 "Coordinates of the control point. Note: Changing this value also updates the handles "
2382 "similar to using the graph editor transform operator");
2389 prop,
"rna_FKeyframe_handle2_get",
"rna_FKeyframe_handle2_set",
nullptr);
2391 prop,
"Right Handle",
"Coordinates of the right handle (after the control point)");
2414 prop,
"rna_FCurve_active_modifier_get",
"rna_FCurve_active_modifier_set",
nullptr,
nullptr);
2422 parm =
RNA_def_pointer(func,
"fmodifier",
"FModifier",
"",
"New fmodifier");
2433 parm =
RNA_def_pointer(func,
"modifier",
"FModifier",
"",
"Removed modifier");
2451 "Don't add any new keyframes, but just replace existing ones"},
2452 {
INSERTKEY_NEEDED,
"NEEDED", 0,
"Needed",
"Only adds keyframes that are needed"},
2457 "Fast keyframe insertion to avoid recalculating the curve each time"},
2458 {0,
nullptr, 0,
nullptr,
nullptr},
2475 "X Value of this keyframe point",
2485 "Y Value of this keyframe point",
2489 RNA_def_enum_flag(func,
"options", keyframe_flag_items, 0,
"",
"Keyframe options");
2495 "Type of keyframe to insert");
2496 parm =
RNA_def_pointer(func,
"keyframe",
"Keyframe",
"",
"Newly created keyframe");
2503 func,
"count", 1, 0, INT_MAX,
"Number",
"Number of points to add to the spline", 0, INT_MAX);
2509 parm =
RNA_def_pointer(func,
"keyframe",
"Keyframe",
"",
"Keyframe to remove");
2517 "Fast keyframe removal to avoid recalculating the curve each time");
2527 func =
RNA_def_function(srna,
"deduplicate",
"rna_FKeyframe_points_deduplicate");
2530 "Ensure there are no duplicate keys. Assumes that the points have already been sorted");
2533 func =
RNA_def_function(srna,
"handles_recalc",
"rna_FKeyframe_points_handles_recalc");
2535 "Update handles after modifications to the keyframe points, to "
2536 "update things like auto-clamping");
2552 "Hold values of endpoint keyframes"},
2557 "Use slope of curve leading in/out of endpoint keyframes"},
2558 {0,
nullptr, 0,
nullptr,
nullptr},
2565 "Cycle through the rainbow, trying to give each curve a unique color"},
2570 "Use axis colors for transform and color properties, and auto-rainbow for the rest"},
2574 "Auto WXYZ to YRGB",
2575 "Use axis colors for XYZ parts of transform, and yellow for the 'W' channel"},
2580 "Use custom hand-picked color for F-Curve"},
2581 {0,
nullptr, 0,
nullptr,
nullptr},
2596 "Method used for evaluating value of F-Curve outside first and last keyframes");
2615 prop,
"rna_FCurve_RnaPath_get",
"rna_FCurve_RnaPath_length",
"rna_FCurve_RnaPath_set");
2623 prop,
"RNA Array Index",
"Index to the specific property affected by F-Curve if applicable");
2631 prop,
"Color Mode",
"Method used to determine color of F-Curve in Graph Editor");
2660 prop,
"Hide",
"F-Curve and its keyframes are hidden in the Graph Editor graphs");
2666 prop,
"Auto Handle Smoothing",
"Algorithm used to compute automatic handles");
2675 "False when F-Curve could not be evaluated in past, so should be skipped "
2684 "True if the curve contributes no animation due to lack of "
2685 "keyframes or useful modifiers, and should be deleted");
2714 "Evaluate F-Curve at given frame",
2725 "Value of F-Curve specific frame",
2734 func,
"Ensure keyframes are sorted in chronological order and handles are set correctly");
2747 srna,
"update_autoflags",
"update_autoflags_fcurve");
2750 "Update FCurve flags set automatically from affected property "
2751 "(currently, integer/discrete flags set when the property is not a float)");
2754 func,
"data",
"AnyType",
"Data",
"Data containing the property controlled by given FCurve");
Functions and classes to work with Actions.
Functions to modify FCurves.
void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
void action_groups_remove_channel(bAction *act, FCurve *fcu)
AnimData * BKE_animdata_from_id(const ID *id)
int BKE_fcm_envelope_find_index(FCM_EnvelopeData *array, float frame, int arraylen, bool *r_exists)
void BKE_fcurve_deduplicate_keys(FCurve *fcu)
void BKE_fmodifier_name_set(FModifier *fcm, const char *name)
int BKE_fcurve_bezt_binarysearch_index(const BezTriple array[], float frame, int arraylen, bool *r_replace)
void BKE_fcurve_handles_recalc(FCurve *fcu)
FModifier * add_fmodifier(ListBase *modifiers, int type, FCurve *owner_fcu)
bool remove_fmodifier(ListBase *modifiers, FModifier *fcm)
void set_active_fmodifier(ListBase *modifiers, FModifier *fcm)
bool BKE_fcurve_is_empty(const FCurve *fcu)
FModifier * find_active_fmodifier(ListBase *modifiers)
bool BKE_fcurve_calc_range(const FCurve *fcu, float *r_min, float *r_max, bool selected_keys_only)
void sort_time_fcurve(FCurve *fcu)
const FModifierTypeInfo * fmodifier_get_typeinfo(const FModifier *fcm)
void BKE_fcurve_delete_key(FCurve *fcu, int index)
void BKE_fcurve_delete_keys_all(FCurve *fcu)
struct DriverVar * driver_add_new_variable(struct ChannelDriver *driver)
void driver_variable_unique_name(struct DriverVar *dvar)
void BKE_driver_invalidate_expression(struct ChannelDriver *driver, bool expr_changed, bool varname_changed)
bool BKE_driver_has_simple_expression(struct ChannelDriver *driver)
void driver_free_variable_ex(struct ChannelDriver *driver, struct DriverVar *dvar)
void driver_change_variable_type(struct DriverVar *dvar, int type)
void driver_variable_name_validate(struct DriverVar *dvar)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
#define STRNCPY_UTF8(dst, src)
#define ARRAY_HAS_ITEM(arr_item, arr_start, arr_len)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define BLT_I18NCONTEXT_AMOUNT
#define BLT_I18NCONTEXT_ID_ACTION
#define BLT_I18NCONTEXT_ID_ID
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
#define MAX_DRIVER_TARGETS
@ DTAR_TRANSCHAN_SCALE_AVG
@ FCM_EXTRAPOLATE_CYCLIC_OFFSET
@ DTAR_OPTION_USE_FALLBACK
@ FCURVE_COLOR_AUTO_RAINBOW
@ FCM_NOISE_MODIF_REPLACE
@ FCM_NOISE_MODIF_SUBTRACT
@ FCM_NOISE_MODIF_MULTIPLY
@ DVAR_TYPE_TRANSFORM_CHAN
@ FMODIFIER_TYPE_FN_GENERATOR
@ FMODIFIER_TYPE_GENERATOR
@ FMODIFIER_TYPE_ENVELOPE
@ FCM_GENERATOR_POLYNOMIAL_FACTORISED
@ FCM_GENERATOR_POLYNOMIAL
@ FMODIFIER_FLAG_USEINFLUENCE
@ FMODIFIER_FLAG_DISABLED
@ FMODIFIER_FLAG_RANGERESTRICT
@ DTAR_ROTMODE_QUATERNION
@ DTAR_ROTMODE_SWING_TWIST_X
@ DTAR_ROTMODE_SWING_TWIST_Y
@ DTAR_ROTMODE_SWING_TWIST_Z
@ DTAR_FLAG_FALLBACK_USED
@ FCURVE_EXTRAPOLATE_CONSTANT
@ FCURVE_EXTRAPOLATE_LINEAR
@ FCURVE_SMOOTH_CONT_ACCEL
@ DTAR_CONTEXT_PROPERTY_ACTIVE_SCENE
@ DTAR_CONTEXT_PROPERTY_ACTIVE_VIEW_LAYER
Object is a sort of wrapper for general info.
@ UI_PANEL_DATA_EXPAND_ROOT
StructRNA * ID_code_to_RNA_type(short idcode)
#define RNA_MAX_ARRAY_DIMENSION
#define RNA_ENUM_ITEM_SEPR
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
BMesh const char void * data
blender::Span< const Layer * > layers() const
bool is_action_layered() const
bool fcurve_assign_to_channel_group(FCurve &fcurve, bActionGroup &to_group)
blender::Span< const Channelbag * > channelbags() const
void ED_keyframes_add(FCurve *fcu, int num_keys_to_add)
float length(VecOp< float, D >) RET
#define MEM_reallocN(vmemh, len)
DEG_id_tag_update_ex(cb_data->bmain, cb_data->owner_id, ID_RECALC_TAG_FOR_UNDO|ID_RECALC_SYNC_TO_EVAL)
void * MEM_mallocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
ccl_device_inline float2 fmod(const float2 a, const float b)
KeyframeSettings get_keyframe_settings(bool from_userprefs)
SingleKeyingResult insert_vert_fcurve(FCurve *fcu, const float2 position, const KeyframeSettings &settings, eInsertKeyFlags flag)
Main Key-framing API call.
float wrap(float value, float max, float min)
const EnumPropertyItem rna_enum_id_type_items[]
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[]
const EnumPropertyItem rna_enum_keyframe_handle_type_items[]
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
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_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, 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_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
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 RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
static void rna_def_fmodifier_noise(BlenderRNA *brna)
static void rna_def_fmodifier_envelope(BlenderRNA *brna)
void RNA_def_fcurve(BlenderRNA *brna)
const EnumPropertyItem rna_enum_fmodifier_type_items[]
static const EnumPropertyItem rna_enum_driver_target_context_property_items[]
static void rna_def_fmodifier(BlenderRNA *brna)
static void rna_def_channeldriver(BlenderRNA *brna)
static void rna_def_channeldriver_variables(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[]
static void rna_def_drivervar(BlenderRNA *brna)
static void rna_def_fmodifier_cycles(BlenderRNA *brna)
static void rna_def_drivertarget(BlenderRNA *brna)
static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_fmodifier_stepped(BlenderRNA *brna)
static void rna_def_fmodifier_generator(BlenderRNA *brna)
const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[]
const EnumPropertyItem rna_enum_fcurve_auto_smoothing_items[]
static void rna_def_fcurve(BlenderRNA *brna)
const EnumPropertyItem rna_enum_driver_target_rotation_mode_items[]
static void rna_def_fmodifier_limits(BlenderRNA *brna)
static void rna_def_fpoint(BlenderRNA *brna)
static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
static void rna_def_fmodifier_envelope_control_points(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_fkeyframe(BlenderRNA *brna)
static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_api_fcurves(StructRNA *srna)
void RNA_api_drivers(StructRNA *)
std::optional< std::string > rna_Channelbag_path(const PointerRNA *ptr)
void(* verify_data)(FModifier *fcm)
struct ActionChannelbag * channelbag
eBezTriple_KeyframeType keyframe_type
void WM_main_add_notifier(uint type, void *reference)