Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

editmode_undo.c File Reference

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "ED_util.h"
#include "ED_mesh.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "util_intern.h"

Go to the source code of this file.

Classes

struct  UndoElem

Defines

#define MAXUNDONAME   64

Typedefs

typedef struct UndoElem UndoElem

Functions

static void error (const char *UNUSED(arg))
static void undo_restore (UndoElem *undo, void *editdata)
void undo_editmode_push (bContext *C, const char *name, void *(*getdata)(bContext *C), void(*freedata)(void *), void(*to_editmode)(void *, void *), void *(*from_editmode)(void *), int(*validate_undo)(void *, void *))
static void undo_clean_stack (bContext *C)
void undo_editmode_step (bContext *C, int step)
void undo_editmode_clear (void)
void undo_editmode_number (bContext *C, int nr)
void undo_editmode_name (bContext *C, const char *undoname)
int undo_editmode_valid (const char *undoname)
const char * undo_editmode_get_name (bContext *C, int nr, int *active)
void * undo_editmode_get_prev (Object *ob)

Variables

static ListBase undobase = {NULL, NULL}
static UndoElemcurundo = NULL

Detailed Description

Definition in file editmode_undo.c.


Define Documentation

#define MAXUNDONAME   64

Definition at line 88 of file editmode_undo.c.


Typedef Documentation

typedef struct UndoElem UndoElem

Function Documentation

static void error ( const char *  UNUSEDarg) [static]

Definition at line 84 of file editmode_undo.c.

Referenced by undo_editmode_step().

static void undo_clean_stack ( bContext C) [static]
void undo_editmode_clear ( void  )
const char* undo_editmode_get_name ( bContext C,
int  nr,
int *  active 
)

Definition at line 341 of file editmode_undo.c.

References BLI_findlink(), UndoElem::name, NULL, and undo_clean_stack().

Referenced by rna_undo_itemf().

void* undo_editmode_get_prev ( Object ob)

Definition at line 360 of file editmode_undo.c.

References ListBase::last, NULL, UndoElem::ob, UndoElem::prev, and UndoElem::undodata.

void undo_editmode_name ( bContext C,
const char *  undoname 
)

Definition at line 309 of file editmode_undo.c.

References ListBase::last, UndoElem::name, UndoElem::prev, and undo_editmode_step().

Referenced by ed_undo_step().

void undo_editmode_number ( bContext C,
int  nr 
)

Definition at line 297 of file editmode_undo.c.

References ListBase::first, UndoElem::next, and undo_editmode_step().

Referenced by undo_history_exec().

void undo_editmode_push ( bContext C,
const char *  name,
void *(*)(bContext *C)  getdata,
void(*)(void *)  freedata,
void(*)(void *, void *)  to_editmode,
void *(*)(void *)  from_editmode,
int(*)(void *, void *)  validate_undo 
)
void undo_editmode_step ( bContext C,
int  step 
)
int undo_editmode_valid ( const char *  undoname)

Definition at line 324 of file editmode_undo.c.

References ListBase::first, ListBase::last, UndoElem::name, NULL, and UndoElem::prev.

Referenced by ED_undo_valid().

static void undo_restore ( UndoElem undo,
void *  editdata 
) [static]

Definition at line 110 of file editmode_undo.c.

References UndoElem::to_editmode, and UndoElem::undodata.

Referenced by undo_editmode_step().


Variable Documentation

UndoElem* curundo = NULL [static]

Definition at line 105 of file editmode_undo.c.

ListBase undobase = {NULL, NULL} [static]

Definition at line 104 of file editmode_undo.c.