|
Blender V5.3
|
Namespaces | |
| namespace | compression |
| namespace | tests |
Classes | |
| struct | Node |
| struct | SculptAttrRef |
| struct | NodeGeometry |
| struct | StepData |
| struct | PositionUndoStorage |
| struct | SculptUndoStep |
Enumerations | |
| enum class | Type : int8_t { None , Position , HideVert , HideFace , Mask , DyntopoBegin , DyntopoEnd , Geometry , FaceSet , Color } |
Functions | |
| size_t | step_memory_size_get (UndoStep *step) |
| static void | restore_mask_from_undo_step (Object &object) |
| static void | restore_color_from_undo_step (Object &object) |
| static void | restore_face_set_from_undo_step (Object &object) |
| void | restore_position_from_undo_step (const Depsgraph &depsgraph, Object &object) |
| static void | restore_from_undo_step (const Depsgraph &depsgraph, const Sculpt &sd, Object &object) |
| static SculptUndoStep * | get_active_step () |
| static StepData * | get_step_data () |
| static bool | use_multires_undo (const StepData &step_data, const SculptSession &ss) |
| static bool | topology_matches (const StepData &step_data, const Object &object) |
| static bool | indices_contain_true (const Span< bool > data, const Span< int > indices) |
| static bool | restore_active_shape_key (bContext &C, Depsgraph &depsgraph, const StepData &step_data, Object &object) |
| template<typename T> | |
| static void | swap_indexed_data (MutableSpan< T > full, const Span< int > indices, MutableSpan< T > indexed) |
| static void | restore_position_mesh (Object &object, PositionUndoStorage &undo_data, const MutableSpan< bool > modified_verts) |
| static void | restore_position_grids (const MutableSpan< float3 > positions, const CCGKey &key, PositionUndoStorage &undo_data, const MutableSpan< bool > modified_grids) |
| static void | restore_vert_visibility_mesh (Object &object, Node &unode, const MutableSpan< bool > modified_verts) |
| static void | restore_vert_visibility_grids (SubdivCCG &subdiv_ccg, Node &unode, const MutableSpan< bool > modified_grids) |
| static void | restore_hidden_face (Object &object, Node &unode, const MutableSpan< bool > modified_faces) |
| static void | restore_color (Object &object, StepData &step_data, const MutableSpan< bool > modified_verts) |
| static void | restore_mask_mesh (Object &object, Node &unode, const MutableSpan< bool > modified_verts) |
| static void | restore_mask_grids (Object &object, Node &unode, const MutableSpan< bool > modified_grids) |
| static bool | restore_face_sets (Object &object, Node &unode, const MutableSpan< bool > modified_face_set_faces) |
| static void | bmesh_restore_generic (StepData &step_data, Object &object) |
| static void | bmesh_enable (Object &object, const StepData &step_data) |
| static void | bmesh_handle_dyntopo_begin (bContext *C, StepData &step_data, Object &object) |
| static void | bmesh_handle_dyntopo_end (bContext *C, StepData &step_data, Object &object) |
| static void | store_geometry_data (NodeGeometry *geometry, const Object &object) |
| static void | restore_geometry_data (const NodeGeometry *geometry, Mesh *mesh) |
| static void | geometry_free_data (NodeGeometry *geometry) |
| static void | restore_geometry (StepData &step_data, Object &object) |
| static int | bmesh_restore (bContext *C, Depsgraph &depsgraph, StepData &step_data, Object &object) |
| void | restore_from_bmesh_enter_geometry (const StepData &step_data, Mesh &mesh) |
| bool | has_bmesh_log_entry () |
| static void | refine_subdiv (Depsgraph *depsgraph, const SculptSession &ss, Object &object, bke::subdiv::Subdiv *subdiv) |
| static void | restore_list (bContext *C, Depsgraph *depsgraph, StepData &step_data) |
| static void | free_step_data (StepData &step_data) |
| static const Node * | get_node (const bke::pbvh::Node *node, const Type type) |
| static void | store_vert_visibility_grids (const SubdivCCG &subdiv_ccg, const bke::pbvh::GridsNode &node, Node &unode) |
| static void | store_positions_mesh (const Depsgraph &depsgraph, const Object &object, Node &unode) |
| static void | store_positions_grids (const SubdivCCG &subdiv_ccg, Node &unode) |
| static void | store_vert_visibility_mesh (const Mesh &mesh, const bke::pbvh::Node &node, Node &unode) |
| static void | store_face_visibility (const Mesh &mesh, Node &unode) |
| static void | store_mask_mesh (const Mesh &mesh, Node &unode) |
| static void | store_mask_grids (const SubdivCCG &subdiv_ccg, Node &unode) |
| static void | store_color (const Mesh &mesh, const bke::pbvh::MeshNode &node, Node &unode) |
| static NodeGeometry * | geometry_get (StepData &step_data) |
| static void | geometry_push (const Object &object) |
| static void | store_face_sets (const Mesh &mesh, Node &unode) |
| static void | fill_node_data_mesh (const Depsgraph &depsgraph, const Object &object, const bke::pbvh::MeshNode &node, const Type type, Node &unode) |
| static void | fill_node_data_grids (const Object &object, const bke::pbvh::GridsNode &node, const Type type, Node &unode) |
| static BLI_NOINLINE void | bmesh_push (const Object &object, const bke::pbvh::BMeshNode *node, Type type) |
| static Node * | ensure_node (StepData &step_data, const bke::pbvh::Node &node, bool &r_new) |
| void | push_node (const Depsgraph &depsgraph, const Object &object, const bke::pbvh::Node *node, const Type type) |
| void | push_nodes (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const Type type) |
| static void | save_active_attribute (Object &object, SculptAttrRef *attr) |
| static void | save_common_data (Object &ob, SculptUndoStep *us) |
| void | push_begin_ex (const Scene &, Object &ob, const char *name) |
| void | push_begin (const Scene &scene, Object &ob, const wmOperator *op) |
| void | push_enter_sculpt_mode (const Scene &, Object &ob, const wmOperator *op) |
| static size_t | node_size_in_bytes (const Node &node) |
| void | push_end_ex (Object &ob, const bool use_nested_undo) |
| void | push_end (Object &ob) |
Implements ED Undo System | |
| void | register_type (UndoType *ut) |
| void | geometry_begin (const Scene &scene, Object &ob, const wmOperator *op) |
| void | geometry_begin_ex (const Scene &scene, Object &ob, const char *name) |
| void | geometry_end (Object &ob) |
| static void | set_active_layer (bContext *C, const SculptAttrRef *attr_ref) |
| static void | step_encode_init (bContext *, UndoStep *us_p) |
| static bool | step_encode (bContext *, Main *bmain, UndoStep *us_p) |
| static void | step_decode_undo_impl (bContext *C, Depsgraph *depsgraph, SculptUndoStep *us) |
| static void | step_decode_redo_impl (bContext *C, Depsgraph *depsgraph, SculptUndoStep *us) |
| static void | step_decode_undo (bContext *C, Depsgraph *depsgraph, SculptUndoStep *us, const bool is_final) |
| static void | step_decode_redo (bContext *C, Depsgraph *depsgraph, SculptUndoStep *us) |
| static void | step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir dir, const bool is_final) |
| static void | step_free (UndoStep *us_p) |
| static size_t | calculate_node_geometry_allocated_size (const NodeGeometry &node_geometry) |
| static size_t | estimate_geometry_step_size (const StepData &step_data) |
Multires + Base Mesh Undo | |
Example of a relevant operator is Apply Base. Usage: static int operator_exec(bContext *C, wmOperator *op) { ed::sculpt_paint::undo::push_multires_mesh_begin(C, op->type->name); // Modify base mesh. ed::sculpt_paint::undo::push_multires_mesh_end(C, op->type->name); return OPERATOR_FINISHED; } If object is not in Sculpt mode or there is no active multires object, ED_undo_push is used instead. | |
| void | push_multires_mesh_begin (bContext *C, const char *str) |
| void | push_multires_mesh_end (bContext *C, const char *str) |
| static bool | use_multires_mesh (bContext *C) |
|
strong |
| Enumerator | |
|---|---|
| None | |
| Position | |
| HideVert | |
| HideFace | |
| Mask | |
| DyntopoBegin | |
| DyntopoEnd | |
| Geometry | |
| FaceSet | |
| Color | |
Definition at line 30 of file sculpt_undo.hh.
|
static |
Definition at line 865 of file sculpt_undo.cc.
References blender::BKE_sculptsession_free_pbvh(), blender::SculptSession::bm, blender::BM_data_layer_add_named(), blender::SculptSession::bm_log, blender::BM_log_from_existing_entries_create(), blender::bm_mesh_allocsize_default, blender::BM_mesh_create(), blender::ed::sculpt_paint::undo::StepData::bmesh, bmesh_enable(), blender::CD_PROP_FLOAT, blender::data, blender::DEG_id_tag_update(), blender::ID_RECALC_GEOMETRY, blender::ME_SCULPT_DYNAMIC_TOPOLOGY, blender::BMeshCreateParams::use_toolflags, and blender::BMesh::vdata.
Referenced by bmesh_enable(), bmesh_handle_dyntopo_begin(), and bmesh_handle_dyntopo_end().
|
static |
Definition at line 886 of file sculpt_undo.cc.
References blender::SculptSession::bm, blender::SculptSession::bm_log, blender::BM_log_redo(), bmesh_enable(), bmesh_handle_dyntopo_begin(), C, blender::ed::sculpt_paint::dyntopo::disable(), blender::ed::sculpt_paint::undo::StepData::needs_undo(), blender::ed::sculpt_paint::undo::StepData::tag_needs_redo(), and blender::ed::sculpt_paint::undo::StepData::tag_needs_undo().
Referenced by bmesh_handle_dyntopo_begin(), and bmesh_restore().
|
static |
Definition at line 903 of file sculpt_undo.cc.
References blender::SculptSession::bm, blender::SculptSession::bm_log, blender::BM_log_undo(), bmesh_enable(), bmesh_handle_dyntopo_end(), C, blender::ed::sculpt_paint::dyntopo::disable(), blender::ed::sculpt_paint::undo::StepData::needs_undo(), blender::ed::sculpt_paint::undo::StepData::tag_needs_redo(), and blender::ed::sculpt_paint::undo::StepData::tag_needs_undo().
Referenced by bmesh_handle_dyntopo_end(), and bmesh_restore().
|
static |
Dynamic topology stores only one undo node per stroke, regardless of the number of bke::pbvh::Tree nodes modified.
Definition at line 1737 of file sculpt_undo.cc.
References blender::BKE_pbvh_bmesh_node_faces(), blender::BKE_pbvh_bmesh_node_other_verts(), blender::BKE_pbvh_bmesh_node_unique_verts(), BLI_assert_unreachable, BLI_NOINLINE, blender::SculptSession::bm, blender::SculptSession::bm_log, blender::BM_log_all_added(), blender::BM_log_before_all_removed(), blender::BM_log_entry_add(), blender::BM_log_face_modified(), blender::BM_log_vert_before_modified(), blender::ed::sculpt_paint::undo::StepData::bmesh, bmesh_push(), blender::CD_PROP_FLOAT, Color, blender::CustomData_get_offset_named(), DyntopoBegin, DyntopoEnd, FaceSet, Geometry, get_step_data(), HideFace, HideVert, lock, Mask, node, blender::ed::sculpt_paint::undo::StepData::nodes, blender::ed::sculpt_paint::undo::StepData::nodes_mutex, None, Position, store_geometry_data(), blender::ed::sculpt_paint::undo::StepData::type, and blender::BMesh::vdata.
Referenced by bmesh_push(), push_node(), and push_nodes().
|
static |
Definition at line 1010 of file sculpt_undo.cc.
References blender::BKE_sculptsession_update_for_edit(), blender::SculptSession::bm_log, bmesh_handle_dyntopo_begin(), bmesh_handle_dyntopo_end(), bmesh_restore(), bmesh_restore_generic(), C, DyntopoBegin, DyntopoEnd, and blender::ed::sculpt_paint::undo::StepData::type.
Referenced by bmesh_restore(), and restore_list().
|
static |
Definition at line 837 of file sculpt_undo.cc.
References blender::bke::pbvh::all_leaf_nodes(), blender::BKE_sculptsession_free_pbvh(), blender::SculptSession::bm, blender::SculptSession::bm_log, blender::BM_log_redo(), blender::BM_log_undo(), blender::BM_mesh_normals_update(), bmesh_restore_generic(), blender::DEG_id_tag_update(), blender::Editor, blender::ID_RECALC_GEOMETRY, Mask, blender::ed::sculpt_paint::undo::StepData::needs_undo(), blender::bke::object::pbvh_get(), PRF_scope, blender::ed::sculpt_paint::undo::StepData::tag_needs_redo(), blender::ed::sculpt_paint::undo::StepData::tag_needs_undo(), blender::ed::sculpt_paint::undo::StepData::type, and blender::bke::pbvh::update_mask_bmesh().
Referenced by bmesh_restore(), and bmesh_restore_generic().
|
static |
Definition at line 2371 of file sculpt_undo.cc.
References blender::BLI_assert(), calculate_node_geometry_allocated_size(), blender::CustomData_count_memory(), node_geometry(), and blender::memory_counter::MemoryCount::total_bytes.
Referenced by calculate_node_geometry_allocated_size(), and estimate_geometry_step_size().
|
static |
Add an undo node for the bke::pbvh::Tree node to the step's storage. If the node was newly created and needs to be filled with data, set r_new to true.
Definition at line 1828 of file sculpt_undo.cc.
References ensure_node(), lock, node, blender::ed::sculpt_paint::undo::StepData::nodes_mutex, and blender::ed::sculpt_paint::undo::StepData::undo_nodes_by_pbvh_node.
Referenced by ensure_node(), push_node(), and push_nodes().
|
static |
Definition at line 2390 of file sculpt_undo.cc.
References calculate_node_geometry_allocated_size(), estimate_geometry_step_size(), blender::ed::sculpt_paint::undo::StepData::geometry_modified, and blender::ed::sculpt_paint::undo::StepData::geometry_original.
Referenced by estimate_geometry_step_size(), and geometry_end().
|
static |
Definition at line 1669 of file sculpt_undo.cc.
References BLI_assert_unreachable, Color, blender::data, DyntopoBegin, DyntopoEnd, ELEM, blender::ed::sculpt_paint::undo::Node::face_hidden, blender::ed::sculpt_paint::undo::Node::face_indices, blender::ed::sculpt_paint::undo::Node::face_sets, FaceSet, fill_node_data_grids(), Geometry, blender::SubdivCCG::grid_size, blender::ed::sculpt_paint::undo::Node::grids, HideFace, HideVert, Mask, blender::ed::sculpt_paint::undo::Node::mask, node, blender::bke::pbvh::node_face_indices_calc_grids(), None, blender::ed::sculpt_paint::undo::Node::normal, Position, blender::ed::sculpt_paint::undo::Node::position, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), store_face_sets(), store_face_visibility(), store_mask_grids(), store_positions_grids(), store_vert_visibility_grids(), and blender::SculptSession::subdiv_ccg.
Referenced by fill_node_data_grids(), and push_node().
|
static |
Definition at line 1601 of file sculpt_undo.cc.
References BLI_assert_unreachable, Color, blender::data, blender::SculptSession::deform_modifiers_active, DyntopoBegin, DyntopoEnd, ELEM, blender::ed::sculpt_paint::undo::Node::face_hidden, blender::ed::sculpt_paint::undo::Node::face_indices, blender::ed::sculpt_paint::undo::Node::face_sets, FaceSet, fill_node_data_mesh(), Geometry, HideFace, HideVert, Mask, blender::ed::sculpt_paint::undo::Node::mask, node, None, blender::ed::sculpt_paint::undo::Node::normal, blender::ed::sculpt_paint::undo::Node::orig_position, Position, blender::ed::sculpt_paint::undo::Node::position, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), store_color(), store_face_sets(), store_face_visibility(), store_mask_mesh(), store_positions_mesh(), store_vert_visibility_mesh(), blender::ed::sculpt_paint::undo::Node::unique_verts_num, blender::ed::sculpt_paint::undo::Node::vert_hidden, and blender::ed::sculpt_paint::undo::Node::vert_indices.
Referenced by fill_node_data_mesh(), and push_node().
|
static |
Definition at line 1399 of file sculpt_undo.cc.
References blender::BM_log_entry_drop(), blender::ed::sculpt_paint::undo::StepData::bmesh, free_step_data(), geometry_free_data(), blender::ed::sculpt_paint::undo::StepData::geometry_modified, and blender::ed::sculpt_paint::undo::StepData::geometry_original.
Referenced by free_step_data(), and step_free().
| void blender::ed::sculpt_paint::undo::geometry_begin | ( | const Scene & | scene, |
| Object & | ob, | ||
| const wmOperator * | op ) |
Pushes an undo step using the operator name. This is necessary for redo panels to work; operators that do not support that may use geometry_begin_ex instead if so desired.
Definition at line 2348 of file sculpt_undo.cc.
References geometry_begin(), geometry_begin_ex(), blender::wmOperatorType::name, and blender::wmOperator::type.
Referenced by blender::ed::sculpt_paint::face_set::edit_modify_geometry(), geometry_begin(), blender::ed::sculpt_paint::trim::gesture_begin(), blender::make_prim_init(), blender::mesh_reorder_vertices_spatial_exec(), blender::ed::sculpt_paint::paint_mask_slice_exec(), blender::ed::object::quadriflow_start_job(), blender::ed::sculpt_paint::store_sculpt_entire_mesh(), blender::ed::sculpt_paint::symmetrize_exec(), and blender::ed::object::voxel_remesh_exec().
| void blender::ed::sculpt_paint::undo::geometry_begin_ex | ( | const Scene & | scene, |
| Object & | ob, | ||
| const char * | name ) |
Definition at line 2353 of file sculpt_undo.cc.
References blender::BKE_undosys_step_push_init_with_type(), blender::BKE_UNDOSYS_TYPE_SCULPT, C, blender::Object::data, blender::ED_undo_stack_get(), blender::ED_undosys_stack_memfile_id_changed_tag(), geometry_begin_ex(), geometry_push(), blender::Object::id, and save_common_data().
Referenced by geometry_begin(), and geometry_begin_ex().
| void blender::ed::sculpt_paint::undo::geometry_end | ( | Object & | ob | ) |
Definition at line 2403 of file sculpt_undo.cc.
References BKE_undosys_stack_limit_steps_and_memory_defaults, blender::BKE_undosys_step_push(), blender::ED_undo_stack_get(), estimate_geometry_step_size(), G_MAIN, geometry_end(), geometry_push(), get_step_data(), blender::None, blender::ed::sculpt_paint::undo::StepData::undo_size, and blender::WM_file_tag_modified().
Referenced by blender::ed::sculpt_paint::face_set::edit_modify_geometry(), geometry_end(), blender::ed::sculpt_paint::trim::gesture_end(), blender::make_prim_finish(), blender::mesh_reorder_vertices_spatial_exec(), blender::ed::sculpt_paint::paint_mask_slice_exec(), blender::ed::object::quadriflow_start_job(), blender::ed::sculpt_paint::store_sculpt_entire_mesh(), blender::ed::sculpt_paint::symmetrize_exec(), and blender::ed::object::voxel_remesh_exec().
|
static |
Definition at line 977 of file sculpt_undo.cc.
References blender::CustomData_free(), blender::Editor, blender::implicit_sharing::free_shared_data(), geometry_free_data(), and PRF_scope.
Referenced by free_step_data(), and geometry_free_data().
|
static |
Definition at line 1567 of file sculpt_undo.cc.
References blender::BLI_assert(), geometry_get(), blender::ed::sculpt_paint::undo::StepData::geometry_modified, blender::ed::sculpt_paint::undo::StepData::geometry_original, and blender::ed::sculpt_paint::undo::NodeGeometry::is_initialized.
Referenced by geometry_get(), and geometry_push().
|
static |
Definition at line 1578 of file sculpt_undo.cc.
References Geometry, geometry_get(), geometry_push(), get_step_data(), store_geometry_data(), and blender::ed::sculpt_paint::undo::StepData::type.
Referenced by geometry_begin_ex(), geometry_end(), geometry_push(), push_multires_mesh_begin(), and push_multires_mesh_end().
|
static |
Definition at line 482 of file sculpt_undo.cc.
References blender::BKE_undosys_stack_init_or_active_with_type(), blender::BKE_UNDOSYS_TYPE_SCULPT, blender::ED_undo_stack_get(), and get_active_step().
Referenced by get_active_step(), and get_step_data().
|
static |
Retrieve the undo data of a given type for the active undo step. For example, this is used to access "original" data from before the current stroke.
This is only possible when building an undo step, in between push_begin and push_end.
Definition at line 1416 of file sculpt_undo.cc.
References get_node(), get_step_data(), node, blender::ed::sculpt_paint::undo::StepData::type, and blender::ed::sculpt_paint::undo::StepData::undo_nodes_by_pbvh_node.
Referenced by get_node(), blender::ed::sculpt_paint::orig_color_data_lookup_mesh(), blender::ed::sculpt_paint::orig_face_set_data_lookup_grids(), blender::ed::sculpt_paint::orig_face_set_data_lookup_mesh(), blender::ed::sculpt_paint::orig_mask_data_lookup_grids(), blender::ed::sculpt_paint::orig_mask_data_lookup_mesh(), blender::ed::sculpt_paint::orig_position_data_lookup_grids(), and blender::ed::sculpt_paint::orig_position_data_lookup_mesh_all_verts().
|
static |
Definition at line 489 of file sculpt_undo.cc.
References get_active_step(), and get_step_data().
Referenced by bmesh_push(), geometry_end(), geometry_push(), get_node(), get_step_data(), has_bmesh_log_entry(), push_end_ex(), push_node(), and push_nodes().
| bool blender::ed::sculpt_paint::undo::has_bmesh_log_entry | ( | ) |
Definition at line 1040 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::StepData::bmesh, get_step_data(), and has_bmesh_log_entry().
Referenced by blender::ed::sculpt_paint::calc_area_normal_and_center_node_bmesh(), has_bmesh_log_entry(), and restore_position_from_undo_step().
|
static |
Definition at line 514 of file sculpt_undo.cc.
References blender::Span< T >::begin(), blender::data, blender::Span< T >::end(), and indices_contain_true().
Referenced by indices_contain_true(), and restore_list().
|
static |
Definition at line 2055 of file sculpt_undo.cc.
References node, and node_size_in_bytes().
Referenced by node_size_in_bytes().
| void blender::ed::sculpt_paint::undo::push_begin | ( | const Scene & | scene, |
| Object & | ob, | ||
| const wmOperator * | op ) |
Pushes an undo step using the operator name. This is necessary for redo panels to work; operators that do not support that may use push_begin_ex instead if so desired.
Definition at line 2033 of file sculpt_undo.cc.
References blender::wmOperatorType::name, push_begin(), push_begin_ex(), and blender::wmOperator::type.
Referenced by blender::ed::sculpt_paint::face_set::change_visibility_exec(), blender::ed::sculpt_paint::face_set::create_op_exec(), blender::ed::sculpt_paint::face_set::edit_grow_shrink(), blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), blender::ed::sculpt_paint::face_set::gesture_begin(), blender::ed::sculpt_paint::mask::gesture_begin(), blender::ed::sculpt_paint::project::gesture_begin(), blender::ed::sculpt_paint::hide::hide_show_begin(), blender::ed::sculpt_paint::face_set::init_op_exec(), blender::ed::sculpt_paint::mask::mask_by_color(), blender::ed::sculpt_paint::mask::mask_flood_fill_exec(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), push_begin(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), blender::ed::sculpt_paint::dyntopo::sculpt_detail_flood_fill_exec(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::ed::sculpt_paint::symmetrize_exec(), blender::ed::sculpt_paint::hide::visibility_filter_exec(), and blender::ed::sculpt_paint::hide::visibility_invert_exec().
| void blender::ed::sculpt_paint::undo::push_begin_ex | ( | const Scene & | scene, |
| Object & | ob, | ||
| const char * | name ) |
NOTE: push_begin is preferred since name must match operator name for redo panels to work.
Definition at line 1995 of file sculpt_undo.cc.
References blender::BKE_undosys_step_push_init_with_type(), blender::BKE_UNDOSYS_TYPE_SCULPT, blender::bke::pbvh::BMesh, C, blender::ed::sculpt_paint::undo::SculptUndoStep::data, blender::Object::data, blender::ED_undo_stack_get(), blender::ED_undosys_stack_memfile_id_changed_tag(), blender::SubdivCCG::grid_size, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::undo::StepData::grids, blender::SubdivCCG::grids_num, blender::Object::id, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::undo::StepData::mesh, blender::bke::object::pbvh_get(), push_begin_ex(), blender::Object::runtime, save_common_data(), blender::bke::ObjectRuntime::sculpt_session, and blender::SculptSession::subdiv_ccg.
Referenced by blender::ed::sculpt_paint::dyntopo::disable_with_undo(), blender::ed::sculpt_paint::dyntopo::enable_with_undo(), blender::ed::sculpt_paint::hide::hide_show_all_exec(), blender::ed::sculpt_paint::hide::hide_show_masked_exec(), blender::ed::sculpt_paint::init_transform(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), push_begin(), push_begin_ex(), push_multires_mesh_begin(), and blender::ed::sculpt_paint::SculptPaintStroke::test_start().
| void blender::ed::sculpt_paint::undo::push_end | ( | Object & | ob | ) |
Definition at line 2130 of file sculpt_undo.cc.
References push_end(), and push_end_ex().
Referenced by blender::ed::sculpt_paint::face_set::change_visibility_exec(), blender::ed::sculpt_paint::face_set::create_op_exec(), blender::ed::sculpt_paint::SculptPaintStroke::done(), blender::ed::sculpt_paint::face_set::edit_grow_shrink(), blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), blender::ed::sculpt_paint::end_transform(), blender::ed::sculpt_paint::expand::finish(), blender::ed::sculpt_paint::face_set::gesture_end(), blender::ed::sculpt_paint::mask::gesture_end(), blender::ed::sculpt_paint::project::gesture_end(), blender::ed::sculpt_paint::hide::hide_show_all_exec(), blender::ed::sculpt_paint::hide::hide_show_end(), blender::ed::sculpt_paint::hide::hide_show_masked_exec(), blender::ed::sculpt_paint::face_set::init_op_exec(), blender::ed::sculpt_paint::mask::mask_by_color(), blender::ed::sculpt_paint::mask::mask_flood_fill_exec(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), push_end(), push_multires_mesh_end(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_end(), blender::ed::sculpt_paint::dyntopo::sculpt_detail_flood_fill_exec(), blender::ed::sculpt_paint::expand::sculpt_expand_cancel(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_exec(), blender::ed::sculpt_paint::sculpt_mode_toggle_exec(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::ed::sculpt_paint::symmetrize_exec(), blender::ed::sculpt_paint::hide::visibility_filter_exec(), and blender::ed::sculpt_paint::hide::visibility_invert_exec().
| void blender::ed::sculpt_paint::undo::push_end_ex | ( | Object & | ob, |
| const bool | use_nested_undo ) |
Definition at line 2075 of file sculpt_undo.cc.
References get_step_data(), node, blender::ed::sculpt_paint::undo::StepData::nodes, blender::threading::parallel_reduce(), Position, blender::ed::sculpt_paint::undo::StepData::position_step_storage, push_end_ex(), blender::ed::sculpt_paint::undo::StepData::type, blender::ed::sculpt_paint::undo::StepData::undo_nodes_by_pbvh_node, and blender::ed::sculpt_paint::undo::StepData::undo_size.
Referenced by blender::ed::sculpt_paint::dyntopo::disable_with_undo(), blender::ed::sculpt_paint::dyntopo::enable_with_undo(), push_end(), push_end_ex(), and blender::ed::sculpt_paint::filter::sculpt_mesh_filter_modal().
| void blender::ed::sculpt_paint::undo::push_enter_sculpt_mode | ( | const Scene & | scene, |
| Object & | ob, | ||
| const wmOperator * | op ) |
Pushes an undo step when entering Sculpt mode.
Similar to geometry_push, this undo type does not need the PBVH to be constructed.
Definition at line 2038 of file sculpt_undo.cc.
References blender::BKE_undosys_step_push_init_with_type(), blender::BKE_UNDOSYS_TYPE_SCULPT, C, blender::Object::data, blender::ED_undo_stack_get(), blender::ED_undosys_stack_memfile_id_changed_tag(), blender::Object::id, blender::wmOperatorType::name, push_enter_sculpt_mode(), save_common_data(), and blender::wmOperator::type.
Referenced by push_enter_sculpt_mode(), and blender::ed::sculpt_paint::sculpt_mode_toggle_exec().
| void blender::ed::sculpt_paint::undo::push_multires_mesh_begin | ( | bContext * | C, |
| const char * | str ) |
Undo for changes happening on a base mesh for multires sculpting. if there is no multi-res sculpt active regular undo is used.
Definition at line 2470 of file sculpt_undo.cc.
References C, blender::CTX_data_active_object(), blender::CTX_data_scene(), geometry_push(), blender::multires_flush_sculpt_updates(), push_begin_ex(), push_multires_mesh_begin(), str, and use_multires_mesh().
Referenced by blender::ed::object::multires_base_apply_exec(), and push_multires_mesh_begin().
| void blender::ed::sculpt_paint::undo::push_multires_mesh_end | ( | bContext * | C, |
| const char * | str ) |
Definition at line 2486 of file sculpt_undo.cc.
References C, blender::CTX_data_active_object(), blender::ED_undo_push(), geometry_push(), push_end(), push_multires_mesh_end(), str, and use_multires_mesh().
Referenced by blender::ed::object::multires_base_apply_exec(), and push_multires_mesh_end().
| void blender::ed::sculpt_paint::undo::push_node | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const bke::pbvh::Node * | node, | ||
| undo::Type | type ) |
Store undo data of the given type for a pbvh::Tree node. This function can be called by multiple threads concurrently, as long as they don't pass the same pbvh::Tree node.
This is only possible when building an undo step, in between push_begin and push_end.
Definition at line 1840 of file sculpt_undo.cc.
References blender::BLI_assert(), BLI_assert_unreachable, blender::SculptSession::bm, blender::bke::pbvh::BMesh, bmesh_push(), DyntopoBegin, DyntopoEnd, ELEM, ensure_node(), fill_node_data_grids(), fill_node_data_mesh(), get_step_data(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::SculptSession::needs_flush_to_id, node, None, blender::bke::object::pbvh_get(), push_node(), and blender::ed::sculpt_paint::undo::StepData::type.
Referenced by blender::ed::sculpt_paint::mask::apply_new_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_new_mask_grids(), blender::ed::sculpt_paint::mask::apply_new_mask_mesh(), blender::ed::sculpt_paint::face_set::clear_face_sets(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_bmesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_mesh(), blender::ed::sculpt_paint::dyntopo::disable_with_undo(), blender::ed::sculpt_paint::dyntopo::enable_with_undo(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::ed::sculpt_paint::mask::fill_mask_mesh(), blender::ed::sculpt_paint::face_set::gesture_apply_bmesh(), blender::ed::sculpt_paint::mask::gesture_apply_for_symmetry_pass(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), blender::ed::sculpt_paint::hide::grid_hide_update(), blender::ed::sculpt_paint::mask::increase_contrast_mask_bmesh(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::mask::increase_contrast_mask_mesh(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), blender::ed::sculpt_paint::hide::partialvis_update_bmesh_nodes(), push_node(), blender::ed::sculpt_paint::dyntopo::sculpt_detail_flood_fill_exec(), blender::ed::sculpt_paint::symmetrize_exec(), blender::ed::sculpt_paint::mask::update_mask_mesh(), blender::ed::sculpt_paint::hide::update_undo_state(), and blender::ed::sculpt_paint::hide::vert_hide_update().
| void blender::ed::sculpt_paint::undo::push_nodes | ( | const Depsgraph & | depsgraph, |
| Object & | object, | ||
| const IndexMask & | node_mask, | ||
| const Type | type ) |
Definition at line 1879 of file sculpt_undo.cc.
References blender::BLI_assert(), blender::SculptSession::bm, bmesh_push(), DyntopoBegin, DyntopoEnd, blender::Editor, ELEM, ensure_node(), blender::index_mask::IndexMask::foreach_index(), get_step_data(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::SculptSession::needs_flush_to_id, None, blender::threading::parallel_for(), blender::bke::object::pbvh_get(), PRF_scope, push_nodes(), and blender::ed::sculpt_paint::undo::StepData::type.
Referenced by blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::dynamic_topology_update(), blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), blender::ed::sculpt_paint::mask::fill_mask_bmesh(), blender::ed::sculpt_paint::project::gesture_apply_for_symmetry_pass(), blender::ed::sculpt_paint::hide::grids_show_all(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_grid(), blender::ed::sculpt_paint::mask::init_mask_grids(), blender::ed::sculpt_paint::face_set::init_op_exec(), blender::ed::sculpt_paint::mask::invert_mask_bmesh(), blender::ed::sculpt_paint::mask::invert_mask_grids(), blender::ed::sculpt_paint::hide::invert_visibility_bmesh(), blender::ed::sculpt_paint::hide::invert_visibility_grids(), blender::ed::sculpt_paint::hide::invert_visibility_mesh(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::hide::mesh_show_all(), push_nodes(), blender::ed::sculpt_paint::push_undo_nodes(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::ed::sculpt_paint::expand::undo_push(), and blender::ed::sculpt_paint::mask::write_mask_mesh().
|
static |
Definition at line 1058 of file sculpt_undo.cc.
References blender::BKE_multires_create_deformed_base_mesh_vert_coords(), blender::data, blender::bke::subdiv::eval_refine_from_mesh(), blender::SculptSession::multires_modifier, and refine_subdiv().
Referenced by refine_subdiv(), and restore_list().
| void blender::ed::sculpt_paint::undo::register_type | ( | UndoType * | ut | ) |
Definition at line 2422 of file sculpt_undo.cc.
References blender::UndoType::flags, blender::UndoType::identifier, blender::UndoType::poll, register_type(), step_decode(), blender::UndoType::step_decode, step_encode(), blender::UndoType::step_encode, step_encode_init(), blender::UndoType::step_encode_init, step_free(), blender::UndoType::step_free, blender::UndoType::step_size, and blender::UNDOTYPE_FLAG_DECODE_ACTIVE_STEP.
Referenced by blender::ED_undosys_type_init(), and register_type().
|
static |
Definition at line 519 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::StepData::active_shape_key_name, blender::BKE_key_from_object(), blender::BKE_keyblock_find_name(), blender::BKE_sculptsession_update_for_edit(), blender::BLI_findindex(), blender::Key::block, C, blender::KeyBlock::name, NC_OBJECT, ND_DATA, restore_active_shape_key(), blender::SculptSession::shapekey_active, and blender::WM_event_add_notifier().
Referenced by restore_active_shape_key(), and restore_list().
|
static |
Definition at line 744 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::color::active_color_attribute_for_write(), blender::bke::Corner, blender::data, blender::bke::GSpanAttributeWriter::domain, blender::Editor, blender::MutableSpan< T >::fill_indices(), blender::bke::GSpanAttributeWriter::finish(), blender::ed::sculpt_paint::undo::StepData::nodes, blender::bke::Point, PRF_scope, restore_color(), blender::bke::GSpanAttributeWriter::span, and blender::ed::sculpt_paint::color::swap_gathered_colors().
Referenced by restore_color(), and restore_list().
|
static |
Definition at line 1089 of file sculpt.cc.
References blender::ed::sculpt_paint::color::active_color_attribute_for_write(), blender::BLI_assert(), blender::ed::sculpt_paint::color::color_vert_set(), blender::data, blender::bke::GSpanAttributeWriter::domain, blender::bke::GSpanAttributeWriter::finish(), blender::index_mask::IndexMask::foreach_index(), blender::IndexMask::from_predicate(), blender::exec_mode::grain_size(), blender::Span< T >::index_range(), blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::orig_color_data_lookup_mesh(), blender::bke::object::pbvh_get(), restore_color_from_undo_step(), and blender::bke::GSpanAttributeWriter::span.
Referenced by restore_color_from_undo_step(), and restore_from_undo_step().
|
static |
Definition at line 1125 of file sculpt.cc.
References blender::bke::pbvh::all_leaf_nodes(), attribute, blender::bke::pbvh::BMesh, blender::data, blender::ed::sculpt_paint::face_set::ensure_face_sets_mesh(), blender::index_mask::IndexMask::foreach_index(), blender::IndexMask::from_bools(), blender::exec_mode::grain_size(), blender::bke::pbvh::Grids, blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::node_face_indices_calc_grids(), blender::ed::sculpt_paint::orig_face_set_data_lookup_grids(), blender::ed::sculpt_paint::orig_face_set_data_lookup_mesh(), blender::bke::object::pbvh_get(), restore_face_set_from_undo_step(), blender::ed::sculpt_paint::scatter_data_mesh(), and blender::SculptSession::subdiv_ccg.
Referenced by restore_face_set_from_undo_step(), and restore_from_undo_step().
|
static |
Definition at line 814 of file sculpt_undo.cc.
References blender::data, blender::Editor, blender::ed::sculpt_paint::face_set::ensure_face_sets_mesh(), blender::ed::sculpt_paint::undo::Node::face_indices, blender::ed::sculpt_paint::undo::Node::face_sets, blender::bke::SpanAttributeWriter< T >::finish(), blender::Span< T >::index_range(), PRF_scope, restore_face_sets(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by restore_face_sets(), and restore_list().
| void blender::ed::sculpt_paint::undo::restore_from_bmesh_enter_geometry | ( | const StepData & | step_data, |
| Mesh & | mesh ) |
Definition at line 1035 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::StepData::bmesh, restore_from_bmesh_enter_geometry(), and restore_geometry_data().
Referenced by blender::ed::sculpt_paint::dyntopo::disable(), and restore_from_bmesh_enter_geometry().
|
static |
Definition at line 1309 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeToggleSettings::alt_smooth, blender::BKE_paint_brush_for_read(), blender::SculptSession::cache, blender::Sculpt::paint, blender::bke::object::pbvh_get(), restore_color_from_undo_step(), restore_face_set_from_undo_step(), restore_from_undo_step(), restore_mask_from_undo_step(), restore_position_from_undo_step(), blender::SCULPT_BRUSH_TYPE_BLUR, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::ed::sculpt_paint::StrokeCache::toggle_settings, and blender::bke::pbvh::update_normals().
Referenced by restore_from_undo_step(), blender::ed::sculpt_paint::restore_from_undo_step_if_necessary(), and blender::ed::sculpt_paint::sculpt_brush_stroke_cancel().
|
static |
Definition at line 988 of file sculpt_undo.cc.
References blender::BKE_sculptsession_free_pbvh(), blender::data, blender::DEG_id_tag_update(), blender::Editor, blender::ed::sculpt_paint::undo::StepData::geometry_modified, blender::ed::sculpt_paint::undo::StepData::geometry_original, blender::ID_RECALC_GEOMETRY, blender::ed::sculpt_paint::undo::StepData::needs_undo(), PRF_scope, restore_geometry(), restore_geometry_data(), blender::ed::sculpt_paint::undo::StepData::tag_needs_redo(), and blender::ed::sculpt_paint::undo::StepData::tag_needs_undo().
Referenced by restore_geometry(), and restore_list().
|
static |
Definition at line 949 of file sculpt_undo.cc.
References blender::BKE_mesh_clear_geometry(), blender::BLI_assert(), blender::CD_MASK_MESH, blender::implicit_sharing::copy_shared_pointer(), blender::CustomData_init_from(), blender::Editor, blender::CustomData_MeshMasks::emask, blender::CustomData_MeshMasks::lmask, blender::CustomData_MeshMasks::pmask, PRF_scope, restore_geometry_data(), and blender::CustomData_MeshMasks::vmask.
Referenced by restore_from_bmesh_enter_geometry(), restore_geometry(), and restore_geometry_data().
|
static |
Definition at line 721 of file sculpt_undo.cc.
References blender::data, blender::Editor, blender::bke::Face, blender::ed::sculpt_paint::undo::Node::face_hidden, blender::ed::sculpt_paint::undo::Node::face_indices, blender::bke::SpanAttributeWriter< T >::finish(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), PRF_scope, restore_hidden_face(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by restore_hidden_face(), and restore_list().
|
static |
Definition at line 1069 of file sculpt_undo.cc.
References blender::bke::pbvh::all_leaf_nodes(), blender::BKE_pbvh_sync_visibility_from_verts(), blender::BKE_sculpt_multires_active(), blender::BKE_sculptsession_free_deformMats(), blender::BKE_sculptsession_update_for_edit(), blender::BKE_sculptsession_use_pbvh_draw(), blender::BKE_subdiv_ccg_key_top_level(), blender::BKE_view_layer_active_object_get(), blender::BKE_view_layer_synced_ensure(), blender::BLI_assert(), BLI_assert_unreachable, blender::SculptSession::bm, bmesh_restore(), C, CLOG_WARN, Color, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::CTX_wm_region_view3d(), blender::data, blender::SculptSession::deform_modifiers_active, blender::DEG_id_tag_update(), DyntopoBegin, DyntopoEnd, blender::Editor, FaceSet, blender::IndexMask::from_predicate(), Geometry, blender::exec_mode::grain_size(), blender::bke::pbvh::Grids, blender::SubdivCCG::grids_num, HideFace, HideVert, ID_REAL_USERS, blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SHADING, indices_contain_true(), blender::LOG, Mask, blender::bke::pbvh::Mesh, blender::MULTIRES_COORDS_MODIFIED, blender::MULTIRES_HIDDEN_MODIFIED, blender::multires_mark_as_modified(), blender::bke::pbvh::node_face_indices_calc_grids(), blender::ed::sculpt_paint::undo::StepData::nodes, None, blender::ed::sculpt_paint::undo::StepData::object_name, blender::bke::object::pbvh_ensure(), blender::ed::sculpt_paint::undo::StepData::pivot_pos, blender::SculptSession::pivot_pos, blender::ed::sculpt_paint::undo::StepData::pivot_rot, blender::SculptSession::pivot_rot, Position, blender::ed::sculpt_paint::undo::StepData::position_step_storage, PRF_scope, refine_subdiv(), restore_active_shape_key(), restore_color(), restore_face_sets(), restore_geometry(), restore_hidden_face(), restore_list(), restore_mask_grids(), restore_mask_mesh(), restore_position_grids(), restore_position_mesh(), restore_vert_visibility_grids(), restore_vert_visibility_mesh(), blender::SculptSession::shapekey_active, blender::bke::pbvh::store_bounds_orig(), blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::hide::sync_all_from_faces(), topology_matches(), blender::ed::sculpt_paint::undo::StepData::type, blender::bke::pbvh::update_mask_grids(), blender::bke::pbvh::update_mask_mesh(), and use_multires_undo().
Referenced by restore_list(), step_decode_redo_impl(), and step_decode_undo_impl().
|
static |
Definition at line 1008 of file sculpt.cc.
References blender::bke::pbvh::all_leaf_nodes(), blender::BKE_pbvh_bmesh_node_unique_verts(), blender::BKE_subdiv_ccg_key_top_level(), blender::SculptSession::bm, BM_ELEM_CD_SET_FLOAT, blender::SculptSession::bm_log, blender::BM_log_find_original_vert_mask(), blender::bke::pbvh::BMesh, blender::CD_PROP_FLOAT, blender::CustomData_get_offset_named(), blender::data, blender::index_mask::IndexMask::foreach_index(), blender::IndexMask::from_bools(), blender::exec_mode::grain_size(), blender::CCGKey::grid_area, blender::bke::ccg::grid_range(), blender::bke::pbvh::Grids, blender::IndexRange::IndexRange(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::pbvh::Mesh, blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::node_update_mask_bmesh(), blender::bke::pbvh::node_update_mask_grids(), blender::bke::pbvh::node_update_mask_mesh(), blender::ed::sculpt_paint::orig_mask_data_lookup_grids(), blender::ed::sculpt_paint::orig_mask_data_lookup_mesh(), blender::bke::object::pbvh_get(), blender::bke::Point, restore_mask_from_undo_step(), blender::ed::sculpt_paint::scatter_data_mesh(), blender::SculptSession::subdiv_ccg, and blender::BMesh::vdata.
Referenced by restore_from_undo_step(), and restore_mask_from_undo_step().
|
static |
Definition at line 791 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::BKE_subdiv_ccg_key_top_level(), blender::data, blender::Editor, blender::MutableSpan< T >::fill_indices(), blender::bke::ccg::grid_range(), blender::ed::sculpt_paint::undo::Node::grids, blender::Span< T >::index_range(), blender::ed::sculpt_paint::undo::Node::mask, blender::SubdivCCG::masks, PRF_scope, restore_mask_grids(), blender::MutableSpan< T >::slice(), and blender::SculptSession::subdiv_ccg.
Referenced by restore_list(), and restore_mask_grids().
|
static |
Definition at line 769 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::BKE_object_get_original_mesh(), blender::Editor, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::ed::sculpt_paint::undo::Node::mask, blender::bke::Point, PRF_scope, restore_mask_mesh(), blender::ed::sculpt_paint::undo::Node::unique_verts_num, and blender::ed::sculpt_paint::undo::Node::vert_indices.
Referenced by restore_list(), and restore_mask_mesh().
| void blender::ed::sculpt_paint::undo::restore_position_from_undo_step | ( | const Depsgraph & | depsgraph, |
| Object & | object ) |
Definition at line 1181 of file sculpt.cc.
References blender::bke::pbvh::all_leaf_nodes(), blender::ed::sculpt_paint::apply_crazyspace_to_translations(), blender::ed::sculpt_paint::apply_translations(), blender::BKE_pbvh_bmesh_node_unique_verts(), blender::BKE_subdiv_ccg_key_top_level(), blender::SculptSession::bm_log, blender::BM_log_find_original_vert_co(), blender::bke::pbvh::BMesh, blender::copy_v3_v3(), blender::data, blender::MutableSpan< T >::data(), blender::SculptSession::deform_imats, blender::index_mask::IndexMask::foreach_index(), blender::ed::sculpt_paint::ShapeKeyData::from_object(), blender::IndexMask::from_predicate(), blender::exec_mode::grain_size(), blender::CCGKey::grid_area, blender::SubdivCCG::grid_hidden, blender::bke::ccg::grid_range(), blender::bke::pbvh::Grids, has_bmesh_log_entry(), blender::IndexRange::IndexRange(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::threading::isolate_task(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::orig_position_data_lookup_grids(), blender::ed::sculpt_paint::orig_position_data_lookup_mesh(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::OrigPositionData::positions, blender::SubdivCCG::positions, restore_position_from_undo_step(), blender::ed::sculpt_paint::scatter_data_mesh(), blender::Span< T >::size(), blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::translations_from_new_positions(), and blender::bke::pbvh::vert_positions_eval_for_write().
Referenced by blender::ed::sculpt_paint::cancel_modal_transform(), restore_from_undo_step(), restore_position_from_undo_step(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_cancel(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_modal(), and blender::ed::sculpt_paint::sculpt_transform_all_vertices().
|
static |
Definition at line 632 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::PositionUndoStorage::compressed_indices, blender::ed::sculpt_paint::undo::PositionUndoStorage::compressed_positions, blender::data, blender::Editor, blender::MutableSpan< T >::fill_indices(), blender::ed::sculpt_paint::undo::compression::filter_compress< float3 >(), blender::ed::sculpt_paint::undo::compression::filter_decompress< float3 >(), blender::ed::sculpt_paint::undo::compression::filter_decompress< int >(), blender::bke::ccg::grid_range(), blender::Span< T >::index_range(), blender::IndexRange::IndexRange(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::threading::parallel_for(), PRF_scope, restore_position_grids(), and blender::MutableSpan< T >::slice().
Referenced by restore_list(), and restore_position_grids().
|
static |
Definition at line 557 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::apply_translations(), blender::MutableSpan< T >::as_span(), blender::ed::sculpt_paint::undo::PositionUndoStorage::compressed_indices, blender::ed::sculpt_paint::undo::PositionUndoStorage::compressed_positions, blender::data, blender::SculptSession::deform_modifiers_active, blender::Editor, blender::ed::sculpt_paint::undo::PositionUndoStorage::ensure_compression_complete(), blender::MutableSpan< T >::fill_indices(), blender::ed::sculpt_paint::undo::compression::filter_compress< float3 >(), blender::ed::sculpt_paint::undo::compression::filter_decompress< float3 >(), blender::ed::sculpt_paint::undo::compression::filter_decompress< int >(), blender::ed::sculpt_paint::ShapeKeyData::from_object(), blender::IndexRange::IndexRange(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::threading::parallel_for(), PRF_scope, restore_position_mesh(), blender::ed::sculpt_paint::scatter_data_mesh(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::Span< T >::size(), swap_indexed_data(), blender::MutableSpan< T >::take_front(), blender::ed::sculpt_paint::translations_from_new_positions(), and blender::ed::sculpt_paint::undo::PositionUndoStorage::unique_verts_nums.
Referenced by restore_list(), and restore_position_mesh().
|
static |
Definition at line 694 of file sculpt_undo.cc.
References b, blender::BKE_subdiv_ccg_grid_hidden_ensure(), blender::BKE_subdiv_ccg_grid_hidden_free(), blender::Editor, blender::MutableSpan< T >::fill_indices(), blender::ed::sculpt_paint::undo::Node::grid_hidden, blender::ed::sculpt_paint::undo::Node::grids, blender::bits::MutableBitSpan::index_range(), blender::Span< T >::index_range(), PRF_scope, and restore_vert_visibility_grids().
Referenced by restore_list(), and restore_vert_visibility_grids().
|
static |
Definition at line 674 of file sculpt_undo.cc.
References blender::data, blender::Editor, blender::bke::SpanAttributeWriter< T >::finish(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::Point, PRF_scope, restore_vert_visibility_mesh(), blender::bke::SpanAttributeWriter< T >::span, blender::IndexRange::take_front(), blender::ed::sculpt_paint::undo::Node::unique_verts_num, blender::ed::sculpt_paint::undo::Node::vert_hidden, and blender::ed::sculpt_paint::undo::Node::vert_indices.
Referenced by restore_list(), and restore_vert_visibility_mesh().
|
static |
Definition at line 1942 of file sculpt_undo.cc.
References blender::BKE_object_get_original_mesh(), blender::ed::sculpt_paint::undo::SculptAttrRef::domain, blender::bke::mesh::is_color_attribute(), blender::bke::AttributeAccessor::lookup_meta_data(), blender::ed::sculpt_paint::undo::SculptAttrRef::name, save_active_attribute(), blender::ed::sculpt_paint::undo::SculptAttrRef::type, and blender::ed::sculpt_paint::undo::SculptAttrRef::was_set.
Referenced by save_active_attribute(), save_common_data(), and set_active_layer().
|
static |
Does not save topology counts, as that data is unneeded for full geometry pushes and requires the PBVH to exist.
Definition at line 1969 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_end, blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_start, blender::ed::sculpt_paint::undo::StepData::active_shape_key_name, blender::BKE_keyblock_from_object(), blender::ed::sculpt_paint::undo::SculptUndoStep::data, blender::Object::id, blender::ID::name, blender::ed::sculpt_paint::undo::StepData::object_name, blender::ed::sculpt_paint::undo::StepData::pivot_pos, blender::SculptSession::pivot_pos, blender::ed::sculpt_paint::undo::StepData::pivot_rot, blender::SculptSession::pivot_rot, blender::Object::runtime, save_active_attribute(), save_common_data(), blender::bke::ObjectRuntime::sculpt_session, and blender::ed::sculpt_paint::undo::SculptAttrRef::was_set.
Referenced by geometry_begin_ex(), push_begin_ex(), push_enter_sculpt_mode(), and save_common_data().
|
static |
Definition at line 2139 of file sculpt_undo.cc.
References blender::BKE_id_attributes_active_color_set(), blender::BKE_object_get_original_mesh(), C, blender::bke::AttributeAccessor::contains(), blender::ed::geometry::convert_attribute(), blender::bke::cpp_type_to_attribute_type(), blender::CTX_data_active_object(), blender::DEG_id_tag_update(), blender::ed::sculpt_paint::undo::SculptAttrRef::domain, blender::AttributeOwner::from_id(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::bke::AttributeAccessor::lookup(), blender::ed::sculpt_paint::undo::SculptAttrRef::name, save_active_attribute(), set_active_layer(), and blender::ed::sculpt_paint::undo::SculptAttrRef::type.
Referenced by set_active_layer(), step_decode_redo(), and step_decode_undo().
|
static |
Definition at line 2287 of file sculpt_undo.cc.
References blender::BKE_scene_graph_evaluated_ensure(), blender::BKE_view_layer_active_object_get(), blender::BKE_view_layer_synced_ensure(), blender::BLI_assert(), C, blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::Object::data, blender::Main::is_memfile_undo_flush_needed, blender::ME_SCULPT_DYNAMIC_TOPOLOGY, blender::Object::mode, blender::ed::object::mode_generic_exit(), blender::SculptSession::needs_flush_to_id, blender::OB_MESH, blender::OB_MODE_SCULPT, blender::ed::sculpt_paint::object_sculpt_mode_enter(), blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, step_decode(), step_decode_redo(), step_decode_undo(), blender::STEP_INVALID, blender::STEP_REDO, blender::STEP_UNDO, and blender::Object::type.
Referenced by register_type(), and step_decode().
|
static |
Definition at line 2266 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_end, blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_start, C, blender::UndoStep::is_applied, blender::UndoStep::next, blender::UndoStep::prev, set_active_layer(), blender::ed::sculpt_paint::undo::SculptUndoStep::step, step_decode_redo(), step_decode_redo_impl(), and blender::UndoStep::type.
Referenced by step_decode(), and step_decode_redo().
|
static |
Definition at line 2225 of file sculpt_undo.cc.
References blender::BLI_assert(), C, blender::ed::sculpt_paint::undo::SculptUndoStep::data, blender::UndoStep::is_applied, restore_list(), blender::ed::sculpt_paint::undo::SculptUndoStep::step, and step_decode_redo_impl().
Referenced by step_decode_redo(), and step_decode_redo_impl().
|
static |
Definition at line 2233 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_end, blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_start, blender::BKE_UNDOSYS_TYPE_SCULPT, blender::BLI_assert(), C, blender::UndoStep::is_applied, blender::UndoStep::next, blender::UndoStep::prev, set_active_layer(), blender::ed::sculpt_paint::undo::SculptUndoStep::step, step_decode_undo(), step_decode_undo_impl(), and blender::UndoStep::type.
Referenced by step_decode(), and step_decode_undo().
|
static |
Definition at line 2217 of file sculpt_undo.cc.
References blender::BLI_assert(), C, blender::ed::sculpt_paint::undo::SculptUndoStep::data, blender::UndoStep::is_applied, restore_list(), blender::ed::sculpt_paint::undo::SculptUndoStep::step, and step_decode_undo_impl().
Referenced by step_decode_undo(), and step_decode_undo_impl().
|
static |
Definition at line 2197 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::SculptUndoStep::data, blender::UndoStep::data_size, DyntopoEnd, blender::UndoStep::is_applied, blender::Main::is_memfile_undo_flush_needed, None, blender::ed::sculpt_paint::undo::SculptUndoStep::step, step_encode(), blender::ed::sculpt_paint::undo::StepData::type, blender::ed::sculpt_paint::undo::StepData::undo_size, and blender::UndoStep::use_memfile_step.
Referenced by register_type(), and step_encode().
Definition at line 2189 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_end, blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_start, blender::ed::sculpt_paint::undo::SculptUndoStep::data, and step_encode_init().
Referenced by register_type(), and step_encode_init().
|
static |
Definition at line 2340 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_end, blender::ed::sculpt_paint::undo::SculptUndoStep::active_color_start, blender::ed::sculpt_paint::undo::SculptUndoStep::data, free_step_data(), and step_free().
Referenced by register_type(), and step_free().
| size_t blender::ed::sculpt_paint::undo::step_memory_size_get | ( | UndoStep * | step | ) |
Definition at line 467 of file sculpt_undo.cc.
References blender::BKE_UNDOSYS_TYPE_SCULPT, blender::ed::sculpt_paint::undo::SculptUndoStep::data, blender::ed::sculpt_paint::undo::StepData::position_step_storage, step, step_memory_size_get(), and blender::ed::sculpt_paint::undo::StepData::undo_size.
Referenced by blender::ED_undosys_total_memory_calc(), and step_memory_size_get().
|
static |
Definition at line 1540 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::color::active_color_attribute(), blender::ed::sculpt_paint::undo::Node::col, blender::bke::Corner, blender::ed::sculpt_paint::undo::Node::corner_indices, blender::bke::GAttributeReader::domain, blender::Editor, blender::ed::sculpt_paint::color::gather_colors(), blender::ed::sculpt_paint::color::gather_colors_vert(), blender::ed::sculpt_paint::undo::Node::loop_col, node, PRF_scope, blender::Span< T >::size(), and store_color().
Referenced by fill_node_data_mesh(), and store_color().
Definition at line 1588 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::Editor, blender::bke::Face, blender::ed::sculpt_paint::undo::Node::face_indices, blender::ed::sculpt_paint::undo::Node::face_sets, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::ed::sculpt_paint::gather_data_mesh(), blender::blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), PRF_scope, and store_face_sets().
Referenced by fill_node_data_grids(), fill_node_data_mesh(), and store_face_sets().
|
static |
Definition at line 1500 of file sculpt_undo.cc.
References blender::Editor, blender::bke::Face, blender::ed::sculpt_paint::undo::Node::face_hidden, blender::ed::sculpt_paint::undo::Node::face_indices, blender::Span< T >::index_range(), blender::blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), PRF_scope, and store_face_visibility().
Referenced by fill_node_data_grids(), fill_node_data_mesh(), and store_face_visibility().
|
static |
Definition at line 921 of file sculpt_undo.cc.
References blender::BLI_assert(), blender::CD_MASK_MESH, blender::implicit_sharing::copy_shared_pointer(), blender::CustomData_init_from(), blender::data, blender::Editor, blender::CustomData_MeshMasks::emask, blender::CustomData_MeshMasks::lmask, blender::CustomData_MeshMasks::pmask, PRF_scope, store_geometry_data(), and blender::CustomData_MeshMasks::vmask.
Referenced by bmesh_push(), geometry_push(), and store_geometry_data().
|
static |
Definition at line 1528 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Editor, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::ed::sculpt_paint::gather_data_grids(), blender::ed::sculpt_paint::undo::Node::grids, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::ed::sculpt_paint::undo::Node::mask, blender::SubdivCCG::masks, PRF_scope, and store_mask_grids().
Referenced by fill_node_data_grids(), and store_mask_grids().
Definition at line 1515 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Editor, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::ed::sculpt_paint::gather_data_mesh(), blender::bke::AttributeAccessor::lookup(), blender::ed::sculpt_paint::undo::Node::mask, blender::bke::Point, PRF_scope, store_mask_mesh(), and blender::ed::sculpt_paint::undo::Node::vert_indices.
Referenced by fill_node_data_mesh(), and store_mask_mesh().
|
static |
Definition at line 1475 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Editor, blender::ed::sculpt_paint::gather_data_grids(), blender::ed::sculpt_paint::undo::Node::grids, blender::ed::sculpt_paint::undo::Node::normal, blender::SubdivCCG::normals, blender::ed::sculpt_paint::undo::Node::position, blender::SubdivCCG::positions, PRF_scope, and store_positions_grids().
Referenced by fill_node_data_grids(), and store_positions_grids().
|
static |
Definition at line 1452 of file sculpt_undo.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::data, blender::KeyBlock::data, blender::SculptSession::deform_modifiers_active, blender::Editor, blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::undo::Node::normal, blender::ed::sculpt_paint::undo::Node::orig_position, blender::ed::sculpt_paint::undo::Node::position, PRF_scope, blender::SculptSession::shapekey_active, blender::Span< T >::Span(), store_positions_mesh(), blender::ed::sculpt_paint::undo::Node::vert_indices, blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by fill_node_data_mesh(), and store_positions_mesh().
|
static |
Definition at line 1435 of file sculpt_undo.cc.
References blender::Editor, blender::ed::sculpt_paint::undo::Node::grid_hidden, blender::SubdivCCG::grid_hidden, blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::group_size(), blender::Span< T >::index_range(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), node, PRF_scope, blender::Span< T >::size(), and store_vert_visibility_grids().
Referenced by fill_node_data_grids(), and store_vert_visibility_grids().
|
static |
Definition at line 1484 of file sculpt_undo.cc.
References blender::Editor, blender::Span< T >::index_range(), blender::blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), node, blender::bke::Point, PRF_scope, store_vert_visibility_mesh(), and blender::ed::sculpt_paint::undo::Node::vert_hidden.
Referenced by fill_node_data_mesh(), and store_vert_visibility_mesh().
|
static |
Definition at line 548 of file sculpt_undo.cc.
References blender::BLI_assert(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and swap_indexed_data().
Referenced by restore_position_mesh(), and swap_indexed_data().
|
static |
Definition at line 502 of file sculpt_undo.cc.
References blender::data, blender::SubdivCCG::grid_size, blender::ed::sculpt_paint::undo::StepData::grids, blender::SubdivCCG::grids_num, blender::ed::sculpt_paint::undo::StepData::mesh, blender::SculptSession::subdiv_ccg, topology_matches(), and use_multires_undo().
Referenced by restore_list(), and topology_matches().
|
static |
Definition at line 2458 of file sculpt_undo.cc.
References blender::BKE_paintmode_get_active_from_context(), C, blender::CTX_data_active_object(), blender::SculptSession::multires_modifier, blender::Sculpt, and use_multires_mesh().
Referenced by push_multires_mesh_begin(), push_multires_mesh_end(), and use_multires_mesh().
|
static |
Definition at line 497 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::StepData::grids, blender::SculptSession::subdiv_ccg, and use_multires_undo().
Referenced by restore_list(), topology_matches(), and use_multires_undo().