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:
authorSiddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in>2021-12-17 16:01:32 +0300
committerSiddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in>2021-12-17 16:01:32 +0300
commitdbc41b30f88b96f7d8c6e995b17f5930eb55cc77 (patch)
treec6c495328443ea3621e5df2ef483b0e0dd504496 /source/blender/blenkernel/BKE_anim_data.h
parent99a2af76d10e05a18987be5d554ada197b1ca086 (diff)
parent7c9e4099854a4fc8eab4db97173c1aacd25f9e08 (diff)
Merge branch 'master' into soc-2021-uv-edge-select-supportsoc-2021-uv-edge-select-support
Diffstat (limited to 'source/blender/blenkernel/BKE_anim_data.h')
-rw-r--r--source/blender/blenkernel/BKE_anim_data.h63
1 files changed, 52 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_anim_data.h b/source/blender/blenkernel/BKE_anim_data.h
index 14ab9f21424..a65efbd707c 100644
--- a/source/blender/blenkernel/BKE_anim_data.h
+++ b/source/blender/blenkernel/BKE_anim_data.h
@@ -43,43 +43,81 @@ struct bAction;
/* ************************************* */
/* AnimData API */
-/* Check if the given ID-block can have AnimData */
+/**
+ * Check if the given ID-block can have AnimData.
+ */
bool id_type_can_have_animdata(const short id_type);
bool id_can_have_animdata(const struct ID *id);
-/* Get AnimData from the given ID-block */
+/**
+ * Get #AnimData from the given ID-block.
+ */
struct AnimData *BKE_animdata_from_id(struct ID *id);
-/* Ensure AnimData is present in the ID-block (when supported). */
+/**
+ * Ensure #AnimData exists in the given ID-block (when supported).
+ */
struct AnimData *BKE_animdata_ensure_id(struct ID *id);
-/* Set active action used by AnimData from the given ID-block */
+/**
+ * Set active action used by AnimData from the given ID-block.
+ *
+ * Called when user tries to change the active action of an #AnimData block
+ * (via RNA, Outliner, etc.)
+ *
+ * \param reports: Can be NULL.
+ * \param id: The owner of the animation data
+ * \param act: The Action to set, or NULL to clear.
+ *
+ * \return true when the action was successfully updated, false otherwise.
+ */
bool BKE_animdata_set_action(struct ReportList *reports, struct ID *id, struct bAction *act);
bool BKE_animdata_action_editable(const struct AnimData *adt);
-/* Ensure that the action's idroot is set correctly given the ID type of the owner.
- * Return true if it is, false if it was already set to an incompatible type. */
+/**
+ * Ensure that the action's idroot is set correctly given the ID type of the owner.
+ * Return true if it is, false if it was already set to an incompatible type.
+ */
bool BKE_animdata_action_ensure_idroot(const struct ID *owner, struct bAction *action);
-/* Free AnimData */
+/**
+ * Free AnimData used by the nominated ID-block, and clear ID-block's AnimData pointer.
+ */
void BKE_animdata_free(struct ID *id, const bool do_id_user);
-/* Return true if the ID-block has non-empty AnimData. */
+/**
+ * Return true if the ID-block has non-empty AnimData.
+ */
bool BKE_animdata_id_is_animated(const struct ID *id);
+/**
+ * Callback used by lib_query to walk over all ID usages
+ * (mimics `foreach_id` callback of #IDTypeInfo structure).
+ */
void BKE_animdata_foreach_id(struct AnimData *adt, struct LibraryForeachIDData *data);
-/* Copy AnimData */
+/**
+ * Make a copy of the given AnimData - to be used when copying data-blocks.
+ * \param flag: Control ID pointers management,
+ * see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.h
+ * \return The copied animdata.
+ */
struct AnimData *BKE_animdata_copy(struct Main *bmain, struct AnimData *adt, const int flag);
-/* Copy AnimData */
+/**
+ * \param flag: Control ID pointers management,
+ * see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.h
+ * \return true is successfully copied.
+ */
bool BKE_animdata_copy_id(struct Main *bmain,
struct ID *id_to,
struct ID *id_from,
const int flag);
-/* Copy AnimData Actions */
+/**
+ * Copy AnimData Actions.
+ */
void BKE_animdata_copy_id_action(struct Main *bmain, struct ID *id);
void BKE_animdata_duplicate_id_action(struct Main *bmain,
@@ -98,6 +136,9 @@ typedef enum eAnimData_MergeCopy_Modes {
ADT_MERGECOPY_SRC_REF = 2,
} eAnimData_MergeCopy_Modes;
+/**
+ * Merge copies of the data from the src AnimData into the destination AnimData.
+ */
void BKE_animdata_merge_copy(struct Main *bmain,
struct ID *dst_id,
struct ID *src_id,