Blender V5.0
blender::ed::sculpt_paint::undo::StepData Struct Reference

Public Member Functions

bool needs_undo () const
void tag_needs_undo ()
void tag_needs_redo ()

Public Attributes

Type type = Type::None
std::string object_name
std::string active_shape_key_name
struct { 
   int   verts_num 
   int   corners_num 
mesh
struct { 
   int   grids_num 
   int   grid_size 
grids
struct { 
   BMLogEntry *   bm_entry 
   NodeGeometry   geometry_enter 
bmesh
float3 pivot_pos
float4 pivot_rot
NodeGeometry geometry_original
NodeGeometry geometry_modified
Mutex nodes_mutex
Map< const bke::pbvh::Node *, std::unique_ptr< Node > > undo_nodes_by_pbvh_node
Vector< std::unique_ptr< Node > > nodes
std::unique_ptr< PositionUndoStorageposition_step_storage
size_t undo_size

Detailed Description

Definition at line 195 of file sculpt_undo.cc.

Member Function Documentation

◆ needs_undo()

bool blender::ed::sculpt_paint::undo::StepData::needs_undo ( ) const
inline

◆ tag_needs_redo()

◆ tag_needs_undo()

Member Data Documentation

◆ active_shape_key_name

std::string blender::ed::sculpt_paint::undo::StepData::active_shape_key_name

Name of the object's active shape key when the undo step was created.

Definition at line 210 of file sculpt_undo.cc.

Referenced by blender::ed::sculpt_paint::undo::restore_active_shape_key(), and blender::ed::sculpt_paint::undo::save_common_data().

◆ bm_entry

BMLogEntry* blender::ed::sculpt_paint::undo::StepData::bm_entry

The current log entry for the given BMLog step. Represents the most recent step at the time that this entry is added.

There are two usages of this pointer:

  • If undoing or redoing a enter / exit from Dyntopo, this entry is used to rebuild the BMLog from all of the relevant entries
  • When an undo step is no longer valid, this is used to free the data that it holds and remove it from the underlying list.

Definition at line 239 of file sculpt_undo.cc.

Referenced by blender::ed::sculpt_paint::undo::bmesh_enable(), blender::ed::sculpt_paint::undo::bmesh_push(), blender::ed::sculpt_paint::undo::free_step_data(), and blender::ed::sculpt_paint::undo::has_bmesh_log_entry().

◆ [struct]

◆ corners_num

int blender::ed::sculpt_paint::undo::StepData::corners_num

Definition at line 218 of file sculpt_undo.cc.

Referenced by blender::ed::sculpt_paint::undo::push_begin_ex().

◆ geometry_enter

◆ geometry_modified

◆ geometry_original

◆ grid_size

int blender::ed::sculpt_paint::undo::StepData::grid_size

◆ [struct]

◆ grids_num

◆ [struct]

struct { ... } blender::ed::sculpt_paint::undo::StepData::mesh

◆ nodes

Vector<std::unique_ptr<Node> > blender::ed::sculpt_paint::undo::StepData::nodes

◆ nodes_mutex

Mutex blender::ed::sculpt_paint::undo::StepData::nodes_mutex

◆ object_name

std::string blender::ed::sculpt_paint::undo::StepData::object_name

Name of the object associated with this undo data (object.id.name).

Definition at line 207 of file sculpt_undo.cc.

Referenced by blender::ed::sculpt_paint::undo::restore_list(), and blender::ed::sculpt_paint::undo::save_common_data().

◆ pivot_pos

float3 blender::ed::sculpt_paint::undo::StepData::pivot_pos

◆ pivot_rot

float4 blender::ed::sculpt_paint::undo::StepData::pivot_rot

◆ position_step_storage

std::unique_ptr<PositionUndoStorage> blender::ed::sculpt_paint::undo::StepData::position_step_storage

◆ type

◆ undo_nodes_by_pbvh_node

Map<const bke::pbvh::Node *, std::unique_ptr<Node> > blender::ed::sculpt_paint::undo::StepData::undo_nodes_by_pbvh_node

#undo::Node is stored per #pbvh::Node to reduce data storage needed for changes only impacting small portions of the mesh. During undo step creation and brush evaluation we often need to look up the undo state for a specific node. That lookup must be protected by a lock since nodes are pushed from multiple threads. This map speeds up undo node access to reduce the amount of time we wait for the lock.

This is only accessible when building the undo step, in between push_begin and push_end.

Definition at line 265 of file sculpt_undo.cc.

Referenced by blender::ed::sculpt_paint::undo::ensure_node(), blender::ed::sculpt_paint::undo::get_node(), and blender::ed::sculpt_paint::undo::push_end_ex().

◆ undo_size

◆ verts_num

int blender::ed::sculpt_paint::undo::StepData::verts_num

The documentation for this struct was generated from the following file: