Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_hash.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "BLT_translation.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pbvh.h"
#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_undo.h"
#include "ED_view3d.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "bmesh.h"
#include "bmesh_tools.h"
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
|
static |
Definition at line 325 of file sculpt_dyntopo.c.
References C, DYNTOPO_WARN_EDATA, DYNTOPO_WARN_LDATA, DYNTOPO_WARN_MODIFIER, DYNTOPO_WARN_VDATA, IFACE_, NULL, OPERATOR_INTERFACE, ot, TIP_, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemFullO_ptr(), uiItemL(), uiItemS(), and WM_OP_EXEC_DEFAULT.
Referenced by sculpt_dynamic_topology_toggle_invoke().
enum eDynTopoWarnFlag SCULPT_dynamic_topology_check | ( | Scene * | scene, |
Object * | ob | ||
) |
Definition at line 325 of file sculpt_dyntopo.c.
Referenced by ED_object_sculptmode_enter_ex(), and sculpt_dynamic_topology_toggle_invoke().
void SCULPT_dynamic_topology_disable | ( | bContext * | C, |
SculptUndoNode * | unode | ||
) |
Definition at line 253 of file sculpt_dyntopo.c.
References C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), depsgraph, scene, and SCULPT_dynamic_topology_disable_ex().
Referenced by sculpt_undo_bmesh_restore_begin(), and sculpt_undo_bmesh_restore_end().
|
static |
Definition at line 178 of file sculpt_dyntopo.c.
References BKE_mesh_update_customdata_pointers(), BKE_particlesystem_reset_all(), BKE_ptcache_object_reset(), BKE_scene_graph_update_tagged(), BKE_sculptsession_bm_to_me(), SculptSession::bm, SculptSession::bm_log, BM_log_free(), BM_mesh_free(), CD_CALLOC, CD_DUPLICATE, CD_MASK_MESH, CD_SCULPT_FACE_SETS, CustomData_add_layer(), CustomData_copy(), CustomData_free(), CustomData_get_layer(), CustomData_has_layer(), Object::data, DEG_id_tag_update(), depsgraph, SculptUndoNodeGeometry::edata, Mesh::edata, CustomData_MeshMasks::emask, SculptSession::face_sets, Mesh::face_sets_color_default, Mesh::fdata, Mesh::flag, MVert::flag, SculptUndoNode::geometry_bmesh_enter, Object::id, ID_RECALC_GEOMETRY, SculptUndoNodeGeometry::ldata, Mesh::ldata, CustomData_MeshMasks::lmask, ME_HIDE, ME_SCULPT_DYNAMIC_TOPOLOGY, Mesh::mvert, NULL, SculptUndoNodeGeometry::pdata, Mesh::pdata, CustomData_MeshMasks::pmask, PTCACHE_RESET_OUTDATED, scene, Object::sculpt, SCULPT_pbvh_clear(), 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_dynamic_topology_disable(), and sculpt_dynamic_topology_disable_with_undo().
void sculpt_dynamic_topology_disable_with_undo | ( | Main * | bmain, |
Depsgraph * | depsgraph, | ||
Scene * | scene, | ||
Object * | ob | ||
) |
Definition at line 262 of file sculpt_dyntopo.c.
References SculptSession::bm, depsgraph, ED_undo_stack_get(), G, NULL, scene, Object::sculpt, SCULPT_dynamic_topology_disable_ex(), SCULPT_UNDO_DYNTOPO_END, SCULPT_undo_push_begin(), SCULPT_undo_push_end(), and SCULPT_undo_push_node().
Referenced by ED_object_sculptmode_exit_ex(), and sculpt_dynamic_topology_toggle_exec().
void SCULPT_dynamic_topology_enable_ex | ( | struct Main * | bmain, |
struct Depsgraph * | depsgraph, | ||
Scene * | scene, | ||
Object * | ob | ||
) |
Enable dynamic topology; mesh will be triangulated
Definition at line 126 of file sculpt_dyntopo.c.
References BKE_mesh_mselect_clear(), BKE_scene_graph_update_tagged(), SculptSession::bm, BM_data_layer_add(), SculptSession::bm_log, BM_log_create(), BM_mesh_bm_from_me(), BM_mesh_create(), BM_mesh_normals_update(), SculptSession::bm_smooth_shading, BMALLOC_TEMPLATE_FROM_ME, CD_PAINT_MASK, Object::data, DEG_id_tag_update(), depsgraph, Mesh::flag, Sculpt::flags, Object::id, ID_RECALC_GEOMETRY, ME_SCULPT_DYNAMIC_TOPOLOGY, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_dynamic_topology_triangulate(), SCULPT_dyntopo_node_layers_add(), SCULPT_DYNTOPO_SMOOTH_SHADING, SCULPT_pbvh_clear(), Scene::toolsettings, BMesh::totface, Mesh::totpoly, and BMesh::vdata.
Referenced by ED_object_sculptmode_enter_ex(), and sculpt_dynamic_topology_enable_with_undo().
|
static |
Definition at line 282 of file sculpt_dyntopo.c.
References SculptSession::bm, depsgraph, ED_undo_stack_get(), G, NULL, scene, Object::sculpt, SCULPT_dynamic_topology_enable_ex(), SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_undo_push_begin(), SCULPT_undo_push_end(), and SCULPT_undo_push_node().
Referenced by sculpt_dynamic_topology_toggle_exec().
|
static |
Definition at line 302 of file sculpt_dyntopo.c.
References SculptSession::bm, C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), depsgraph, NC_SCENE, ND_TOOLSETTINGS, NULL, OPERATOR_FINISHED, scene, Object::sculpt, sculpt_dynamic_topology_disable_with_undo(), sculpt_dynamic_topology_enable_with_undo(), WM_cursor_wait(), and WM_main_add_notifier().
Referenced by sculpt_dynamic_topology_toggle_invoke(), and SCULPT_OT_dynamic_topology_toggle().
|
static |
Definition at line 400 of file sculpt_dyntopo.c.
References SculptSession::bm, C, CTX_data_active_object(), CTX_data_scene(), dyntopo_warning_popup(), scene, Object::sculpt, SCULPT_dynamic_topology_check(), sculpt_dynamic_topology_toggle_exec(), and wmOperator::type.
Referenced by SCULPT_OT_dynamic_topology_toggle().
Definition at line 63 of file sculpt_dyntopo.c.
References bm, BM_mesh_triangulate(), MOD_TRIANGULATE_NGON_EARCLIP, MOD_TRIANGULATE_QUAD_BEAUTY, NULL, BMesh::totface, and BMesh::totloop.
Referenced by SCULPT_dynamic_topology_enable_ex(), and sculpt_symmetrize_exec().
void SCULPT_dyntopo_node_layers_add | ( | SculptSession * | ss | ) |
Definition at line 91 of file sculpt_dyntopo.c.
References SculptSession::bm, BM_data_layer_add_named(), SculptSession::cd_face_node_offset, CD_FLAG_TEMPORARY, CD_PROP_INT32, SculptSession::cd_vert_node_offset, CustomData_get_layer_index(), CustomData_get_n_offset(), CustomData_get_named_layer_index(), CustomDataLayer::flag, CustomData::layers, BMesh::pdata, and BMesh::vdata.
Referenced by SCULPT_dynamic_topology_enable_ex(), and sculpt_undo_bmesh_enable().
void SCULPT_OT_dynamic_topology_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 420 of file sculpt_dyntopo.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, sculpt_dynamic_topology_toggle_exec(), sculpt_dynamic_topology_toggle_invoke(), and SCULPT_mode_poll().
Referenced by ED_operatortypes_sculpt().
Definition at line 71 of file sculpt_dyntopo.c.
References BKE_object_free_derived_caches(), BKE_pbvh_free(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, MEM_SAFE_FREE, NULL, SculptSession::pbvh, SculptSession::pmap, SculptSession::pmap_mem, and Object::sculpt.
Referenced by sculpt_detail_flood_fill_exec(), SCULPT_dynamic_topology_disable_ex(), SCULPT_dynamic_topology_enable_ex(), sculpt_optimize_exec(), sculpt_symmetrize_exec(), sculpt_undo_bmesh_enable(), sculpt_undo_bmesh_restore_generic(), and sculpt_undo_geometry_restore().