Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Basnett <cmbasnett>2022-06-23 12:41:44 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-06-23 12:45:53 +0300
commit091100bfd757b886527b465aef19a88ba261d7ec (patch)
treeaf7b67293092d1207f38421b477b0ae62ed6e4db /source/blender/blenkernel/BKE_action.h
parent2ae4397ec9905a0055ad80675ade2696137a7ca2 (diff)
Animation: Add function to remove all FCurves from an Action
Add a `BKE_action_fcurves_clear(action)` function, which removes all the Action's FCurves, and expose it as `ActionFCurves.clear()` in RNA. This is more ergonomic than calling `remove` on f-curves until the list is empty. Reviewed By: sybren Differential Revision: https://developer.blender.org/D14660
Diffstat (limited to 'source/blender/blenkernel/BKE_action.h')
-rw-r--r--source/blender/blenkernel/BKE_action.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index d5487b3558a..79d0fe6e20a 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -92,6 +92,11 @@ bool action_has_motion(const struct bAction *act);
*/
bool BKE_action_is_cyclic(const struct bAction *act);
+/**
+ * Remove all fcurves from the action.
+ */
+void BKE_action_fcurves_clear(struct bAction *act);
+
/* Action Groups API ----------------- */
/**