Blender  V3.3
Classes | Variables
editmball_undo.c File Reference
#include <math.h>
#include <string.h>
#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.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_undo_system.h"
#include "DEG_depsgraph.h"
#include "ED_mball.h"
#include "ED_object.h"
#include "ED_undo.h"
#include "ED_util.h"
#include "WM_api.h"
#include "WM_types.h"

Go to the source code of this file.

Classes

struct  UndoMBall
 
struct  MBallUndoStep_Elem
 
struct  MBallUndoStep
 

Variables

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

Undo Conversion

typedef struct UndoMBall UndoMBall
 
static void freeMetaElemlist (ListBase *lb)
 
static void undomball_to_editmball (UndoMBall *umb, MetaBall *mb)
 
static voideditmball_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.
typedef struct MBallUndoStep_Elem MBallUndoStep_Elem
 
typedef struct MBallUndoStep MBallUndoStep
 
static bool mball_undosys_poll (bContext *C)
 
static bool mball_undosys_step_encode (struct bContext *C, struct Main *bmain, UndoStep *us_p)
 
static void mball_undosys_step_decode (struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final))
 
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)
 

Typedef Documentation

◆ MBallUndoStep

typedef struct MBallUndoStep MBallUndoStep

◆ MBallUndoStep_Elem

◆ UndoMBall

typedef struct UndoMBall UndoMBall

Function Documentation

◆ ED_mball_undosys_type()

void ED_mball_undosys_type ( struct UndoType ut)

◆ editmball_from_undomball()

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

◆ editmball_object_from_context()

static Object* editmball_object_from_context ( bContext C)
static

◆ freeMetaElemlist()

static void freeMetaElemlist ( ListBase lb)
static

Definition at line 54 of file editmball_undo.c.

References BLI_pophead(), MEM_freeN, and NULL.

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

Definition at line 142 of file editmball_undo.c.

References C, editmball_object_from_context(), and NULL.

Referenced by ED_mball_undosys_type(), and mball_undosys_step_decode().

◆ mball_undosys_step_decode()

static void mball_undosys_step_decode ( struct bContext C,
struct Main bmain,
UndoStep us_p,
const eUndoStepDir   UNUSEDdir,
bool   UNUSEDis_final 
)
static

◆ mball_undosys_step_encode()

static bool mball_undosys_step_encode ( struct bContext C,
struct Main bmain,
UndoStep us_p 
)
static

◆ 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 105 of file editmball_undo.c.

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 41 of file editmball_undo.c.

Referenced by mball_undosys_step_decode().