66 if (len_src != len_dst) {
144 static int validate_undoLatt(
void *
data,
void *edata)
199 uint objects_len = 0;
205 for (
uint i = 0; i < objects_len; i++) {
242 "name='%s', failed to enter edit-mode for object '%s', undo state invalid",
289 ut->
name =
"Edit Lattice";
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode(const struct Object *ob)
@ UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE
void(* UndoTypeForEachIDRefFn)(void *user_data, struct UndoRefID *id_ref)
Generic array manipulation API.
#define BLI_array_is_zeroed(arr, arr_len)
#define CLOG_ERROR(clg_ref,...)
void DEG_id_tag_update(struct ID *id, int flag)
Object is a sort of wrapper for general info.
#define OBEDIT_FROM_VIEW_LAYER(view_layer)
void ED_undo_object_editmode_restore_helper(struct bContext *C, struct Object **object_array, uint object_array_len, uint object_array_stride)
void ED_undo_object_set_active_or_warn(struct Scene *scene, struct ViewLayer *view_layer, struct Object *ob, const char *info, struct CLG_LogRef *log)
struct Object ** ED_undo_editmode_objects_from_view_layer(struct ViewLayer *view_layer, uint *r_len)
Read Guarded memory(de)allocation.
struct LatticeUndoStep_Elem LatticeUndoStep_Elem
static void undolatt_to_editlatt(UndoLattice *ult, EditLatt *editlatt)
static bool lattice_undosys_poll(bContext *C)
static bool lattice_undosys_step_encode(struct bContext *C, Main *bmain, UndoStep *us_p)
static void lattice_undosys_step_free(UndoStep *us_p)
struct UndoLattice UndoLattice
void ED_lattice_undosys_type(UndoType *ut)
static void * undolatt_from_editlatt(UndoLattice *ult, EditLatt *editlatt)
static void undolatt_free_data(UndoLattice *ult)
static void lattice_undosys_foreach_ID_ref(UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
struct LatticeUndoStep LatticeUndoStep
static Object * editlatt_object_from_context(bContext *C)
static void lattice_undosys_step_decode(struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final))
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
UndoRefID_Object obedit_ref
LatticeUndoStep_Elem * elems
struct MDeformVert * dvert
struct EditLatt * editlatt
char is_memfile_undo_flush_needed
void(* step_decode)(struct bContext *C, struct Main *bmain, UndoStep *us, eUndoStepDir dir, bool is_final)
bool(* step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us)
void(* step_foreach_ID_ref)(UndoStep *us, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
void(* step_free)(UndoStep *us)
bool(* poll)(struct bContext *C)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)