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:
authorSybren A. Stüvel <sybren@blender.org>2021-07-12 14:18:09 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-07-15 17:12:36 +0300
commitf3610a23d12bc9e490bb8d58120336de9a6cb196 (patch)
tree5a566a415e85056218685b2ede838d5562d5d93a /source/blender/editors/include/ED_armature.h
parent28dc07a153dd2c16260fb0c824a4f65ab3a06493 (diff)
Animation: new pose library based on Asset Browser
Introduce new pose library, based on the Asset Browser. Contrary to the old pose library (in `editors/armature/pose_lib.c`), which stored an entire library of poses in an `Action`, in the new library each pose is its own `Action` datablock. This is done for compatibility with the asset browser, and also to make it easier to attach preview images, share datablocks, etc. Furthermore, it opens the door to having animation snippets in the pose library as well. This commit contains the C code for the pose library; in order to fully use it, an addon is required as well (which will be committed shortly).
Diffstat (limited to 'source/blender/editors/include/ED_armature.h')
-rw-r--r--source/blender/editors/include/ED_armature.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 85563b76f38..eaa54f66928 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -23,10 +23,15 @@
#pragma once
+#include <stdbool.h>
+
+#include "BLI_listbase.h"
+
#ifdef __cplusplus
extern "C" {
#endif
+struct bAction;
struct Base;
struct Bone;
struct Depsgraph;
@@ -242,6 +247,17 @@ void ED_mesh_deform_bind_callback(struct MeshDeformModifierData *mmd,
int totvert,
float cagemat[4][4]);
+/* Pose backups, pose_backup.c */
+struct PoseBackup;
+/* Create a backup of those bones that are animated in the given action. */
+struct PoseBackup *ED_pose_backup_create_selected_bones(
+ const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT;
+struct PoseBackup *ED_pose_backup_create_all_bones(
+ const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT;
+bool ED_pose_backup_is_selection_relevant(const struct PoseBackup *pose_backup);
+void ED_pose_backup_restore(const struct PoseBackup *pose_backup);
+void ED_pose_backup_free(struct PoseBackup *pose_backup);
+
#ifdef __cplusplus
}
#endif