Blender V4.3
BKE_pose_backup.h File Reference
#include <stdbool.h>
#include "BLI_listbase.h"

Go to the source code of this file.

Functions

struct PoseBackupBKE_pose_backup_create_selected_bones (const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT
 
struct PoseBackupBKE_pose_backup_create_all_bones (const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT
 
bool BKE_pose_backup_is_selection_relevant (const struct PoseBackup *pose_backup)
 
void BKE_pose_backup_restore (const struct PoseBackup *pbd)
 
void BKE_pose_backup_free (struct PoseBackup *pbd)
 
void BKE_pose_backup_create_on_object (struct Object *ob, const struct bAction *action)
 
bool BKE_pose_backup_restore_on_object (struct Object *ob)
 
void BKE_pose_backup_clear (struct Object *ob)
 

Detailed Description

Pose Backups can be created from the current pose, and later restored. The backup is restricted to those bones animated by a given Action, so that operations are as fast as possible.

Definition in file BKE_pose_backup.h.

Function Documentation

◆ BKE_pose_backup_clear()

void BKE_pose_backup_clear ( struct Object * ob)

Free the pose backup that was stored on this object's runtime data.

Definition at line 157 of file pose_backup.cc.

References BKE_pose_backup_free(), and Object::runtime.

Referenced by BKE_object_free_derived_caches(), and BKE_pose_backup_create_on_object().

◆ BKE_pose_backup_create_all_bones()

struct PoseBackup * BKE_pose_backup_create_all_bones ( const struct Object * ob,
const struct bAction * action )

Create a backup of those bones that are animated in the given action.

The backup is owned by the caller, and should be freed with BKE_pose_backup_free().

Referenced by action_preview_render_prepare().

◆ BKE_pose_backup_create_on_object()

void BKE_pose_backup_create_on_object ( struct Object * ob,
const struct bAction * action )

Create a backup of those bones that are animated in the given action.

The backup is owned by the Object, and there can be only one backup at a time. It should be freed with BKE_pose_backup_clear(ob).

◆ BKE_pose_backup_create_selected_bones()

struct PoseBackup * BKE_pose_backup_create_selected_bones ( const struct Object * ob,
const struct bAction * action )

Create a backup of those bones that are selected AND animated in the given action.

The backup is owned by the caller, and should be freed with BKE_pose_backup_free().

Referenced by poselib_backup_posecopy().

◆ BKE_pose_backup_free()

◆ BKE_pose_backup_is_selection_relevant()

bool BKE_pose_backup_is_selection_relevant ( const struct PoseBackup * pose_backup)

Referenced by poselib_keytag_pose().

◆ BKE_pose_backup_restore()

void BKE_pose_backup_restore ( const struct PoseBackup * pbd)

◆ BKE_pose_backup_restore_on_object()

bool BKE_pose_backup_restore_on_object ( struct Object * ob)

Restore the pose backup owned by this OBject.

Returns
true on success, false if there was no pose backup to restore.
See also
BKE_pose_backup_create_on_object

Definition at line 148 of file pose_backup.cc.

References BKE_pose_backup_restore(), and Object::runtime.