Blender V4.5
blender::ed::sculpt_paint::undo::StepData Struct Reference

Classes

struct  [struct].mesh
struct  [struct].grids
struct  [struct].bmesh

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  mesh
struct  grids
struct  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
size_t undo_size

Detailed Description

Definition at line 185 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 200 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().

◆ bmesh

◆ geometry_modified

◆ geometry_original

◆ grids

◆ 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 197 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

◆ 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 255 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

size_t blender::ed::sculpt_paint::undo::StepData::undo_size

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