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

Public Attributes

Type type = Type::None
 
std::string object_name
 
std::string active_shape_key_name
 
int mesh_verts_num
 
int mesh_corners_num
 
int mesh_grids_num
 
int grid_size
 
float3 pivot_pos
 
float4 pivot_rot
 
bool geometry_clear_pbvh
 
NodeGeometry geometry_original
 
NodeGeometry geometry_modified
 
BMLogEntrybm_entry
 
NodeGeometry geometry_bmesh_enter
 
bool applied
 
std::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 188 of file sculpt_undo.cc.

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 199 of file sculpt_undo.cc.

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

◆ applied

◆ bm_entry

◆ geometry_bmesh_enter

◆ geometry_clear_pbvh

◆ geometry_modified

◆ geometry_original

◆ grid_size

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

◆ mesh_corners_num

int blender::ed::sculpt_paint::undo::StepData::mesh_corners_num

Definition at line 204 of file sculpt_undo.cc.

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

◆ mesh_grids_num

int blender::ed::sculpt_paint::undo::StepData::mesh_grids_num

◆ mesh_verts_num

int blender::ed::sculpt_paint::undo::StepData::mesh_verts_num

◆ nodes

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

◆ nodes_mutex

std::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 196 of file sculpt_undo.cc.

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

◆ 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 243 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: