|
Blender V4.3
|
#include "BKE_pose_backup.h"#include <cstring>#include "BLI_listbase.h"#include "MEM_guardedalloc.h"#include "DNA_action_types.h"#include "DNA_armature_types.h"#include "DNA_object_types.h"#include "BKE_action.hh"#include "BKE_armature.hh"#include "BKE_idprop.hh"#include "BKE_object_types.hh"Go to the source code of this file.
Classes | |
| struct | PoseChannelBackup |
| struct | PoseBackup |
Functions | |
| static PoseBackup * | pose_backup_create (const Object *ob, const bAction *action, const BoneNameSet &selected_bone_names) |
| PoseBackup * | BKE_pose_backup_create_all_bones (const Object *ob, const bAction *action) |
| PoseBackup * | BKE_pose_backup_create_selected_bones (const Object *ob, const bAction *action) |
| bool | BKE_pose_backup_is_selection_relevant (const PoseBackup *pose_backup) |
| void | BKE_pose_backup_restore (const PoseBackup *pbd) |
| void | BKE_pose_backup_free (PoseBackup *pbd) |
| void | BKE_pose_backup_create_on_object (Object *ob, const bAction *action) |
| bool | BKE_pose_backup_restore_on_object (Object *ob) |
| void | BKE_pose_backup_clear (Object *ob) |
| 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().
| PoseBackup * BKE_pose_backup_create_all_bones | ( | const Object * | ob, |
| const bAction * | action ) |
Definition at line 99 of file pose_backup.cc.
References pose_backup_create().
Referenced by BKE_pose_backup_create_on_object().
Definition at line 141 of file pose_backup.cc.
References BKE_pose_backup_clear(), BKE_pose_backup_create_all_bones(), and Object::runtime.
| PoseBackup * BKE_pose_backup_create_selected_bones | ( | const Object * | ob, |
| const bAction * | action ) |
Definition at line 104 of file pose_backup.cc.
References blender::bke::BKE_armature_find_selected_bone_names(), Object::data, and pose_backup_create().
| void BKE_pose_backup_free | ( | PoseBackup * | pbd | ) |
Definition at line 130 of file pose_backup.cc.
References PoseBackup::backups, BLI_freelinkN(), IDP_FreeProperty(), LISTBASE_FOREACH_MUTABLE, and MEM_freeN().
Referenced by action_preview_render_cleanup(), BKE_pose_backup_clear(), poselib_blend_free(), and poselib_toggle_flipped().
| bool BKE_pose_backup_is_selection_relevant | ( | const PoseBackup * | pose_backup | ) |
Definition at line 111 of file pose_backup.cc.
References PoseBackup::is_bone_selection_relevant.
| void BKE_pose_backup_restore | ( | const PoseBackup * | pbd | ) |
Definition at line 116 of file pose_backup.cc.
References PoseBackup::backups, IDP_SyncGroupValues(), and LISTBASE_FOREACH.
Referenced by BKE_pose_backup_restore_on_object().
| bool BKE_pose_backup_restore_on_object | ( | struct Object * | ob | ) |
Restore the pose backup owned by this OBject.
Definition at line 148 of file pose_backup.cc.
References BKE_pose_backup_restore(), and Object::runtime.
|
static |
Create a backup of the pose, for only those bones that are animated in the given Action. If selected_bone_names is not empty, the set of bones to back up is intersected with these bone names such that only the selected subset is backed up.
The returned pointer is owned by the caller.
Definition at line 51 of file pose_backup.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), PoseBackup::backups, blender::bke::BKE_action_find_fcurves_with_bones(), BKE_pose_channel_find_name(), BLI_addtail(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), IDP_CopyProperty(), PoseBackup::is_bone_selection_relevant, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), MEM_callocN, PoseChannelBackup::olddata, PoseChannelBackup::oldprops, PoseChannelBackup::pchan, Object::pose, and bPoseChannel::prop.
Referenced by BKE_pose_backup_create_all_bones(), and BKE_pose_backup_create_selected_bones().