52 ListBaseT<Nurb> nubase;
64 ListBaseT<FCurve> drivers;
81 ListBaseT<Nurb> *undobase = &ucu->nubase;
99 for (
Nurb &nu : *undobase) {
110 cu->
actnu = ucu->actnu;
111 cu->
flag = ucu->flag;
112 *r_shapenr = ucu->obedit.shapenr;
128 tmpEditnurb.keyindex = ucu->undoIndex;
136 for (
Nurb &nu : *nubase) {
139 if (ucu->undoIndex) {
145 ucu->undo_size += ((nu.bezt ? (
sizeof(
BezTriple) * nu.pntsu) : 0) +
146 (nu.bp ? (
sizeof(
BPoint) * (nu.pntsu * nu.pntsv)) : 0) +
152 ucu->actnu = cu->
actnu;
153 ucu->flag = cu->
flag;
155 ucu->obedit.shapenr = shapenr;
175 Curve *cu = id_cast<Curve *>(obedit->
data);
207 return (obedit !=
nullptr);
224 for (
uint i = 0; i < objects.
size(); i++) {
257 Curve *cu = id_cast<Curve *>(obedit->
data);
261 "name='%s', failed to enter edit-mode for object '%s', undo state invalid",
291 MEM_delete(us->
elems);
General operations, lookup, etc. for blender objects.
Generic array manipulation API.
#define BLI_array_is_zeroed(arr, arr_len)
#define CLOG_ERROR(clg_ref,...)
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static void undocurve_to_editcurve(Main *bmain, UndoCurve *ucu, Curve *cu, short *r_shapenr)
@ UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE
@ UNDOTYPE_FLAG_ENCODE_PRE_MEMFILE_SUPPORTED
void BKE_fcurves_free(ListBaseT< FCurve > *list)
void BKE_nurbList_free(ListBaseT< Nurb > *lb)
void ED_undo_object_set_active_or_warn(const Main &bmain, Scene *scene, ViewLayer *view_layer, Object *ob, const char *info, CLG_LogRef *log)
int ED_curve_updateAnimPaths(Main *bmain, Curve *cu)
void ED_curve_keyindex_update_nurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu)
Vector< Object * > ED_undo_editmode_objects_from_view_layer(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
static bool curve_undosys_step_encode(bContext *C, Main *bmain, UndoStep *us_p)
ViewLayer * CTX_data_view_layer(const bContext *C)
AnimData * BKE_animdata_from_id(const ID *id)
static bool curve_undosys_poll(bContext *C)
static Object * editcurve_object_from_context(bContext *C)
void BKE_fcurves_copy(ListBaseT< FCurve > *dst, ListBaseT< FCurve > *src)
static void curve_undosys_step_free(UndoStep *us_p)
Object * BKE_view_layer_edit_object_get(const ViewLayer *view_layer)
void DEG_id_tag_update(ID *id, unsigned int flags)
wmWindowManager * CTX_wm_manager(const bContext *C)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
CVKeyIndexMap * ED_curve_keyindex_hash_duplicate(CVKeyIndexMap *keyindex)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void ED_curve_undosys_type(UndoType *ut)
Nurb * BKE_nurb_duplicate(const Nurb *nu)
bool BKE_object_is_in_editmode(const Object *ob)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Main * CTX_data_main(const bContext *C)
void BKE_curve_editNurb_keyIndex_free(CVKeyIndexMap **keyindex)
static void curve_undosys_foreach_ID_ref(UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
void ED_undo_object_editmode_restore_helper(Scene *scene, ViewLayer *view_layer, Object **object_array, uint object_array_len, uint object_array_stride)
ListBaseT< Nurb > * BKE_curve_editNurbs_get(Curve *cu)
void(*)(void *user_data, UndoRefID *id_ref) UndoTypeForEachIDRefFn
Scene * CTX_data_scene(const bContext *C)
static void curve_undosys_step_decode(bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir, bool)
static void undocurve_free_data(UndoCurve *uc)
Map< const void *, struct CVKeyIndex * > CVKeyIndexMap
static void undocurve_from_editcurve(UndoCurve *ucu, Curve *cu, const short shapenr)
void ED_undo_object_editmode_validate_scene_from_windows(wmWindowManager *wm, const Scene *scene_ref, Scene **scene_p, ViewLayer **view_layer_p)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
ListBaseT< FCurve > drivers
UndoRefID_Object obedit_ref
UndoRefID_Scene scene_ref
CurveUndoStep_Elem * elems
bool is_memfile_undo_flush_needed
bool(*) poll(bContext *C)
void(*) step_free(UndoStep *us)
void(*) step_decode(bContext *C, Main *bmain, UndoStep *us, eUndoStepDir dir, bool is_final)
void(*) step_foreach_ID_ref(UndoStep *us, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
bool(*) step_encode(bContext *C, Main *bmain, UndoStep *us)