|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "CLG_log.h"#include "DNA_anim_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_array_utils.h"#include "BLI_blenlib.h"#include "BLI_ghash.h"#include "BKE_anim_data.hh"#include "BKE_context.hh"#include "BKE_curve.hh"#include "BKE_fcurve.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_object.hh"#include "BKE_undo_system.hh"#include "DEG_depsgraph.hh"#include "ED_curve.hh"#include "ED_undo.hh"#include "WM_api.hh"#include "WM_types.hh"#include "curve_intern.hh"Go to the source code of this file.
Classes | |
| struct | UndoCurve |
| struct | CurveUndoStep_Elem |
| struct | CurveUndoStep |
Functions | |
Undo Conversion | |
| static void | undocurve_to_editcurve (Main *bmain, UndoCurve *ucu, Curve *cu, short *r_shapenr) |
| static void | undocurve_from_editcurve (UndoCurve *ucu, Curve *cu, const short shapenr) |
| static void | undocurve_free_data (UndoCurve *uc) |
| static Object * | editcurve_object_from_context (bContext *C) |
Implements ED Undo System | |
| |
| static bool | curve_undosys_poll (bContext *C) |
| static bool | curve_undosys_step_encode (bContext *C, Main *bmain, UndoStep *us_p) |
| static void | curve_undosys_step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir, bool) |
| static void | curve_undosys_step_free (UndoStep *us_p) |
| static void | curve_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data) |
| void | ED_curve_undosys_type (UndoType *ut) |
Variables | |
| static CLG_LogRef | LOG = {"ed.undo.curve"} |
|
static |
Definition at line 291 of file editcurve_undo.cc.
References CurveUndoStep::elems, CurveUndoStep::elems_len, CurveUndoStep_Elem::obedit_ref, and CurveUndoStep::scene_ref.
Referenced by ED_curve_undosys_type().
|
static |
Definition at line 199 of file editcurve_undo.cc.
References editcurve_object_from_context().
Referenced by curve_undosys_step_decode(), and ED_curve_undosys_type().
|
static |
Definition at line 236 of file editcurve_undo.cc.
References BKE_object_is_in_editmode(), BLI_assert, CLOG_ERROR, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), curve_undosys_poll(), CurveUndoStep_Elem::data, Object::data, DEG_id_tag_update(), ED_undo_object_editmode_restore_helper(), ED_undo_object_editmode_validate_scene_from_windows(), ED_undo_object_set_active_or_warn(), Curve::editnurb, CurveUndoStep::elems, CurveUndoStep::elems_len, Curve::id, Object::id, ID_RECALC_GEOMETRY, Main::is_memfile_undo_flush_needed, LOG, ID::name, UndoStep::name, NC_GEOM, ND_DATA, EditNurb::needs_flush_to_id, CurveUndoStep_Elem::obedit_ref, CurveUndoStep::scene_ref, Object::shapenr, undocurve_to_editcurve(), and WM_event_add_notifier().
Referenced by ED_curve_undosys_type().
Definition at line 205 of file editcurve_undo.cc.
References CTX_data_scene(), CTX_data_view_layer(), CurveUndoStep_Elem::data, Object::data, UndoStep::data_size, ED_undo_editmode_objects_from_view_layer(), Curve::editnurb, CurveUndoStep::elems, CurveUndoStep::elems_len, Main::is_memfile_undo_flush_needed, MEM_callocN, EditNurb::needs_flush_to_id, CurveUndoStep_Elem::obedit_ref, scene, CurveUndoStep::scene_ref, Object::shapenr, CurveUndoStep::step, UndoCurve::undo_size, and undocurve_from_editcurve().
Referenced by ED_curve_undosys_type().
|
static |
Definition at line 280 of file editcurve_undo.cc.
References CurveUndoStep_Elem::data, CurveUndoStep::elems, CurveUndoStep::elems_len, MEM_freeN(), and undocurve_free_data().
Referenced by ED_curve_undosys_type().
| void ED_curve_undosys_type | ( | UndoType * | ut | ) |
Export for ED_undo_sys
Definition at line 304 of file editcurve_undo.cc.
References curve_undosys_foreach_ID_ref(), curve_undosys_poll(), curve_undosys_step_decode(), curve_undosys_step_encode(), curve_undosys_step_free(), UndoType::flags, UndoType::name, UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_foreach_ID_ref, UndoType::step_free, UndoType::step_size, and UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE.
Referenced by ED_undosys_type_init().
Definition at line 163 of file editcurve_undo.cc.
References BKE_curve_editNurbs_get(), BKE_view_layer_edit_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), Object::data, ELEM, OB_CURVES_LEGACY, OB_SURF, and Object::type.
Referenced by curve_undosys_poll().
|
static |
Definition at line 153 of file editcurve_undo.cc.
References BKE_curve_editNurb_keyIndex_free(), BKE_fcurves_free(), BKE_nurbList_free(), UndoCurve::drivers, UndoCurve::fcurves, UndoCurve::nubase, and UndoCurve::undoIndex.
Referenced by curve_undosys_step_free().
Definition at line 107 of file editcurve_undo.cc.
References AnimData::action, Curve::actnu, UndoCurve::actnu, Curve::actvert, UndoCurve::actvert, BKE_animdata_from_id(), BKE_curve_editNurbs_get(), BKE_fcurves_copy(), BKE_nurb_duplicate(), BLI_addtail(), BLI_array_is_zeroed, BLI_assert, bAction::curves, AnimData::drivers, UndoCurve::drivers, ED_curve_keyindex_hash_duplicate(), ED_curve_keyindex_update_nurb(), Curve::editnurb, UndoCurve::fcurves, Curve::flag, UndoCurve::flag, Curve::id, EditNurb::keyindex, KNOTSU, KNOTSV, LISTBASE_FOREACH, UndoCurve::nubase, UndoCurve::obedit, UndoCurve::shapenr, UndoCurve::undo_size, and UndoCurve::undoIndex.
Referenced by curve_undosys_step_encode().
|
static |
Definition at line 65 of file editcurve_undo.cc.
References AnimData::action, Curve::actnu, UndoCurve::actnu, Curve::actvert, UndoCurve::actvert, BKE_animdata_from_id(), BKE_curve_editNurb_keyIndex_free(), BKE_curve_editNurbs_get(), BKE_fcurves_copy(), BKE_fcurves_free(), BKE_nurb_duplicate(), BKE_nurbList_free(), BLI_addtail(), bAction::curves, AnimData::drivers, UndoCurve::drivers, ED_curve_keyindex_hash_duplicate(), ED_curve_keyindex_update_nurb(), ED_curve_updateAnimPaths(), Curve::editnurb, UndoCurve::fcurves, Curve::flag, UndoCurve::flag, Curve::id, EditNurb::keyindex, LISTBASE_FOREACH, UndoCurve::nubase, UndoCurve::obedit, UndoCurve::shapenr, and UndoCurve::undoIndex.
Referenced by curve_undosys_step_decode().
|
static |
We only need this locally.
Definition at line 43 of file editcurve_undo.cc.
Referenced by curve_undosys_step_decode().