Blender V4.3
editmball_undo.cc File Reference
#include <cmath>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "CLG_log.h"
#include "BLI_array_utils.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "DNA_defs.h"
#include "DNA_layer_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_context.hh"
#include "BKE_layer.hh"
#include "BKE_main.hh"
#include "BKE_object.hh"
#include "BKE_undo_system.hh"
#include "DEG_depsgraph.hh"
#include "ED_mball.hh"
#include "ED_object.hh"
#include "ED_undo.hh"
#include "ED_util.hh"
#include "WM_api.hh"
#include "WM_types.hh"

Go to the source code of this file.

Classes

struct  UndoMBall
 
struct  MBallUndoStep_Elem
 
struct  MBallUndoStep
 

Functions

Undo Conversion
static void freeMetaElemlist (ListBase *lb)
 
static void undomball_to_editmball (UndoMBall *umb, MetaBall *mb)
 
static void * editmball_from_undomball (UndoMBall *umb, MetaBall *mb)
 
static void undomball_free_data (UndoMBall *umb)
 
static Objecteditmball_object_from_context (bContext *C)
 
Implements ED Undo System
Note
This is similar for all edit-mode types.
static bool mball_undosys_poll (bContext *C)
 
static bool mball_undosys_step_encode (bContext *C, Main *bmain, UndoStep *us_p)
 
static void mball_undosys_step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir, bool)
 
static void mball_undosys_step_free (UndoStep *us_p)
 
static void mball_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
 
void ED_mball_undosys_type (UndoType *ut)
 

Variables

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

Function Documentation

◆ ED_mball_undosys_type()

◆ editmball_from_undomball()

◆ editmball_object_from_context()

◆ freeMetaElemlist()

static void freeMetaElemlist ( ListBase * lb)
static

Definition at line 56 of file editmball_undo.cc.

References BLI_pophead(), and MEM_freeN().

Referenced by undomball_free_data(), and undomball_to_editmball().

◆ mball_undosys_foreach_ID_ref()

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

◆ mball_undosys_poll()

static bool mball_undosys_poll ( bContext * C)
static

◆ mball_undosys_step_decode()

◆ mball_undosys_step_encode()

◆ mball_undosys_step_free()

static void mball_undosys_step_free ( UndoStep * us_p)
static

◆ undomball_free_data()

static void undomball_free_data ( UndoMBall * umb)
static

Definition at line 109 of file editmball_undo.cc.

References UndoMBall::editelems, and freeMetaElemlist().

Referenced by mball_undosys_step_free().

◆ undomball_to_editmball()

static void undomball_to_editmball ( UndoMBall * umb,
MetaBall * mb )
static

Variable Documentation

◆ LOG

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

We only need this locally.

Definition at line 43 of file editmball_undo.cc.

Referenced by mball_undosys_step_decode().