Blender V2.61 - r43446
|
#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 UndoElem * | curundo = NULL |
Definition in file editmode_undo.c.
#define MAXUNDONAME 64 |
Definition at line 88 of file editmode_undo.c.
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] |
Definition at line 203 of file editmode_undo.c.
References BLI_freelinkN(), CTX_data_edit_object(), ListBase::first, UndoElem::freedata, UndoElem::getdata, Object::id, UndoElem::id, ListBase::last, ID::name, next, UndoElem::next, NULL, UndoElem::ob, Object::type, UndoElem::type, UndoElem::undodata, and UndoElem::validate_undo.
Referenced by undo_editmode_get_name(), and undo_editmode_step().
void undo_editmode_clear | ( | void | ) |
Definition at line 283 of file editmode_undo.c.
References BLI_freelistN(), ListBase::first, UndoElem::freedata, UndoElem::next, NULL, and UndoElem::undodata.
Referenced by ED_editors_exit(), make_editMesh(), and make_editNurb().
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 | ||
) |
Definition at line 118 of file editmode_undo.c.
References BLI_addtail(), BLI_freelinkN(), BLI_strncpy(), CTX_data_edit_object(), ListBase::first, UndoElem::freedata, UndoElem::from_editmode, UndoElem::getdata, Object::id, UndoElem::id, ListBase::last, MEM_callocN(), MEM_get_memory_in_use(), UndoElem::name, UndoElem::ob, UndoElem::prev, UndoElem::to_editmode, Object::type, UndoElem::type, U, UndoElem::undodata, UserDef::undomemory, UndoElem::undosize, UserDef::undosteps, and UndoElem::validate_undo.
void undo_editmode_step | ( | bContext * | C, |
int | step | ||
) |
Definition at line 243 of file editmode_undo.c.
References CTX_data_edit_object(), CTX_data_scene(), DAG_id_tag_update(), EM_selectmode_to_scene(), error(), G, G_DEBUG, UndoElem::getdata, Object::id, UndoElem::name, UndoElem::next, NULL, OB_MESH, OB_RECALC_DATA, UndoElem::prev, Object::type, undo_clean_stack(), and undo_restore().
Referenced by ed_undo_step(), undo_editmode_name(), and undo_editmode_number().
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().
Definition at line 105 of file editmode_undo.c.
Definition at line 104 of file editmode_undo.c.