37 {int(animrig::Layer::MixMode::Replace),
41 "Channels in this layer override the same channels from underlying layers"},
42 {int(animrig::Layer::MixMode::Offset),
46 "Channels in this layer are added to underlying layers as sequential operations"},
47 {int(animrig::Layer::MixMode::Add),
51 "Channels in this layer are added to underlying layers on a per-channel basis"},
52 {int(animrig::Layer::MixMode::Subtract),
56 "Channels in this layer are subtracted to underlying layers on a per-channel basis"},
57 {int(animrig::Layer::MixMode::Multiply),
61 "Channels in this layer are multiplied with underlying layers on a per-channel basis"},
62 {0,
nullptr, 0,
nullptr,
nullptr},
67 {int(animrig::Strip::Type::Keyframe),
71 "Strip containing keyframes on F-Curves"},
72 {0,
nullptr, 0,
nullptr,
nullptr},
82 "Not yet specified. When this slot is first assigned to a data-block, this will be set to "
83 "the type of that data-block"},
84 {0,
nullptr, 0,
nullptr,
nullptr},
113# include <fmt/format.h>
200 "Cannot add slots to a legacy Action '%s'. Convert it to a layered Action first.",
217void rna_Action_slots_remove(
bAction *dna_action,
243 return action.
layers().size();
256 "Cannot add layers to a legacy Action '%s'. Convert it to a layered Action first.",
261 if (action.
layers().size() >= 1) {
274void rna_Action_layers_remove(
bAction *dna_action,
297static int rna_iterator_animation_slots_length(
PointerRNA *
ptr)
300 return action.
slots().size();
303static std::optional<std::string> rna_ActionSlot_path(
const PointerRNA *
ptr)
307 char identifier_esc[
sizeof(slot.
identifier) * 2];
309 return fmt::format(
"slots[\"{}\"]", identifier_esc);
319void rna_ActionSlot_name_display_get(
PointerRNA *
ptr,
char *value)
337 if (name_ref.is_empty()) {
345static void rna_ActionSlot_identifier_set(
PointerRNA *
ptr,
const char *identifier)
349 const StringRef identifier_ref(identifier);
359 const std::string identifier_with_correct_prefix = slot.
idtype_string() +
360 identifier_ref.substr(2);
362 if (identifier_with_correct_prefix != identifier_ref) {
365 "Attempted to set slot identifier to \"%s\", but the type prefix does not match the "
366 "slot's 'target_id_type' \"%s\". Setting to \"%s\" instead.\n",
369 identifier_with_correct_prefix.c_str());
405static std::optional<std::string> rna_ActionLayer_path(
const PointerRNA *
ptr)
409 char name_esc[
sizeof(layer.
name) * 2];
411 return fmt::format(
"layers[\"{}\"]", name_esc);
421static int rna_iterator_ActionLayer_strips_length(
PointerRNA *
ptr)
424 return layer.
strips().size();
431 switch (strip.
type()) {
432 case animrig::Strip::Type::Keyframe:
433 return &RNA_ActionKeyframeStrip;
435 return &RNA_UnknownType;
441 const animrig::Strip::Type strip_type = animrig::Strip::Type(type);
445 if (layer.
strips().size() >= 1) {
459void rna_ActionStrips_remove(
475static std::optional<std::string> rna_ActionStrip_path(
const PointerRNA *
ptr)
488 const std::optional<std::string> layer_path = rna_ActionLayer_path(&layer_ptr);
489 BLI_assert_msg(layer_path,
"Every animation layer should have a valid RNA path.");
490 const std::string strip_path = fmt::format(
"{}.strips[{}]", *layer_path, index);
506static int rna_iterator_keyframestrip_channelbags_length(
PointerRNA *
ptr)
537static void rna_Channelbags_remove(
ID *dna_action_id,
558static bool rna_ActionStrip_key_insert(
ID *dna_action_id,
563 const char *rna_path,
564 const int array_index,
568 if (dna_slot ==
nullptr) {
580 bmain, slot, {rna_path, array_index}, {time, value}, settings,
INSERTKEY_NOFLAGS);
598 if (strip->
type() != animrig::Strip::Type::Keyframe) {
610 const std::optional<std::string> layer_path = rna_ActionLayer_path(&layer_ptr);
611 BLI_assert_msg(layer_path,
"Every animation layer should have a valid RNA path.");
612 return fmt::format(
"{}.strips[{}].channelbags[{}]", *layer_path, strip_index, index);
636static int rna_iterator_Channelbag_fcurves_length(
PointerRNA *
ptr)
645 const char *data_path,
647 const char *group_name)
650 if (data_path[0] ==
'\0') {
656 if (group_name && group_name[0]) {
661 FCurve *fcurve =
self.fcurve_create_unique(bmain, descr);
665 "F-Curve '%s[%d]' already exists in this channelbag",
673static FCurve *rna_Channelbag_fcurve_new_from_fcurve(
ID *dna_action_id,
677 const char *data_path)
685 if (
self.fcurve_find({data_path, source->array_index})) {
688 "F-Curve '%s[%d]' already exists in this channelbag",
706 const char *data_path,
708 const char *group_name)
711 if (data_path[0] ==
'\0') {
717 if (group_name && group_name[0]) {
722 FCurve &fcurve =
self.fcurve_ensure(bmain, descr);
728 const char *data_path,
731 if (data_path[0] ==
'\0') {
737 return self.fcurve_find({data_path, index});
740static void rna_Channelbag_fcurve_remove(
ID *dna_action_id,
749 if (!
self.fcurve_remove(*fcurve)) {
758static void rna_Channelbag_fcurve_clear(
ID *dna_action_id,
762 dna_channelbag->wrap().fcurves_clear();
773static int rna_iterator_Channelbag_groups_length(
PointerRNA *
ptr)
784 return &
self.channel_group_create(
name);
795 if (!
self.channel_group_remove(*agrp)) {
798 "Could not remove the F-Curve Group from the collection because it does not exist "
799 "in the collection");
838struct ActionGroupChannelsIterator {
847 ListBaseIterator listbase;
865 if (group->wrap().is_legacy()) {
866 custom_iter->tag = ActionGroupChannelsIterator::LISTBASE;
867 custom_iter->listbase.link =
static_cast<Link *
>(group->channels.first);
869 iter->
valid = custom_iter->listbase.link !=
nullptr;
876 custom_iter->tag = ActionGroupChannelsIterator::ARRAY;
877 custom_iter->array.ptr =
reinterpret_cast<char *
>(cbag.
fcurve_array + group->fcurve_range_start);
878 custom_iter->array.endptr =
reinterpret_cast<char *
>(
879 cbag.
fcurve_array + group->fcurve_range_start + group->fcurve_range_length);
880 custom_iter->array.itemsize =
sizeof(
FCurve *);
881 custom_iter->array.length = group->fcurve_range_length;
883 iter->
valid = group->fcurve_range_length > 0;
896 ActionGroupChannelsIterator *custom_iter =
static_cast<ActionGroupChannelsIterator *
>(
902 switch (custom_iter->tag) {
903 case ActionGroupChannelsIterator::ARRAY: {
904 custom_iter->array.ptr += custom_iter->array.itemsize;
905 iter->
valid = (custom_iter->array.ptr != custom_iter->array.endptr);
908 case ActionGroupChannelsIterator::LISTBASE: {
913 if ((fcurve->
next) && (fcurve->
next->
grp == grp)) {
914 custom_iter->listbase.link = custom_iter->listbase.link->next;
915 iter->
valid = (custom_iter->listbase.link !=
nullptr);
918 custom_iter->listbase.link =
nullptr;
930 ActionGroupChannelsIterator *custom_iter =
static_cast<ActionGroupChannelsIterator *
>(
934 switch (custom_iter->tag) {
935 case ActionGroupChannelsIterator::ARRAY:
936 fcurve = *
reinterpret_cast<FCurve **
>(custom_iter->array.ptr);
938 case ActionGroupChannelsIterator::LISTBASE:
939 fcurve =
reinterpret_cast<FCurve *
>(custom_iter->listbase.link);
956static void rna_Action_pose_markers_remove(
bAction *act,
964 "Timeline marker '%s' not found in action '%s'",
981static void rna_Action_active_pose_marker_set(
PointerRNA *
ptr,
989static int rna_Action_active_pose_marker_index_get(
PointerRNA *
ptr)
995static void rna_Action_active_pose_marker_index_set(
PointerRNA *
ptr,
int value)
1001static void rna_Action_active_pose_marker_index_range(
1017 return rna_action(
ptr).is_action_legacy();
1019static bool rna_Action_is_action_layered_get(
PointerRNA *
ptr)
1021 return rna_action(
ptr).is_action_layered();
1024static void rna_Action_frame_range_get(
PointerRNA *
ptr,
float *r_values)
1026 const float2 frame_range = rna_action(
ptr).get_frame_range();
1027 r_values[0] = frame_range[0];
1028 r_values[1] = frame_range[1];
1031static void rna_Action_frame_range_set(
PointerRNA *
ptr,
const float *values)
1036 data->frame_start = values[0];
1037 data->frame_end = values[1];
1041static void rna_Action_curve_frame_range_get(
PointerRNA *
ptr,
float *values)
1044 const float2 frame_range = rna_action(
ptr).get_frame_range_of_keys(
false);
1045 values[0] = frame_range[0];
1046 values[1] = frame_range[1];
1049static void rna_Action_use_frame_range_set(
PointerRNA *
ptr,
bool value)
1068static void rna_Action_start_frame_set(
PointerRNA *
ptr,
float value)
1072 data->frame_start = value;
1076static void rna_Action_end_frame_set(
PointerRNA *
ptr,
float value)
1080 data->frame_end = value;
1084static void rna_Action_deselect_keys(
bAction *act)
1090static FCurve *rna_Action_fcurve_ensure_for_datablock(
bAction *_self,
1094 const char *data_path,
1095 const int array_index,
1096 const char *group_name)
1103 "Assign action \"%s\" to \"%s\" before calling this function",
1105 datablock->
name + 2);
1110 if (data_path[0] ==
'\0') {
1117 if (group_name && group_name[0]) {
1133 ID *srcId =
ptr->owner_id;
1146 if (action.
idroot == 0) {
1150 return GS(srcId->name) == action.
idroot;
1176 switch (saction->mode) {
1202 if (filtering_enabled) {
1205 ListBase anim_data = {
nullptr,
nullptr};
1223 if (filtering_enabled) {
1242 reevaluate_fcurve_errors(&ac);
1245static std::optional<std::string> rna_DopeSheet_path(
const PointerRNA *
ptr)
1256 if (sipo->
ads == ads) {
1257 return fmt::format(
"areas[{}].spaces[{}].dopesheet", area_index, space_index);
1262 if (snla->
ads == ads) {
1263 return fmt::format(
"areas[{}].spaces[{}].dopesheet", area_index, space_index);
1268 if (&saction->
ads == ads) {
1269 return fmt::format(
"areas[{}].spaces[{}].dopesheet", area_index, space_index);
1294 if (_rna_ActionSlot_target_id_type_items) {
1295 return _rna_ActionSlot_target_id_type_items;
1326 _rna_ActionSlot_target_id_type_items = items;
1333static void rna_ActionSlot_target_id_type_set(
PointerRNA *
ptr,
int value)
1341 "WARNING: ignoring assignment to target_id_type of Slot '%s' in Action '%s'. A Slot's "
1342 "target_id_type can only be changed when currently 'UNSPECIFIED'.\n",
1362 srna,
"Dope Sheet",
"Settings for filtering the channels shown in animation editors");
1369 prop,
"Source",
"ID-Block representing source data, usually ID_SCE (i.e. Scene)");
1376 "Show Data-Block Filters",
1377 "Show options for whether channels related to certain types of data are included");
1385 prop,
"Only Show Selected",
"Only include channels relating to selected objects and data");
1393 "Only Show Slot of Active Object",
1394 "Only show the slot of the active Object. Otherwise show all the Action's Slots");
1401 prop,
"Show Hidden",
"Include channels from objects/bone that are not visible");
1409 "Alphabetically sorts data-blocks - mainly objects in the scene "
1410 "(disable to increase viewport speed)");
1425 "Only include F-Curves and drivers that are disabled or have errors");
1436 prop,
"Filtering Collection",
"Collection that included object should be a member of");
1459 "Multi-Word Fuzzy Filter",
1460 "Perform fuzzy/multi-word matching.\n"
1461 "Warning: May be slow");
1469 "Include Missing NLA",
1470 "Include animation data-blocks with no NLA data (NLA editor only)");
1478 prop,
"Display Summary",
"Display an additional 'summary' line (Dope Sheet editors only)");
1487 "Collapse summary when shown, so all other channels get hidden (Dope Sheet editors only)");
1495 "Display Transforms",
1496 "Include visualization of object-level animation data (mostly transforms)");
1503 prop,
"Display Shape Keys",
"Include visualization of shape key related animation data");
1511 "Display Modifier Data",
1512 "Include visualization of animation data related to data-blocks linked to modifiers");
1519 prop,
"Display Meshes",
"Include visualization of mesh related animation data");
1526 prop,
"Display Lattices",
"Include visualization of lattice related animation data");
1533 prop,
"Display Camera",
"Include visualization of camera related animation data");
1540 prop,
"Display Material",
"Include visualization of material related animation data");
1547 prop,
"Display Light",
"Include visualization of light related animation data");
1554 prop,
"Display Line Style",
"Include visualization of Line Style related Animation data");
1561 prop,
"Display Texture",
"Include visualization of texture related animation data");
1568 prop,
"Display Curve",
"Include visualization of curve related animation data");
1575 prop,
"Display World",
"Include visualization of world related animation data");
1582 prop,
"Display Scene",
"Include visualization of scene related animation data");
1589 prop,
"Display Particle",
"Include visualization of particle related animation data");
1596 prop,
"Display Metaball",
"Include visualization of metaball related animation data");
1603 prop,
"Display Armature",
"Include visualization of armature related animation data");
1610 prop,
"Display Node",
"Include visualization of node related animation data");
1617 prop,
"Display Speaker",
"Include visualization of speaker related animation data");
1624 prop,
"Display Cache Files",
"Include visualization of cache file related animation data");
1631 prop,
"Display Hair",
"Include visualization of hair related animation data");
1638 prop,
"Display Point Cloud",
"Include visualization of point cloud related animation data");
1645 prop,
"Display Volume",
"Include visualization of volume related animation data");
1652 prop,
"Display Light Probe",
"Include visualization of lightprobe related animation data");
1660 "Display Grease Pencil",
1661 "Include visualization of Grease Pencil related animation data and frames");
1668 prop,
"Display Movie Clips",
"Include visualization of movie clip related animation data");
1676 "Variable Fallback As Error",
1677 "Include drivers that relied on any fallback values for their evaluation "
1678 "in the Only Show Errors filter, even if the driver evaluation succeeded");
1702 prop,
"rna_ActionSlots_active_get",
"rna_ActionSlots_active_set",
nullptr,
nullptr);
1717 "The data-block type that the slot is intended for. This is combined with the slot name to "
1718 "create the slot's unique identifier, and is also used to limit (on a best-effort basis) "
1719 "which data-blocks the slot can be assigned to.");
1728 "Name of the slot. This will be made unique within the Action among slots of the same type");
1731 parm =
RNA_def_pointer(func,
"slot",
"ActionSlot",
"",
"Newly created action slot");
1738 "Remove the slot from the Action, including all animation that "
1739 "is associated with that slot");
1740 parm =
RNA_def_pointer(func,
"action_slot",
"ActionSlot",
"Action Slot",
"The slot to remove");
1761 "Add a layer to the Animation. Currently an Animation can only have at most one layer.");
1767 "Name of the layer, will be made unique within the Action");
1769 parm =
RNA_def_pointer(func,
"layer",
"ActionLayer",
"",
"Newly created animation layer");
1777 func,
"anim_layer",
"ActionLayer",
"Animation Layer",
"The layer to remove");
1794 "Identifier for a set of channels in this Action, that can be used by a data-block "
1795 "to specify what it gets animated by");
1807 "Used when connecting an Action to a data-block, to find the correct slot handle. This is "
1808 "the display name, prefixed by two characters determined by the slot's ID type");
1814 prop,
nullptr,
"rna_ActionSlot_target_id_type_set",
"rna_ActionSlot_target_id_type_itemf");
1819 "Type of data-block that this slot is intended to animate; can be set "
1820 "when 'UNSPECIFIED' but is otherwise read-only");
1829 "rna_ActionSlot_name_display_get",
1830 "rna_ActionSlot_name_display_length",
1831 "rna_ActionSlot_name_display_set");
1837 "Slot Display Name",
1838 "Name of the slot, for display in the user interface. This name combined with the slot's "
1839 "data-block type is unique within its Action");
1845 "Number specific to this Slot, unique within the Action.\n"
1846 "This is used, for example, on a ActionKeyframeStrip to look up the "
1847 "ActionChannelbag for this Slot");
1854 "Whether this is the active slot, can be set by assigning to action.slots.active");
1876 func,
"Return the data-blocks that are animated by this slot of this action");
1884 func,
"Duplicate this slot, including all the animation data associated with it");
1908 "Add a new strip to the layer. Currently a layer can only have "
1909 "one strip, with infinite boundaries.");
1914 int(animrig::Strip::Type::Keyframe),
1916 "The type of strip to create");
1918 parm =
RNA_def_pointer(func,
"strip",
"ActionStrip",
"",
"Newly created animation strip");
1926 func,
"anim_strip",
"ActionStrip",
"Animation Strip",
"The strip to remove");
1951 prop,
"Influence",
"How much of this layer is used when blending into the lower layers");
1959 prop,
"Mix Mode",
"How animation of this layer is blended into the lower layers");
1969 "rna_iterator_ActionLayer_strips_begin",
1970 "rna_iterator_array_next",
1971 "rna_iterator_array_end",
1972 "rna_iterator_array_dereference_get",
1973 "rna_iterator_ActionLayer_strips_length",
1994 "Animation Channels for Slots",
1995 "For each action slot, a list of animation channels that are meant for that slot");
2001 "Add a new channelbag to the strip, to contain animation channels for a specific slot");
2007 "The slot that should be animated by this channelbag");
2011 parm =
RNA_def_pointer(func,
"channelbag",
"ActionChannelbag",
"",
"Newly created channelbag");
2018 parm =
RNA_def_pointer(func,
"channelbag",
"ActionChannelbag",
"",
"The channelbag to remove");
2030 srna =
RNA_def_struct(brna,
"ActionKeyframeStrip",
"ActionStrip");
2032 srna,
"Keyframe Animation Strip",
"Strip with a set of F-Curves for each action slot");
2038 "rna_iterator_keyframestrip_channelbags_begin",
2039 "rna_iterator_array_next",
2040 "rna_iterator_array_end",
2041 "rna_iterator_array_dereference_get",
2042 "rna_iterator_keyframestrip_channelbags_length",
2057 func,
"slot",
"ActionSlot",
"Slot",
"The slot for which to find the channelbag");
2062 "Create if necessary",
2063 "Ensure the channelbag exists for this slot, creating it if necessary");
2064 parm =
RNA_def_pointer(func,
"channels",
"ActionChannelbag",
"Channels",
"");
2075 "The slot that identifies which 'thing' should be keyed");
2078 parm =
RNA_def_string(func,
"data_path",
nullptr, 0,
"Data Path",
"F-Curve data path");
2088 "Index of the animated array element, or -1 if the property is not an array",
2099 "Value of the animated property",
2110 "Time, in frames, of the key",
2116 func,
"success",
true,
"Success",
"Whether the key was successfully inserted");
2133 {int(animrig::Strip::Type::Keyframe),
2137 "Strip with a set of F-Curves for each action slot"},
2138 {0,
nullptr, 0,
nullptr,
nullptr},
2161 srna,
"F-Curves",
"Collection of F-Curves for a specific action slot, on a specific strip");
2167 parm =
RNA_def_string(func,
"data_path",
nullptr, 0,
"Data Path",
"F-Curve data path to use");
2169 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"Index",
"Array index", 0, INT_MAX);
2176 "Name of the Group for this F-Curve, will be created if it does not exist yet");
2177 parm =
RNA_def_pointer(func,
"fcurve",
"FCurve",
"",
"Newly created F-Curve");
2180 func =
RNA_def_function(srna,
"new_from_fcurve",
"rna_Channelbag_fcurve_new_from_fcurve");
2182 func,
"Copy an F-Curve into the channelbag. The original F-Curve is unchanged");
2184 parm =
RNA_def_pointer(func,
"source",
"FCurve",
"Source F-Curve",
"The F-Curve to copy");
2191 "F-Curve data path to use. If not provided, this will use the same data "
2192 "path as the given F-Curve");
2193 parm =
RNA_def_pointer(func,
"fcurve",
"FCurve",
"",
"Newly created F-Curve");
2199 func,
"Returns the F-Curve if it already exists, and creates it if necessary");
2201 parm =
RNA_def_string(func,
"data_path",
nullptr, 0,
"Data Path",
"F-Curve data path to use");
2203 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"Index",
"Array index", 0, INT_MAX);
2209 "Name of the Group for this F-Curve, will be created if it does not exist "
2210 "yet. This parameter is ignored if the F-Curve already exists");
2211 parm =
RNA_def_pointer(func,
"fcurve",
"FCurve",
"",
"Found or newly created F-Curve");
2218 "Find an F-Curve. Note that this function performs a linear scan "
2219 "of all F-Curves in the channelbag.");
2221 parm =
RNA_def_string(func,
"data_path",
nullptr, 0,
"Data Path",
"F-Curve data path");
2223 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"Index",
"Array index", 0, INT_MAX);
2225 func,
"fcurve",
"FCurve",
"",
"The found F-Curve, or None if it does not exist");
2232 parm =
RNA_def_pointer(func,
"fcurve",
"FCurve",
"",
"F-Curve to remove");
2257 parm =
RNA_def_string(func,
"name",
"Group", 0,
"",
"New name for the action group");
2259 parm =
RNA_def_pointer(func,
"action_group",
"ActionGroup",
"",
"Newly created action group");
2265 parm =
RNA_def_pointer(func,
"action_group",
"ActionGroup",
"",
"Action group to remove");
2278 "Animation Channel Bag",
2279 "Collection of animation channels, typically associated with an action slot");
2294 "rna_iterator_Channelbag_fcurves_begin",
2295 "rna_iterator_array_next",
2296 "rna_iterator_array_end",
2297 "rna_iterator_array_dereference_get",
2298 "rna_iterator_Channelbag_fcurves_length",
2309 "rna_iterator_Channelbag_groups_begin",
2310 "rna_iterator_array_next",
2311 "rna_iterator_array_end",
2312 "rna_iterator_array_dereference_get",
2313 "rna_iterator_Channelbag_groups_length",
2321 "Groupings of F-Curves for display purposes, in e.g. the dopesheet and graph editor");
2353 "rna_ActionGroup_channels_begin",
2354 "rna_ActionGroup_channels_next",
2355 "rna_ActionGroup_channels_end",
2356 "rna_ActionGroup_channels_get",
2388 prop,
"Expanded in Graph Editor",
"Action group is expanded in graph editor");
2419 func,
"name",
"Marker", 0,
nullptr,
"New name for the marker (not unique)");
2421 parm =
RNA_def_pointer(func,
"marker",
"TimelineMarker",
"",
"Newly created marker");
2427 parm =
RNA_def_pointer(func,
"marker",
"TimelineMarker",
"",
"Timeline marker to remove");
2435 "rna_Action_active_pose_marker_get",
2436 "rna_Action_active_pose_marker_set",
2445 "rna_Action_active_pose_marker_index_get",
2446 "rna_Action_active_pose_marker_index_set",
2447 "rna_Action_active_pose_marker_index_range");
2468 prop,
"Is Empty",
"False when there is any Layer, Slot, or legacy F-Curve");
2476 "Return whether this is a legacy Action. Legacy Actions have no layers or slots. An "
2477 "empty Action is considered as both a 'legacy' and a 'layered' Action. Since Blender 4.4 "
2478 "actions are automatically updated to layered actions, and thus this will only return True "
2479 "when the action is empty");
2486 "Is Layered Action",
2487 "Return whether this is a layered Action. An empty Action is considered "
2488 "as both a 'legacy' and a 'layered' Action.");
2495 "rna_iterator_animation_slots_begin",
2496 "rna_iterator_array_next",
2497 "rna_iterator_array_end",
2498 "rna_iterator_array_dereference_get",
2499 "rna_iterator_animation_slots_length",
2509 "rna_iterator_action_layers_begin",
2510 "rna_iterator_array_next",
2511 "rna_iterator_array_end",
2512 "rna_iterator_array_dereference_get",
2513 "rna_iterator_action_layers_length",
2527 prop,
"Pose Markers",
"Markers specific to this action, for labeling poses");
2537 "Manual Frame Range",
2538 "Manually specify the intended playback frame range for the action "
2539 "(this range is used by some tools, but does not affect animation evaluation)");
2548 "The action is intended to be used as a cycle looping over its manually set "
2549 "playback frame range (enabling this does not automatically make it loop)");
2558 prop,
"Start Frame",
"The start frame of the manually set intended playback range");
2567 prop,
"End Frame",
"The end frame of the manually set intended playback range");
2578 "The intended playback frame range of this action, using the manually set range "
2579 "if available, or the combined frame range of all F-Curves within this action "
2580 "if not (assigning sets the manual frame range)",
2584 prop,
"rna_Action_frame_range_get",
"rna_Action_frame_range_set",
nullptr);
2588 "curve_frame_range",
2593 "Curve Frame Range",
2594 "The combined frame range of all F-Curves within this action",
2600 func =
RNA_def_function(srna,
"deselect_keys",
"rna_Action_deselect_keys");
2602 func,
"Deselects all keys of the Action. The selection status of F-Curves is unchanged.");
2606 srna,
"fcurve_ensure_for_datablock",
"rna_Action_fcurve_ensure_for_datablock");
2609 "Ensure that an F-Curve exists, with the given data path and array index, for the given "
2610 "data-block. This action must already be assigned to the data-block. This function will "
2611 "also create the layer, keyframe strip, and action slot if necessary, and take care of "
2612 "assigning the action slot too");
2619 "The data-block animated by this action, for which to ensure the F-Curve "
2620 "exists. This action must already be assigned to the data-block");
2622 parm =
RNA_def_string(func,
"data_path",
nullptr, 0,
"Data Path",
"F-Curve data path");
2624 RNA_def_int(func,
"index", 0, 0, INT_MAX,
"Index",
"Array index", 0, INT_MAX);
2630 "Name of the group for this F-Curve, if any. If the F-Curve already exists, this "
2631 "parameter is ignored");
2632 parm =
RNA_def_pointer(func,
"fcurve",
"FCurve",
"",
"The found or created F-Curve");
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
Functions to work with AnimData.
Functions to modify FCurves.
Functions to insert, delete or modify keyframes.
Blender kernel action and pose functionality.
void BKE_blender_atexit_register(void(*func)(void *user_data), void *user_data)
FCurve * BKE_fcurve_copy(const FCurve *fcu)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
@ RPT_ERROR_INVALID_INPUT
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_msg(a, msg)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
bool BLI_remlink_safe(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_ID_ID
void DEG_id_tag_update(ID *id, unsigned int flags)
@ ID_RECALC_ANIMATION_NO_FLUSH
@ ADS_FILTER_NOLIGHTPROBE
@ ADS_FILTER_DRIVER_FALLBACK_AS_ERROR
@ ADS_FILTER_NOMOVIECLIPS
@ ADS_FILTER_NOCACHEFILES
@ ADS_FILTER_NOPOINTCLOUD
@ ADS_FILTER_ONLY_SLOTS_OF_ACTIVE
@ ADS_FLAG_SHOW_DBFILTERS
@ ADS_FLAG_SUMMARY_COLLAPSED
@ ADT_CURVES_ALWAYS_VISIBLE
@ ANIMFILTER_DATA_VISIBLE
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
int UI_icon_from_idcode(int idcode)
void ANIM_animdata_freelist(ListBase *anim_data)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, const eAnimFilter_Flags filter_mode, void *data, const eAnimCont_Types datatype)
BMesh const char void * data
constexpr int64_t size() const
constexpr T * data() const
constexpr const T * data() const
constexpr int64_t first_index_try(const T &search_value) const
constexpr int64_t size() const
constexpr IndexRange index_range() const
void copy_unsafe(char *dst) const
constexpr int64_t size() const
void slot_active_set(slot_handle_t slot_handle)
void slot_display_name_define(Slot &slot, StringRefNull new_display_name)
void slot_identifier_propagate(Main &bmain, const Slot &slot)
void slot_idtype_define(Slot &slot, ID_Type idtype)
blender::Span< const Layer * > layers() const
bool is_action_layered() const
void slot_display_name_set(Main &bmain, Slot &slot, StringRefNull new_display_name)
Slot & slot_add_for_id_type(ID_Type idtype)
blender::Span< const Slot * > slots() const
bool layer_remove(Layer &layer_to_remove)
float2 get_frame_range_of_keys(bool include_modifiers) const ATTR_WARN_UNUSED_RESULT
void slot_identifier_define(Slot &slot, StringRefNull new_identifier)
bool slot_remove(Slot &slot_to_remove)
Slot * slot_for_handle(slot_handle_t handle)
Layer & layer_add(std::optional< StringRefNull > name)
blender::Span< const FCurve * > fcurves() const
blender::Span< const bActionGroup * > channel_groups() const
bool strip_remove(Action &owning_action, Strip &strip)
blender::Span< const Strip * > strips() const
const Strip * strip(int64_t index) const
Strip & strip_add(Action &owning_action, Strip::Type strip_type)
StringRef identifier_prefix() const
std::string idtype_string() const
static constexpr int identifier_length_min
Span< ID * > users(Main &bmain) const
static constexpr slot_handle_t unassigned
StringRefNull identifier_without_prefix() const
const Channelbag * channelbag_for_slot(const Slot &slot) const
int64_t find_channelbag_index(const Channelbag &channelbag) const
Channelbag & channelbag_for_slot_add(const Slot &slot)
SingleKeyingResult keyframe_insert(Main *bmain, const Slot &slot, const FCurveDescriptor &fcurve_descriptor, float2 time_value, const KeyframeSettings &settings, eInsertKeyFlags insert_key_flags=INSERTKEY_NOFLAGS, std::optional< float2 > cycle_range=std::nullopt)
Channelbag & channelbag_for_slot_ensure(const Slot &slot)
blender::Span< const Channelbag * > channelbags() const
bool channelbag_remove(Channelbag &channelbag_to_remove)
const T & data(const Action &owning_action) const
DEG_id_tag_update_ex(cb_data->bmain, cb_data->owner_id, ID_RECALC_TAG_FOR_UNDO|ID_RECALC_SYNC_TO_EVAL)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
bool action_treat_as_legacy(const bAction &action)
KeyframeSettings get_keyframe_settings(bool from_userprefs)
void action_deselect_keys(Action &action)
Slot & duplicate_slot(Action &action, const Slot &slot)
bool is_action_assignable_to(const bAction *dna_action, ID_Type id_code)
Action * get_action(ID &animated_id)
FCurve & action_fcurve_ensure(Main *bmain, bAction &action, ID &animated_id, const FCurveDescriptor &fcurve_descriptor)
float wrap(float value, float max, float min)
static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
const EnumPropertyItem rna_enum_id_type_items[]
const PointerRNA PointerRNA_NULL
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, size_t itemsize, int64_t length, bool free_ptr, IteratorSkipFunc skip)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
static void rna_def_action_slots(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_channelbag_fcurves(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_action_slot(BlenderRNA *brna)
static void rna_def_channelbag_groups(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_action_keyframe_strip(BlenderRNA *brna)
static void rna_def_action(BlenderRNA *brna)
static void rna_def_ActionLayer_strips(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_action_channelbag(BlenderRNA *brna)
const EnumPropertyItem default_ActionSlot_target_id_type_items[]
static void rna_def_dopesheet(BlenderRNA *brna)
static void rna_def_action_layer(BlenderRNA *brna)
static void rna_def_keyframestrip_channelbags(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_strip_type_items[]
void RNA_def_action(BlenderRNA *brna)
static void rna_def_action_layers(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_action_strip(BlenderRNA *brna)
static void rna_def_action_group(BlenderRNA *brna)
static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_api_action(StructRNA *srna)
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)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
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_define_lib_overridable(const bool make_overridable)
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_function_return(FunctionRNA *func, PropertyRNA *ret)
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_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
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)
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_property_update_notifier(PropertyRNA *prop, const int noteflag)
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_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_property_string_maxlength(PropertyRNA *prop, int maxlength)
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)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
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_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
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_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
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)
std::optional< std::string > rna_Channelbag_path(const PointerRNA *ptr)
bool rna_Action_actedit_assign_poll(PointerRNA *ptr, PointerRNA value)
void rna_def_actionbone_group_common(StructRNA *srna, int update_flag, const char *update_cb)
bool rna_Action_id_poll(PointerRNA *ptr, PointerRNA value)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
struct FCurve ** fcurve_array
union CollectionPropertyIterator::@220100362304005352221007113371015217044252346141 internal
eDopeSheet_FilterFlag flag
struct bAnimContext::@242276144047124000362312251357014355232301013033 filters
std::optional< blender::StringRefNull > channel_group
void WM_global_report(eReportType type, const char *message)
void WM_main_add_notifier(uint type, void *reference)
void WM_global_reportf(eReportType type, const char *format,...)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)