Blender V2.61 - r43446
|
#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) |
ListBase * | undo_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} |
Definition in file paint_undo.c.
#define MAXUNDONAME 64 |
Definition at line 48 of file paint_undo.c.
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 | ||
) |
Definition at line 247 of file paint_undo.c.
References UndoStack::current, UndoStack::elems, ListBase::first, ImageUndoStack, ListBase::last, MeshUndoStack, UndoElem::name, NULL, stack, UNDO_PAINT_IMAGE, and UNDO_PAINT_MESH.
Referenced by ED_undo_valid().
Definition at line 78 of file paint_undo.c.
References BLI_freelistN(), UndoElem::elems, and UndoElem::free.
Referenced by undo_stack_free(), undo_stack_push_begin(), and undo_stack_push_end().
void undo_paint_push_begin | ( | int | type, |
const char * | name, | ||
UndoRestoreCb | restore, | ||
UndoFreeCb | free | ||
) |
Definition at line 199 of file paint_undo.c.
References UNDO_PAINT_IMAGE, UNDO_PAINT_MESH, and undo_stack_push_begin().
Referenced by sculpt_undo_push_begin(), texture_paint_camera_project_exec(), and texture_paint_init().
void undo_paint_push_count_alloc | ( | int | type, |
int | size | ||
) |
Definition at line 221 of file paint_undo.c.
References UndoStack::current, size(), UNDO_PAINT_IMAGE, UNDO_PAINT_MESH, and UndoElem::undosize.
Referenced by image_undo_push_tile(), and sculpt_undo_push_node().
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] |
Definition at line 207 of file paint_undo.c.
References UndoStack::current, UndoElem::elems, NULL, UNDO_PAINT_IMAGE, and UNDO_PAINT_MESH.
Referenced by image_undo_push_tile(), sculpt_undo_get_node(), sculpt_undo_push_end(), and sculpt_undo_push_node().
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] |
Definition at line 186 of file paint_undo.c.
References BLI_freelistN(), UndoStack::current, UndoStack::elems, ListBase::first, UndoElem::next, NULL, and undo_elem_free().
Referenced by ED_undo_paint_free().
static void undo_stack_push_begin | ( | UndoStack * | stack, |
const char * | name, | ||
UndoRestoreCb | restore, | ||
UndoFreeCb | free | ||
) | [static] |
Definition at line 86 of file paint_undo.c.
References BLI_addtail(), BLI_freelinkN(), BLI_strncpy(), UndoStack::current, UndoStack::elems, ListBase::first, addon::engine::free(), UndoElem::free, ListBase::last, MEM_callocN(), UndoElem::name, UndoElem::prev, UndoElem::restore, U, undo_elem_free(), and UserDef::undosteps.
Referenced by undo_paint_push_begin().
static void undo_stack_push_end | ( | UndoStack * | stack | ) | [static] |
Definition at line 128 of file paint_undo.c.
References BLI_freelinkN(), UndoStack::elems, ListBase::first, ListBase::last, UndoElem::prev, U, undo_elem_free(), UserDef::undomemory, and UndoElem::undosize.
Referenced by undo_paint_push_end().
static int undo_stack_step | ( | bContext * | C, |
UndoStack * | stack, | ||
int | step, | ||
const char * | name | ||
) | [static] |
Definition at line 155 of file paint_undo.c.
References UndoStack::current, UndoStack::elems, ListBase::first, G, G_DEBUG, UndoElem::name, UndoElem::next, NULL, UndoElem::prev, and undo_restore().
Referenced by ED_undo_paint_step().
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().