|
Blender V4.3
|
#include <cmath>#include <cstring>#include "MEM_guardedalloc.h"#include "CLG_log.h"#include "BLI_array_utils.h"#include "BLI_listbase.h"#include "BLI_utildefines.h"#include "DNA_defs.h"#include "DNA_layer_types.h"#include "DNA_meta_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_object.hh"#include "BKE_undo_system.hh"#include "DEG_depsgraph.hh"#include "ED_mball.hh"#include "ED_object.hh"#include "ED_undo.hh"#include "ED_util.hh"#include "WM_api.hh"#include "WM_types.hh"Go to the source code of this file.
Classes | |
| struct | UndoMBall |
| struct | MBallUndoStep_Elem |
| struct | MBallUndoStep |
Functions | |
Undo Conversion | |
| static void | freeMetaElemlist (ListBase *lb) |
| static void | undomball_to_editmball (UndoMBall *umb, MetaBall *mb) |
| static void * | editmball_from_undomball (UndoMBall *umb, MetaBall *mb) |
| static void | undomball_free_data (UndoMBall *umb) |
| static Object * | editmball_object_from_context (bContext *C) |
Implements ED Undo System | |
| |
| static bool | mball_undosys_poll (bContext *C) |
| static bool | mball_undosys_step_encode (bContext *C, Main *bmain, UndoStep *us_p) |
| static void | mball_undosys_step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir, bool) |
| static void | mball_undosys_step_free (UndoStep *us_p) |
| static void | mball_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data) |
| void | ED_mball_undosys_type (UndoType *ut) |
Variables | |
| static CLG_LogRef | LOG = {"ed.undo.mball"} |
| void ED_mball_undosys_type | ( | UndoType * | ut | ) |
Export for ED_undo_sys.
Definition at line 252 of file editmball_undo.cc.
References UndoType::flags, mball_undosys_foreach_ID_ref(), mball_undosys_poll(), mball_undosys_step_decode(), mball_undosys_step_encode(), mball_undosys_step_free(), 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 85 of file editmball_undo.cc.
References BLI_addtail(), BLI_array_is_zeroed, BLI_assert, MetaBall::editelems, UndoMBall::editelems, ListBase::first, MetaBall::lastelem, UndoMBall::lastelem_index, MEM_dupallocN, and UndoMBall::undo_size.
Referenced by mball_undosys_step_encode().
Definition at line 114 of file editmball_undo.cc.
References BKE_view_layer_edit_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), Object::data, MetaBall::editelems, OB_MBALL, and Object::type.
Referenced by mball_undosys_poll().
|
static |
Definition at line 56 of file editmball_undo.cc.
References BLI_pophead(), and MEM_freeN().
Referenced by undomball_free_data(), and undomball_to_editmball().
|
static |
Definition at line 239 of file editmball_undo.cc.
References MBallUndoStep::elems, MBallUndoStep::elems_len, MBallUndoStep_Elem::obedit_ref, and MBallUndoStep::scene_ref.
Referenced by ED_mball_undosys_type().
|
static |
Definition at line 150 of file editmball_undo.cc.
References editmball_object_from_context().
Referenced by ED_mball_undosys_type(), and mball_undosys_step_decode().
|
static |
Definition at line 186 of file editmball_undo.cc.
References BKE_object_is_in_editmode(), BLI_assert, CLOG_ERROR, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), MBallUndoStep_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(), MetaBall::editelems, MBallUndoStep::elems, MBallUndoStep::elems_len, MetaBall::id, Object::id, ID_RECALC_GEOMETRY, Main::is_memfile_undo_flush_needed, LOG, mball_undosys_poll(), ID::name, UndoStep::name, NC_GEOM, ND_DATA, MetaBall::needs_flush_to_id, MBallUndoStep_Elem::obedit_ref, MBallUndoStep::scene_ref, undomball_to_editmball(), and WM_event_add_notifier().
Referenced by ED_mball_undosys_type().
Definition at line 155 of file editmball_undo.cc.
References CTX_data_scene(), CTX_data_view_layer(), MBallUndoStep_Elem::data, Object::data, UndoStep::data_size, ED_undo_editmode_objects_from_view_layer(), editmball_from_undomball(), MBallUndoStep::elems, MBallUndoStep::elems_len, Main::is_memfile_undo_flush_needed, MEM_callocN, MetaBall::needs_flush_to_id, MBallUndoStep_Elem::obedit_ref, scene, MBallUndoStep::scene_ref, MBallUndoStep::step, and UndoMBall::undo_size.
Referenced by ED_mball_undosys_type().
|
static |
Definition at line 228 of file editmball_undo.cc.
References MBallUndoStep_Elem::data, MBallUndoStep::elems, MBallUndoStep::elems_len, MEM_freeN(), and undomball_free_data().
Referenced by ED_mball_undosys_type().
|
static |
Definition at line 109 of file editmball_undo.cc.
References UndoMBall::editelems, and freeMetaElemlist().
Referenced by mball_undosys_step_free().
Definition at line 67 of file editmball_undo.cc.
References BLI_addtail(), MetaBall::editelems, UndoMBall::editelems, ListBase::first, freeMetaElemlist(), MetaBall::lastelem, UndoMBall::lastelem_index, and MEM_dupallocN.
Referenced by mball_undosys_step_decode().
|
static |
We only need this locally.
Definition at line 43 of file editmball_undo.cc.
Referenced by mball_undosys_step_decode().