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

paint_undo.c File Reference

#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "ED_sculpt.h"
#include "paint_intern.h"

Go to the source code of this file.

Classes

struct  UndoElem
struct  UndoStack

Defines

#define MAXUNDONAME   64

Typedefs

typedef struct UndoElem UndoElem
typedef struct UndoStack UndoStack

Functions

static void undo_restore (bContext *C, UndoStack *UNUSED(stack), UndoElem *uel)
static void undo_elem_free (UndoStack *UNUSED(stack), UndoElem *uel)
static void undo_stack_push_begin (UndoStack *stack, const char *name, UndoRestoreCb restore, UndoFreeCb free)
static void undo_stack_push_end (UndoStack *stack)
static int undo_stack_step (bContext *C, UndoStack *stack, int step, const char *name)
static void undo_stack_free (UndoStack *stack)
void undo_paint_push_begin (int type, const char *name, UndoRestoreCb restore, UndoFreeCb free)
ListBaseundo_paint_push_get_list (int type)
void undo_paint_push_count_alloc (int type, int size)
void undo_paint_push_end (int type)
int ED_undo_paint_step (bContext *C, int type, int step, const char *name)
int ED_undo_paint_valid (int type, const char *name)
void ED_undo_paint_free (void)

Variables

static UndoStack ImageUndoStack = {UNDO_PAINT_IMAGE, {NULL, NULL}, NULL}
static UndoStack MeshUndoStack = {UNDO_PAINT_MESH, {NULL, NULL}, NULL}

Detailed Description

Definition in file paint_undo.c.


Define Documentation

#define MAXUNDONAME   64

Definition at line 48 of file paint_undo.c.


Typedef Documentation

typedef struct UndoElem UndoElem
typedef struct UndoStack UndoStack

Function Documentation

void ED_undo_paint_free ( void  )

Definition at line 268 of file paint_undo.c.

References undo_stack_free().

Referenced by ED_editors_exit().

int ED_undo_paint_step ( bContext C,
int  type,
int  step,
const char *  name 
)

Definition at line 237 of file paint_undo.c.

References UNDO_PAINT_IMAGE, UNDO_PAINT_MESH, and undo_stack_step().

Referenced by ed_undo_step().

int ED_undo_paint_valid ( int  type,
const char *  name 
)
static void undo_elem_free ( UndoStack UNUSEDstack,
UndoElem uel 
) [static]
void undo_paint_push_begin ( int  type,
const char *  name,
UndoRestoreCb  restore,
UndoFreeCb  free 
)
void undo_paint_push_count_alloc ( int  type,
int  size 
)
void undo_paint_push_end ( int  type)

Definition at line 229 of file paint_undo.c.

References UNDO_PAINT_IMAGE, UNDO_PAINT_MESH, and undo_stack_push_end().

Referenced by paint_exit(), and sculpt_undo_push_end().

ListBase* undo_paint_push_get_list ( int  type) [read]
static void undo_restore ( bContext C,
UndoStack UNUSEDstack,
UndoElem uel 
) [static]

Definition at line 72 of file paint_undo.c.

References UndoElem::elems, and UndoElem::restore.

Referenced by undo_stack_step().

static void undo_stack_free ( UndoStack stack) [static]
static void undo_stack_push_begin ( UndoStack stack,
const char *  name,
UndoRestoreCb  restore,
UndoFreeCb  free 
) [static]
static void undo_stack_push_end ( UndoStack stack) [static]
static int undo_stack_step ( bContext C,
UndoStack stack,
int  step,
const char *  name 
) [static]

Variable Documentation

UndoStack ImageUndoStack = {UNDO_PAINT_IMAGE, {NULL, NULL}, NULL} [static]

Definition at line 67 of file paint_undo.c.

Referenced by ED_undo_paint_valid().

UndoStack MeshUndoStack = {UNDO_PAINT_MESH, {NULL, NULL}, NULL} [static]

Definition at line 68 of file paint_undo.c.

Referenced by ED_undo_paint_valid().