Blender V4.3
editarmature_undo.cc File Reference
#include "MEM_guardedalloc.h"
#include "CLG_log.h"
#include "DNA_armature_types.h"
#include "DNA_layer_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_array_utils.h"
#include "BLI_listbase.h"
#include "BLI_map.hh"
#include "BLI_string.h"
#include "BKE_armature.hh"
#include "BKE_context.hh"
#include "BKE_idprop.hh"
#include "BKE_layer.hh"
#include "BKE_main.hh"
#include "BKE_object.hh"
#include "BKE_undo_system.hh"
#include "DEG_depsgraph.hh"
#include "ED_armature.hh"
#include "ED_object.hh"
#include "ED_undo.hh"
#include "ED_util.hh"
#include "ANIM_bone_collections.hh"
#include "WM_api.hh"
#include "WM_types.hh"

Go to the source code of this file.

Classes

struct  UndoArmature
 
struct  ArmatureUndoStep_Elem
 
struct  ArmatureUndoStep
 

Functions

static void remap_ebone_bone_collection_references (ListBase *edit_bones, const blender::Map< BoneCollection *, BoneCollection * > &bcoll_map)
 
Undo Conversion
static void undoarm_to_editarm (UndoArmature *uarm, bArmature *arm)
 
static void * undoarm_from_editarm (UndoArmature *uarm, bArmature *arm)
 
static void undoarm_free_data (UndoArmature *uarm)
 
static Objecteditarm_object_from_context (bContext *C)
 
Implements ED Undo System
Note
This is similar for all edit-mode types.
static bool armature_undosys_poll (bContext *C)
 
static bool armature_undosys_step_encode (bContext *C, Main *bmain, UndoStep *us_p)
 
static void armature_undosys_step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir, bool)
 
static void armature_undosys_step_free (UndoStep *us_p)
 
static void armature_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
 
void ED_armature_undosys_type (UndoType *ut)
 

Variables

static CLG_LogRef LOG = {"ed.undo.armature"}
 

Function Documentation

◆ armature_undosys_foreach_ID_ref()

static void armature_undosys_foreach_ID_ref ( UndoStep * us_p,
UndoTypeForEachIDRefFn foreach_ID_ref_fn,
void * user_data )
static

◆ armature_undosys_poll()

static bool armature_undosys_poll ( bContext * C)
static

◆ armature_undosys_step_decode()

◆ armature_undosys_step_encode()

◆ armature_undosys_step_free()

static void armature_undosys_step_free ( UndoStep * us_p)
static

◆ ED_armature_undosys_type()

◆ editarm_object_from_context()

◆ remap_ebone_bone_collection_references()

static void remap_ebone_bone_collection_references ( ListBase * edit_bones,
const blender::Map< BoneCollection *, BoneCollection * > & bcoll_map )
static

Remaps edit-bone collection membership.

This is intended to be used in combination with ED_armature_ebone_listbase_copy() and ANIM_bonecoll_listbase_copy() to make a full duplicate of both edit bones and collections together.

Definition at line 57 of file editarmature_undo.cc.

References LISTBASE_FOREACH, and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup().

Referenced by undoarm_from_editarm(), and undoarm_to_editarm().

◆ undoarm_free_data()

◆ undoarm_from_editarm()

◆ undoarm_to_editarm()

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"ed.undo.armature"}
static

We only need this locally.

Definition at line 46 of file editarmature_undo.cc.

Referenced by armature_undosys_step_decode().