Blender
V3.3
|
#include <stddef.h>
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "BKE_attribute.h"
#include "BKE_ccg.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_runtime.h"
#include "BKE_multires.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_scene.h"
#include "BKE_subdiv_ccg.h"
#include "BKE_subsurf.h"
#include "BKE_undo_system.h"
#include "BKE_subdiv_eval.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_geometry.h"
#include "ED_object.h"
#include "ED_sculpt.h"
#include "ED_undo.h"
#include "bmesh.h"
#include "sculpt_intern.h"
Go to the source code of this file.
Classes | |
struct | UndoSculpt |
struct | SculptAttrRef |
struct | SculptUndoStep |
struct | PartialUpdateData |
Macros | |
#define | NO_ACTIVE_LAYER ATTR_DOMAIN_AUTO |
Typedefs | |
typedef struct UndoSculpt | UndoSculpt |
typedef struct SculptAttrRef | SculptAttrRef |
typedef struct SculptUndoStep | SculptUndoStep |
Implements the Sculpt Mode tools.
Definition in file sculpt_undo.c.
#define NO_ACTIVE_LAYER ATTR_DOMAIN_AUTO |
Definition at line 100 of file sculpt_undo.c.
typedef struct SculptAttrRef SculptAttrRef |
typedef struct SculptUndoStep SculptUndoStep |
typedef struct UndoSculpt UndoSculpt |
Definition at line 1833 of file sculpt_undo.c.
References NULL, SCULPT_UNDO_GEOMETRY, SCULPT_undo_push_begin(), and SCULPT_undo_push_node().
Referenced by paint_mask_slice_exec(), quadriflow_start_job(), sculpt_face_set_edit_modify_geometry(), sculpt_symmetrize_exec(), and voxel_remesh_exec().
Definition at line 1839 of file sculpt_undo.c.
References NULL, SCULPT_UNDO_GEOMETRY, SCULPT_undo_push_end(), and SCULPT_undo_push_node().
Referenced by paint_mask_slice_exec(), quadriflow_start_job(), sculpt_face_set_edit_modify_geometry(), sculpt_symmetrize_exec(), and voxel_remesh_exec().
Definition at line 1940 of file sculpt_undo.c.
References C, CTX_data_active_object(), SculptUndoNode::geometry_clear_pbvh, NULL, SCULPT_UNDO_GEOMETRY, sculpt_undo_push_all_grids(), SCULPT_undo_push_begin(), SCULPT_undo_push_node(), sculpt_undo_use_multires_mesh(), and str.
Referenced by multires_base_apply_exec().
Definition at line 1956 of file sculpt_undo.c.
References C, CTX_data_active_object(), ED_undo_push(), SculptUndoNode::geometry_clear_pbvh, NULL, SCULPT_UNDO_GEOMETRY, SCULPT_undo_push_end(), SCULPT_undo_push_node(), sculpt_undo_use_multires_mesh(), and str.
Referenced by multires_base_apply_exec().
Export for ED_undo_sys.
Definition at line 1845 of file sculpt_undo.c.
References UndoType::flags, UndoType::name, NULL, UndoType::poll, sculpt_undosys_step_decode(), sculpt_undosys_step_encode(), sculpt_undosys_step_encode_init(), sculpt_undosys_step_free(), UndoType::step_decode, UndoType::step_encode, UndoType::step_encode_init, UndoType::step_free, UndoType::step_size, and UNDOTYPE_FLAG_DECODE_ACTIVE_STEP.
Referenced by ED_undosys_type_init().
|
static |
Definition at line 1522 of file sculpt_undo.c.
References Freestyle::a, usdtokens::b(), and STREQ.
Referenced by sculpt_undo_set_active_layer().
|
static |
Definition at line 1527 of file sculpt_undo.c.
References BKE_id_attribute_domain(), BKE_id_attributes_active_color_get(), BKE_object_get_original_mesh(), BLI_strncpy(), SculptAttrRef::domain, CustomDataLayer::name, SculptAttrRef::name, NO_ACTIVE_LAYER, SculptAttrRef::type, CustomDataLayer::type, and SculptAttrRef::was_set.
Referenced by SCULPT_undo_push_begin(), SCULPT_undo_push_end_ex(), and sculpt_undo_set_active_layer().
|
static |
Definition at line 1048 of file sculpt_undo.c.
References BKE_pbvh_grid_hidden(), BKE_pbvh_node_get_grids(), SculptUndoNode::grid_hidden, MEM_allocN_len, MEM_callocN, MEM_dupallocN, node, SculptUndoNode::node, NULL, and PartialUpdateData::pbvh.
Referenced by sculpt_undo_alloc_node().
|
static |
Definition at line 1104 of file sculpt_undo.c.
References ATTR_DOMAIN_CORNER, BKE_pbvh_node_get_grids(), BKE_pbvh_node_num_loops(), BKE_pbvh_node_num_verts(), BLI_assert_msg, BLI_BITMAP_NEW, BLI_BITMAP_SIZE, SculptUndoNode::co, SculptUndoNode::col, SculptSession::deform_modifiers_active, float(), SculptUndoNode::grids, SculptUndoNode::gridsize, SculptUndoNode::index, SculptUndoNode::loop_col, SculptUndoNode::loop_index, SculptUndoNode::mask, SculptUndoNode::maxgrid, SculptUndoNode::maxloop, SculptUndoNode::maxvert, MEM_calloc_arrayN, MEM_callocN, SculptUndoNode::no, node, SculptUndoNode::node, NULL, SculptUndoNode::orig_co, SculptSession::pbvh, Object::sculpt, sculpt_undo_alloc_and_store_hidden(), sculpt_undo_alloc_node_type(), SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_UNDO_DYNTOPO_END, SCULPT_UNDO_DYNTOPO_SYMMETRIZE, SCULPT_UNDO_FACE_SETS, SCULPT_UNDO_GEOMETRY, sculpt_undo_get_nodes(), SCULPT_UNDO_HIDDEN, SCULPT_UNDO_MASK, SculptUndoNode::totgrid, SculptUndoNode::totloop, SculptSession::totvert, SculptUndoNode::totvert, type, UndoSculpt::undo_size, SculptSession::vcol_domain, and SculptUndoNode::vert_hidden.
Referenced by SCULPT_undo_push_node().
|
static |
Definition at line 1074 of file sculpt_undo.c.
References BLI_addtail(), BLI_strncpy(), Object::id, SculptUndoNode::idname, MEM_callocN, ID::name, UndoSculpt::nodes, sculpt_undo_get_nodes(), SculptUndoNode::type, type, and UndoSculpt::undo_size.
Referenced by sculpt_undo_alloc_node(), and sculpt_undo_find_or_alloc_node_type().
|
static |
Definition at line 502 of file sculpt_undo.c.
References SculptSession::bm, BM_data_layer_add(), SculptUndoNode::bm_entry, SculptSession::bm_log, BM_log_from_existing_entries_create(), bm_mesh_allocsize_default, BM_mesh_create(), CD_PAINT_MASK, Object::data, Mesh::flag, ME_SCULPT_DYNAMIC_TOPOLOGY, Object::sculpt, SCULPT_dyntopo_node_layers_add(), SCULPT_pbvh_clear(), and BMesh::vdata.
Referenced by sculpt_undo_bmesh_restore_begin(), and sculpt_undo_bmesh_restore_end().
|
static |
Definition at line 1341 of file sculpt_undo.c.
References SculptUndoNode::applied, BKE_pbvh_bmesh_node_faces(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_addtail(), BLI_gsetIterator_getKey(), BLI_strncpy(), SculptSession::bm, SculptUndoNode::bm_entry, SculptSession::bm_log, BM_log_all_added(), BM_log_before_all_removed(), BM_log_entry_add(), BM_log_face_modified(), BM_log_vert_before_modified(), PBVHVertexIter::bm_vert, PBVHVertexIter::cd_vert_mask_offset, faces, ListBase::first, SculptUndoNode::geometry_bmesh_enter, GSET_ITER, Object::id, SculptUndoNode::idname, MEM_callocN, ID::name, node, UndoSculpt::nodes, NULL, SculptSession::pbvh, PBVH_ITER_ALL, Object::sculpt, SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_UNDO_DYNTOPO_END, SCULPT_UNDO_DYNTOPO_SYMMETRIZE, SCULPT_UNDO_FACE_SETS, SCULPT_UNDO_GEOMETRY, sculpt_undo_geometry_store_data(), sculpt_undo_get_nodes(), SCULPT_UNDO_HIDDEN, SCULPT_UNDO_MASK, SculptUndoNode::type, and type.
Referenced by SCULPT_undo_push_node().
|
static |
Definition at line 647 of file sculpt_undo.c.
References SculptSession::bm_log, C, sculpt_undo_bmesh_restore_begin(), sculpt_undo_bmesh_restore_end(), sculpt_undo_bmesh_restore_generic(), SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_UNDO_DYNTOPO_END, and SculptUndoNode::type.
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 522 of file sculpt_undo.c.
References SculptUndoNode::applied, SculptSession::bm, SculptSession::bm_log, BM_log_redo(), C, SCULPT_dynamic_topology_disable(), and sculpt_undo_bmesh_enable().
Referenced by sculpt_undo_bmesh_restore().
|
static |
Definition at line 541 of file sculpt_undo.c.
References SculptUndoNode::applied, SculptSession::bm, SculptSession::bm_log, BM_log_undo(), C, NULL, SCULPT_dynamic_topology_disable(), and sculpt_undo_bmesh_enable().
Referenced by sculpt_undo_bmesh_restore().
|
static |
Definition at line 470 of file sculpt_undo.c.
References SculptUndoNode::applied, BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), SculptSession::bm, SculptSession::bm_log, BM_log_redo(), BM_log_undo(), MEM_freeN, NULL, SculptSession::pbvh, SCULPT_pbvh_clear(), sculpt_undo_bmesh_restore_generic_task_cb(), SCULPT_UNDO_MASK, and SculptUndoNode::type.
Referenced by sculpt_undo_bmesh_restore().
|
static |
Definition at line 462 of file sculpt_undo.c.
References BKE_pbvh_node_mark_redraw().
Referenced by sculpt_undo_bmesh_restore_generic().
|
static |
Definition at line 1318 of file sculpt_undo.c.
References SculptUndoNode::applied, BKE_object_get_original_mesh(), BLI_addtail(), BLI_strncpy(), CD_SCULPT_FACE_SETS, CustomData_get_layer(), SculptUndoNode::face_sets, Object::id, SculptUndoNode::idname, MEM_callocN, ID::name, UndoSculpt::nodes, Mesh::pdata, sculpt_undo_get_nodes(), Mesh::totpoly, SculptUndoNode::type, and type.
Referenced by SCULPT_undo_push_node().
|
static |
Definition at line 1091 of file sculpt_undo.c.
References LISTBASE_FOREACH, UndoSculpt::nodes, sculpt_undo_alloc_node_type(), sculpt_undo_get_nodes(), SculptUndoNode::type, and type.
Referenced by sculpt_undo_geometry_push().
Definition at line 935 of file sculpt_undo.c.
References SculptUndoNode::bm_entry, BM_log_entry_drop(), SculptUndoNode::co, SculptUndoNode::col, SculptUndoNode::face_sets, ListBase::first, SculptUndoNode::geometry_bmesh_enter, SculptUndoNode::geometry_modified, SculptUndoNode::geometry_original, SculptUndoNode::grid_hidden, SculptUndoNode::grids, SculptUndoNode::index, SculptUndoNode::loop_col, SculptUndoNode::loop_index, SculptUndoNode::mask, MEM_freeN, SculptUndoNode::next, SculptUndoNode::no, NULL, SculptUndoNode::orig_co, sculpt_undo_geometry_free_data(), SculptUndoNode::totgrid, and SculptUndoNode::vert_hidden.
Referenced by sculpt_undosys_step_free().
|
static |
Definition at line 611 of file sculpt_undo.c.
References CustomData_free(), SculptUndoNodeGeometry::edata, SculptUndoNodeGeometry::ldata, SculptUndoNodeGeometry::pdata, SculptUndoNodeGeometry::totedge, SculptUndoNodeGeometry::totloop, SculptUndoNodeGeometry::totpoly, SculptUndoNodeGeometry::totvert, and SculptUndoNodeGeometry::vdata.
Referenced by sculpt_undo_free_list().
|
static |
Definition at line 1295 of file sculpt_undo.c.
References BLI_assert, SculptUndoNode::geometry_modified, SculptUndoNode::geometry_original, and SculptUndoNodeGeometry::is_initialized.
Referenced by sculpt_undo_geometry_push().
|
static |
Definition at line 1306 of file sculpt_undo.c.
References SculptUndoNode::applied, SculptUndoNode::geometry_clear_pbvh, sculpt_undo_find_or_alloc_node_type(), sculpt_undo_geometry_get(), sculpt_undo_geometry_store_data(), and type.
Referenced by SCULPT_undo_push_node().
|
static |
Definition at line 627 of file sculpt_undo.c.
References SculptUndoNode::applied, SculptUndoNode::geometry_clear_pbvh, SculptUndoNode::geometry_modified, SculptUndoNode::geometry_original, SCULPT_pbvh_clear(), and sculpt_undo_geometry_restore_data().
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 579 of file sculpt_undo.c.
References BKE_mesh_runtime_clear_cache(), BKE_mesh_update_customdata_pointers(), BLI_assert, CD_DUPLICATE, CD_MASK_MESH, CustomData_copy(), CustomData_free(), SculptUndoNodeGeometry::edata, Mesh::edata, CustomData_MeshMasks::emask, Mesh::fdata, SculptUndoNodeGeometry::is_initialized, SculptUndoNodeGeometry::ldata, Mesh::ldata, CustomData_MeshMasks::lmask, mesh, SculptUndoNodeGeometry::pdata, Mesh::pdata, CustomData_MeshMasks::pmask, SculptUndoNodeGeometry::totedge, Mesh::totedge, Mesh::totface, SculptUndoNodeGeometry::totloop, Mesh::totloop, SculptUndoNodeGeometry::totpoly, Mesh::totpoly, SculptUndoNodeGeometry::totvert, Mesh::totvert, SculptUndoNodeGeometry::vdata, Mesh::vdata, and CustomData_MeshMasks::vmask.
Referenced by sculpt_undo_geometry_restore().
|
static |
Definition at line 561 of file sculpt_undo.c.
References BLI_assert, CD_DUPLICATE, CD_MASK_MESH, CustomData_copy(), SculptUndoNodeGeometry::edata, Mesh::edata, CustomData_MeshMasks::emask, SculptUndoNodeGeometry::is_initialized, SculptUndoNodeGeometry::ldata, Mesh::ldata, CustomData_MeshMasks::lmask, mesh, SculptUndoNodeGeometry::pdata, Mesh::pdata, CustomData_MeshMasks::pmask, SculptUndoNodeGeometry::totedge, Mesh::totedge, SculptUndoNodeGeometry::totloop, Mesh::totloop, SculptUndoNodeGeometry::totpoly, Mesh::totpoly, SculptUndoNodeGeometry::totvert, Mesh::totvert, SculptUndoNodeGeometry::vdata, Mesh::vdata, and CustomData_MeshMasks::vmask.
Referenced by sculpt_undo_bmesh_push(), and sculpt_undo_geometry_push().
SculptUndoNode* SCULPT_undo_get_first_node | ( | void | ) |
Definition at line 1037 of file sculpt_undo.c.
References ListBase::first, UndoSculpt::nodes, NULL, and sculpt_undo_get_nodes().
Referenced by sculpt_restore_mesh().
SculptUndoNode* SCULPT_undo_get_node | ( | PBVHNode * | node, |
SculptUndoType | type | ||
) |
Definition at line 1020 of file sculpt_undo.c.
References LISTBASE_FOREACH, node, SculptUndoNode::node, UndoSculpt::nodes, NULL, sculpt_undo_get_nodes(), SculptUndoNode::type, and type.
Referenced by paint_mesh_restore_co_task_cb(), sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), and SCULPT_undo_push_node().
|
static |
Definition at line 1871 of file sculpt_undo.c.
References BKE_undosys_stack_init_or_active_with_type(), BKE_UNDOSYS_TYPE_SCULPT, ED_undo_stack_get(), and sculpt_undosys_step_get_nodes().
Referenced by sculpt_undo_alloc_node(), sculpt_undo_alloc_node_type(), sculpt_undo_bmesh_push(), sculpt_undo_face_sets_push(), sculpt_undo_find_or_alloc_node_type(), SCULPT_undo_get_first_node(), SCULPT_undo_get_node(), and SCULPT_undo_push_end_ex().
Definition at line 1914 of file sculpt_undo.c.
References BKE_pbvh_search_gather(), MEM_SAFE_FREE, SculptUndoNode::node, NULL, SculptSession::pbvh, SCULPT_UNDO_COORDS, and SCULPT_undo_push_node().
Referenced by ED_sculpt_undo_push_multires_mesh_begin().
NOTE: name
must match operator name for redo panels to work.
Definition at line 1545 of file sculpt_undo.c.
References SculptUndoStep::active_color_end, SculptUndoStep::active_color_start, BKE_undosys_step_push_init_with_type(), BKE_UNDOSYS_TYPE_SCULPT, C, Object::data, ED_undo_stack_get(), ED_undosys_stack_memfile_id_changed_tag(), Object::id, NULL, sculpt_save_active_attribute(), and SculptAttrRef::was_set.
Referenced by ED_object_sculptmode_enter_ex(), ED_sculpt_init_transform(), ED_sculpt_undo_geometry_begin(), ED_sculpt_undo_push_multires_mesh_begin(), hide_show_exec(), mask_flood_fill_exec(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), sculpt_detail_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_dynamic_topology_disable_with_undo(), sculpt_dynamic_topology_enable_with_undo(), sculpt_expand_invoke(), sculpt_face_set_create_exec(), sculpt_face_set_edit_modify_coordinates(), sculpt_face_set_edit_modify_face_sets(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_gesture_apply(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), sculpt_mask_init_exec(), sculpt_mesh_filter_invoke(), sculpt_mode_toggle_exec(), sculpt_stroke_test_start(), sculpt_symmetrize_exec(), and vpaint_invoke().
Definition at line 1575 of file sculpt_undo.c.
References SCULPT_undo_push_end_ex().
Referenced by ED_object_sculptmode_enter_ex(), ED_sculpt_undo_geometry_end(), ED_sculpt_undo_push_multires_mesh_end(), hide_show_exec(), mask_flood_fill_exec(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_detail_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_dynamic_topology_disable_with_undo(), sculpt_dynamic_topology_enable_with_undo(), sculpt_expand_cancel(), sculpt_expand_finish(), sculpt_face_set_create_exec(), sculpt_face_set_edit_modify_coordinates(), sculpt_face_set_edit_modify_face_sets(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_gesture_apply(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_cancel(), sculpt_mask_expand_modal(), sculpt_mask_filter_exec(), sculpt_mask_init_exec(), sculpt_mesh_filter_modal(), sculpt_mode_toggle_exec(), sculpt_stroke_done(), sculpt_symmetrize_exec(), and vpaint_stroke_done().
Definition at line 1580 of file sculpt_undo.c.
References SculptUndoStep::active_color_end, BKE_undosys_stack_init_or_active_with_type(), BKE_undosys_stack_limit_steps_and_memory_defaults, BKE_undosys_step_push(), BKE_UNDOSYS_TYPE_SCULPT, ED_undo_stack_get(), ListBase::first, G_MAIN, MEM_allocN_len, MEM_freeN, SculptUndoNode::next, SculptUndoNode::no, UndoSculpt::nodes, NULL, wmWindowManager::op_undo_depth, sculpt_save_active_attribute(), sculpt_undo_get_nodes(), UndoSculpt::undo_size, and WM_file_tag_modified().
Referenced by ED_sculpt_end_transform(), and SCULPT_undo_push_end().
SculptUndoNode* SCULPT_undo_push_node | ( | Object * | ob, |
PBVHNode * | node, | ||
SculptUndoType | type | ||
) |
Definition at line 1419 of file sculpt_undo.c.
References BKE_object_get_original_mesh(), BKE_pbvh_node_get_grids(), BKE_pbvh_node_get_loops(), BKE_pbvh_node_get_verts(), BKE_pbvh_node_num_loops(), BKE_pbvh_node_num_verts(), BLI_assert_msg, BLI_strncpy(), BLI_thread_lock(), BLI_thread_unlock(), SculptSession::bm, copy_v3_v3(), ELEM, SculptUndoNode::grids, SculptUndoNode::index, LOCK_CUSTOM1, SculptUndoNode::loop_index, SculptUndoNode::maxloop, KeyBlock::name, SculptSession::needs_flush_to_id, node, SculptUndoNode::node, NULL, SculptSession::pbvh, SculptSession::pivot_pos, SculptUndoNode::pivot_pos, SculptSession::pivot_rot, SculptUndoNode::pivot_rot, Object::sculpt, sculpt_undo_alloc_node(), sculpt_undo_bmesh_push(), SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_UNDO_DYNTOPO_END, SCULPT_UNDO_DYNTOPO_SYMMETRIZE, SCULPT_UNDO_FACE_SETS, sculpt_undo_face_sets_push(), SCULPT_UNDO_GEOMETRY, sculpt_undo_geometry_push(), SCULPT_undo_get_node(), SCULPT_UNDO_HIDDEN, SCULPT_UNDO_MASK, sculpt_undo_store_color(), sculpt_undo_store_coords(), sculpt_undo_store_hidden(), sculpt_undo_store_mask(), SculptSession::shapekey_active, SculptUndoNode::shapeName, Mesh::totloop, and type.
Referenced by calc_area_normal_and_center_task_cb(), do_brush_action(), do_brush_action_task_cb(), do_mask_by_color_contiguous_update_nodes_cb(), do_mask_by_color_task_cb(), ED_object_sculptmode_enter_ex(), ED_sculpt_undo_geometry_begin(), ED_sculpt_undo_geometry_end(), ED_sculpt_undo_push_multires_mesh_begin(), ED_sculpt_undo_push_multires_mesh_end(), filter_cache_init_task_cb(), mask_flood_fill_task_cb(), mask_gesture_apply_task_cb(), mask_init_task_cb(), paint_mesh_restore_co_task_cb(), partialvis_update_bmesh(), partialvis_update_grids(), partialvis_update_mesh(), project_line_gesture_apply_task_cb(), sculpt_combine_proxies_task_cb(), sculpt_detail_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_dynamic_topology_disable_with_undo(), sculpt_dynamic_topology_enable_with_undo(), sculpt_elastic_transform_task_cb(), sculpt_expand_undo_push(), sculpt_face_set_create_exec(), sculpt_face_set_edit_modify_coordinates(), sculpt_face_set_edit_modify_face_sets(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_gesture_face_set_begin(), sculpt_gesture_trim_begin(), sculpt_gesture_trim_end(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), SCULPT_orig_vert_data_init(), sculpt_symmetrize_exec(), sculpt_topology_update(), sculpt_transform_task_cb(), sculpt_undo_push_all_grids(), and vpaint_paint_leaves().
|
static |
Definition at line 684 of file sculpt_undo.c.
References BKE_multires_create_deformed_base_mesh_vert_coords(), BKE_subdiv_eval_refine_from_mesh(), Object::data, depsgraph, float(), MEM_freeN, SculptSession::modifier, SculptSession::multires, and NULL.
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 372 of file sculpt_undo.c.
References BKE_object_get_original_mesh(), BKE_pbvh_swap_colors(), C, SculptUndoNode::col, CTX_data_view_layer(), SculptUndoNode::index, SculptUndoNode::loop_col, SculptUndoNode::loop_index, SculptUndoNode::maxloop, OBACT, SculptSession::pbvh, Object::sculpt, SculptUndoNode::totloop, Mesh::totloop, and SculptUndoNode::totvert.
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 230 of file sculpt_undo.c.
References BKE_key_from_object(), BKE_keyblock_convert_to_vertcos(), BKE_keyblock_find_name(), BKE_pbvh_vert_coords_apply(), BKE_pbvh_vert_tag_update_normal(), BKE_sculpt_update_object_for_edit(), BKE_subdiv_ccg_key_top_level(), BLI_findindex(), Key::block, C, CCG_elem_offset_co(), SculptUndoNode::co, CTX_data_view_layer(), SculptSession::deform_modifiers_active, depsgraph, float(), SubdivCCG::grid_size, SubdivCCG::grids, SculptUndoNode::grids, SculptUndoNode::index, SculptUndoNode::maxgrid, SculptUndoNode::maxvert, MEM_freeN, SculptSession::mvert, KeyBlock::name, NC_OBJECT, ND_DATA, NULL, OBACT, SculptUndoNode::orig_co, SculptSession::pbvh, Object::sculpt, sculpt_undo_restore_deformed(), SCULPT_vertcos_to_key(), SculptSession::shapekey_active, SculptUndoNode::shapeName, Object::shapenr, STREQ, SculptSession::subdiv_ccg, swap_v3_v3(), KeyBlock::totelem, SculptUndoNode::totgrid, SculptUndoNode::totvert, and WM_event_add_notifier().
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 220 of file sculpt_undo.c.
References SculptUndoNode::co, copy_v3_v3(), SculptSession::deform_cos, SculptUndoNode::orig_co, and test_swap_v3_v3().
Referenced by sculpt_undo_restore_coords().
|
static |
Definition at line 450 of file sculpt_undo.c.
References BKE_object_get_original_mesh(), C, CD_SCULPT_FACE_SETS, CTX_data_view_layer(), CustomData_get_layer(), SculptUndoNode::face_sets, OBACT, Mesh::pdata, and Mesh::totpoly.
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 342 of file sculpt_undo.c.
References BLI_BITMAP_FLIP, BLI_BITMAP_TEST, C, CTX_data_view_layer(), SubdivCCG::grid_hidden, SculptUndoNode::grid_hidden, SculptUndoNode::grids, SculptUndoNode::index, SculptUndoNode::maxgrid, SculptUndoNode::maxvert, ME_HIDE, SculptSession::mvert, NULL, OBACT, Object::sculpt, SculptSession::subdiv_ccg, SWAP, SculptUndoNode::totgrid, SculptUndoNode::totvert, v, and SculptUndoNode::vert_hidden.
Referenced by sculpt_undo_restore_list().
Definition at line 697 of file sculpt_undo.c.
References SculptUndoNode::applied, BKE_mesh_flush_hidden_from_verts(), BKE_mesh_tag_coords_changed(), BKE_pbvh_search_callback(), BKE_pbvh_type(), BKE_pbvh_update_bounds(), BKE_pbvh_update_vertex_data(), BKE_pbvh_update_visibility(), BKE_sculpt_multires_active(), BKE_sculpt_update_object_for_edit(), BKE_sculptsession_free_deformMats(), BKE_sculptsession_use_pbvh_draw(), BLI_assert_msg, C, copy_v3_v3(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region_view3d(), data, Object::data, SculptSession::deform_modifiers_active, DEG_id_tag_update(), depsgraph, ListBase::first, SubdivCCG::grid_size, SculptUndoNode::grids, SculptUndoNode::gridsize, Object::id, ID_REAL_USERS, ID_RECALC_GEOMETRY, ID_RECALC_SHADING, SculptUndoNode::idname, if(), SculptUndoNode::maxgrid, SculptUndoNode::maxvert, MEM_calloc_arrayN, MEM_callocN, MEM_SAFE_FREE, mesh, PartialUpdateData::modified_color_vertices, PartialUpdateData::modified_hidden_vertices, PartialUpdateData::modified_mask_vertices, MULTIRES_COORDS_MODIFIED, MULTIRES_HIDDEN_MODIFIED, multires_mark_as_modified(), ID::name, SculptUndoNode::next, NULL, SubdivCCG::num_grids, OBACT, SculptSession::pbvh, PBVH_FACES, PBVH_UpdateBB, PBVH_UpdateMask, PBVH_UpdateOriginalBB, PBVH_UpdateRedraw, PBVH_UpdateVisibility, SculptSession::pivot_pos, SculptUndoNode::pivot_pos, SculptSession::pivot_rot, SculptUndoNode::pivot_rot, PartialUpdateData::rebuild, scene, Object::sculpt, sculpt_undo_bmesh_restore(), SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_UNDO_DYNTOPO_END, SCULPT_UNDO_DYNTOPO_SYMMETRIZE, SCULPT_UNDO_FACE_SETS, SCULPT_UNDO_GEOMETRY, sculpt_undo_geometry_restore(), SCULPT_UNDO_HIDDEN, SCULPT_UNDO_MASK, sculpt_undo_refine_subdiv(), sculpt_undo_restore_color(), sculpt_undo_restore_coords(), sculpt_undo_restore_face_sets(), sculpt_undo_restore_hidden(), sculpt_undo_restore_mask(), SCULPT_update_object_bounding_box(), SCULPT_visibility_sync_all_face_sets_to_vertices(), SCULPT_visibility_sync_all_vertex_to_face_sets(), SculptSession::shapekey_active, STREQ, SubdivCCG::subdiv, SculptSession::subdiv_ccg, SculptUndoNode::totgrid, SculptSession::totvert, SculptUndoNode::type, update(), update_cb(), and update_cb_partial().
Referenced by sculpt_undosys_step_decode_redo_impl(), and sculpt_undosys_step_decode_undo_impl().
|
static |
Definition at line 404 of file sculpt_undo.c.
References BKE_subdiv_ccg_key_top_level(), C, CCG_elem_offset_mask(), CTX_data_view_layer(), SubdivCCG::grid_size, SubdivCCG::grids, SculptUndoNode::grids, SculptUndoNode::index, mask(), SculptUndoNode::mask, SculptUndoNode::maxgrid, SculptUndoNode::maxvert, NULL, OBACT, Object::sculpt, SculptSession::subdiv_ccg, SWAP, SculptUndoNode::totgrid, SculptUndoNode::totvert, and SculptSession::vmask.
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 1616 of file sculpt_undo.c.
References ATTR_DOMAIN_AUTO, ATTR_DOMAIN_MASK_ALL, ATTR_DOMAIN_NUM, ATTR_DOMAIN_POINT, BKE_id_attribute_domain(), BKE_id_attribute_find(), BKE_id_attribute_search(), BKE_id_attributes_active_color_set(), BKE_object_get_original_mesh(), BKE_pbvh_update_active_vcol(), BKE_pbvh_update_vertex_data(), C, CD_DEFAULT, CD_MASK_PROP_ALL, CTX_data_active_object(), CustomData_add_layer_named(), SculptAttrRef::domain, ED_geometry_attribute_convert(), Mesh::id, Mesh::ldata, SculptAttrRef::name, NULL, SculptSession::pbvh, PBVH_UpdateColor, Object::sculpt, sculpt_attribute_ref_equals(), sculpt_save_active_attribute(), Mesh::totloop, Mesh::totvert, SculptAttrRef::type, CustomDataLayer::type, and Mesh::vdata.
Referenced by sculpt_undosys_step_decode_redo(), and sculpt_undosys_step_decode_undo().
|
static |
Definition at line 1277 of file sculpt_undo.c.
References BKE_pbvh_node_num_verts(), BKE_pbvh_store_colors(), BKE_pbvh_store_colors_vertex(), BKE_pbvh_type(), BLI_assert, SculptUndoNode::col, SculptUndoNode::index, SculptUndoNode::loop_col, SculptUndoNode::loop_index, SculptUndoNode::node, NULL, SculptSession::pbvh, PBVH_FACES, Object::sculpt, and SculptUndoNode::totloop.
Referenced by SCULPT_undo_push_node().
|
static |
Definition at line 1224 of file sculpt_undo.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::co, SculptUndoNode::co, copy_v3_v3(), SculptSession::deform_modifiers_active, PBVHVertexIter::fno, PBVHVertexIter::i, SculptUndoNode::index, PBVHVertexIter::no, SculptUndoNode::no, SculptUndoNode::node, SculptUndoNode::orig_co, SculptSession::orig_cos, SculptSession::pbvh, PBVH_ITER_ALL, and Object::sculpt.
Referenced by SCULPT_undo_push_node().
|
static |
Definition at line 1245 of file sculpt_undo.c.
References BKE_pbvh_node_get_verts(), BKE_pbvh_node_num_verts(), BLI_BITMAP_SET, MVert::flag, SculptUndoNode::grids, ME_HIDE, node, SculptUndoNode::node, NULL, SculptSession::pbvh, PartialUpdateData::pbvh, Object::sculpt, and SculptUndoNode::vert_hidden.
Referenced by SCULPT_undo_push_node().
|
static |
Definition at line 1266 of file sculpt_undo.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::i, PBVHVertexIter::mask, SculptUndoNode::mask, SculptUndoNode::node, SculptSession::pbvh, PBVH_ITER_ALL, and Object::sculpt.
Referenced by SCULPT_undo_push_node().
Definition at line 1902 of file sculpt_undo.c.
References SculptSession::active, BKE_paintmode_get_active_from_context(), C, CTX_data_active_object(), SculptSession::multires, and PAINT_MODE_SCULPT.
Referenced by ED_sculpt_undo_push_multires_mesh_begin(), and ED_sculpt_undo_push_multires_mesh_end().
|
static |
Definition at line 1775 of file sculpt_undo.c.
References BKE_scene_graph_evaluated_ensure(), BLI_assert, C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_view_layer(), Object::data, depsgraph, ED_object_mode_generic_exit(), ED_object_sculptmode_enter_ex(), Mesh::flag, Main::is_memfile_undo_flush_needed, ME_SCULPT_DYNAMIC_TOPOLOGY, Object::mode, SculptSession::needs_flush_to_id, NULL, OB_MESH, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OBACT, scene, Object::sculpt, sculpt_undosys_step_decode_redo(), sculpt_undosys_step_decode_undo(), STEP_INVALID, STEP_REDO, STEP_UNDO, and Object::type.
Referenced by ED_sculpt_undosys_type().
|
static |
Definition at line 1752 of file sculpt_undo.c.
References C, depsgraph, UndoStep::is_applied, UndoStep::next, UndoStep::prev, sculpt_undo_set_active_layer(), sculpt_undosys_step_decode_redo_impl(), SculptUndoStep::step, and UndoStep::type.
Referenced by sculpt_undosys_step_decode().
|
static |
Definition at line 1710 of file sculpt_undo.c.
References BLI_assert, C, SculptUndoStep::data, depsgraph, UndoStep::is_applied, UndoSculpt::nodes, sculpt_undo_restore_list(), and SculptUndoStep::step.
Referenced by sculpt_undosys_step_decode_redo().
|
static |
Definition at line 1720 of file sculpt_undo.c.
References BKE_UNDOSYS_TYPE_SCULPT, BLI_assert, C, depsgraph, UndoStep::is_applied, UndoStep::next, UndoStep::prev, sculpt_undo_set_active_layer(), sculpt_undosys_step_decode_undo_impl(), SculptUndoStep::step, and UndoStep::type.
Referenced by sculpt_undosys_step_decode().
|
static |
Definition at line 1700 of file sculpt_undo.c.
References BLI_assert, C, SculptUndoStep::data, depsgraph, UndoStep::is_applied, UndoSculpt::nodes, sculpt_undo_restore_list(), and SculptUndoStep::step.
Referenced by sculpt_undosys_step_decode_undo().
|
static |
Definition at line 1678 of file sculpt_undo.c.
References BLI_listbase_is_empty(), SculptUndoStep::data, UndoStep::data_size, UndoStep::is_applied, Main::is_memfile_undo_flush_needed, ListBase::last, UndoSculpt::nodes, SCULPT_UNDO_DYNTOPO_END, SculptUndoStep::step, SculptUndoNode::type, UndoSculpt::undo_size, and UndoStep::use_memfile_step.
Referenced by ED_sculpt_undosys_type().
Definition at line 1671 of file sculpt_undo.c.
References BLI_listbase_clear(), SculptUndoStep::data, and UndoSculpt::nodes.
Referenced by ED_sculpt_undosys_type().
Definition at line 1827 of file sculpt_undo.c.
References SculptUndoStep::data, UndoSculpt::nodes, and sculpt_undo_free_list().
Referenced by ED_sculpt_undosys_type().
|
static |
Definition at line 1865 of file sculpt_undo.c.
References SculptUndoStep::data.
Referenced by sculpt_undo_get_nodes().
Definition at line 210 of file sculpt_undo.c.
References Freestyle::a, usdtokens::b(), and swap_v3_v3().
Referenced by sculpt_undo_restore_deformed().
Definition at line 133 of file sculpt_undo.c.
References BKE_pbvh_node_fully_hidden_set(), BKE_pbvh_node_mark_update(), BKE_pbvh_node_mark_update_mask(), BKE_pbvh_node_mark_update_visibility(), and node.
Referenced by BKE_mesh_remesh_quadriflow(), BKE_ocean_bake(), BLI_dlrbTree_add(), check_if_canceled(), QFLOW_quadriflow_remesh(), rna_def_actionbone_group_common(), sculpt_undo_restore_list(), and update_cb_partial().
A version of update_cb that tests for the update tag in PBVH.vert_bitmap.
Definition at line 155 of file sculpt_undo.c.
References BKE_pbvh_node_fully_hidden_set(), BKE_pbvh_node_get_grids(), BKE_pbvh_node_get_verts(), BKE_pbvh_node_has_vert_with_normal_update_tag(), BKE_pbvh_node_mark_update(), BKE_pbvh_node_mark_update_color(), BKE_pbvh_node_mark_update_mask(), BKE_pbvh_node_mark_update_visibility(), BKE_pbvh_node_num_verts(), BKE_pbvh_type(), data, node, NULL, PBVH_GRIDS, update(), and update_cb().
Referenced by sculpt_undo_restore_list().