|
Blender V5.3
|
Namespaces | |
| namespace | detail_size |
Classes | |
| struct | SculptDetailRaycastData |
| struct | DyntopoDetailSizeEditCustomData |
Enumerations | |
| enum | WarnFlag { OKAY = 0 , ATTRIBUTES = (1 << 1) , MODIFIER = (1 << 2) } |
Variables | |
| static CLG_LogRef | LOG = {"sculpt.detail"} |
Sample Detail Size | |
| enum class | SampleDetailModeType { Dyntopo = 0 , Voxel = 1 } |
| static EnumPropertyItem | prop_sculpt_sample_detail_mode_types [] |
| static bool | sample_detail_voxel (bContext *C, ViewContext *vc, const int mval[2]) |
| static void | sculpt_raycast_detail_cb (bke::pbvh::BMeshNode &node, SculptDetailRaycastData &srd, float *distance) |
| static void | sample_detail_dyntopo (bContext *C, ViewContext *vc, const int mval[2]) |
| static wmOperatorStatus | sample_detail (bContext *C, const int event_xy[2], const SampleDetailModeType mode) |
| static wmOperatorStatus | sculpt_sample_detail_size_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | sculpt_sample_detail_size_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static wmOperatorStatus | sculpt_sample_detail_size_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| void | SCULPT_OT_sample_detail_size (wmOperatorType *ot) |
| Enumerator | |
|---|---|
| DETAILING_MODE_RESOLUTION | |
| DETAILING_MODE_BRUSH_PERCENT | |
| DETAILING_MODE_DETAIL_SIZE | |
Definition at line 458 of file sculpt_detail.cc.
|
strong |
| Enumerator | |
|---|---|
| Dyntopo | |
| Voxel | |
Definition at line 195 of file sculpt_detail.cc.
| Enumerator | |
|---|---|
| OKAY | |
| ATTRIBUTES | |
| MODIFIER | |
Definition at line 28 of file sculpt_dyntopo.hh.
Definition at line 228 of file sculpt_dyntopo.cc.
References ATTRIBUTES, blender::BKE_modifier_get_info(), blender::BKE_modifier_is_enabled(), blender::BKE_modifiers_get_virtual_modifierlist(), blender::BLI_assert(), blender::SculptSession::bm, check_attribute_warning(), blender::Constructive, blender::Object::data, dyntopo_supports_layer(), blender::eModifierMode_Realtime, blender::bke::AttributeAccessor::foreach_attribute(), MODIFIER, blender::ModifierData::next, OKAY, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::ModifierData::type, blender::ModifierTypeInfo::type, and UNUSED_VARS_NDEBUG.
Referenced by check_attribute_warning(), ENUM_OPERATORS(), blender::ed::sculpt_paint::object_sculpt_mode_enter(), and sculpt_dynamic_topology_toggle_invoke().
| void blender::ed::sculpt_paint::dyntopo::disable | ( | bContext * | C, |
| undo::StepData * | undo_step ) |
Definition at line 153 of file sculpt_dyntopo.cc.
References C, blender::CTX_data_active_object(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), and disable().
Referenced by blender::ed::sculpt_paint::undo::bmesh_handle_dyntopo_begin(), and blender::ed::sculpt_paint::undo::bmesh_handle_dyntopo_end().
|
static |
Free the sculpt BMesh and BMLog
If unode is given, the BMesh's data is copied out to the unode before the BMesh is deleted so that it can be restored from.
Definition at line 111 of file sculpt_dyntopo.cc.
References blender::BKE_particlesystem_reset_all(), blender::BKE_ptcache_object_reset(), blender::BKE_scene_graph_update_tagged(), blender::BKE_sculptsession_bm_to_me(), blender::BKE_sculptsession_free_pbvh(), blender::bm, blender::SculptSession::bm, blender::BM_data_layer_free_named(), blender::SculptSession::bm_log, blender::BM_log_free(), blender::BM_mesh_free(), blender::Object::data, blender::DEG_id_tag_update(), disable(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::ME_SCULPT_DYNAMIC_TOPOLOGY, blender::BMesh::pdata, PTCACHE_RESET_OUTDATED, blender::ed::sculpt_paint::undo::restore_from_bmesh_enter_geometry(), blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, and blender::BMesh::vdata.
Referenced by disable(), disable(), disable_with_undo(), and ENUM_OPERATORS().
| void blender::ed::sculpt_paint::dyntopo::disable_with_undo | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Scene & | scene, | ||
| Object & | ob ) |
Definition at line 162 of file sculpt_dyntopo.cc.
References blender::SculptSession::bm, disable(), disable_with_undo(), blender::ed::sculpt_paint::undo::DyntopoEnd, blender::ED_undo_stack_get(), blender::G, blender::ed::sculpt_paint::undo::push_begin_ex(), blender::ed::sculpt_paint::undo::push_end_ex(), blender::ed::sculpt_paint::undo::push_node(), blender::Object::runtime, and blender::bke::ObjectRuntime::sculpt_session.
Referenced by disable_with_undo(), ENUM_OPERATORS(), blender::ed::sculpt_paint::object_sculpt_mode_exit(), and sculpt_dynamic_topology_toggle_exec().
|
static |
Definition at line 618 of file sculpt_detail.cc.
References DETAILING_MODE_BRUSH_PERCENT, DETAILING_MODE_RESOLUTION, dyntopo_detail_size_bounds(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::max_value, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::min_value, and blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::mode.
Referenced by dyntopo_detail_size_bounds(), and dyntopo_detail_size_edit_invoke().
|
static |
Definition at line 601 of file sculpt_detail.cc.
References C, blender::CTX_data_active_object(), blender::CTX_wm_area(), blender::CTX_wm_region(), blender::wmOperator::customdata, blender::SculptSession::draw_faded_cursor, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::draw_handle, dyntopo_detail_size_edit_cancel(), blender::ED_area_status_text(), blender::ED_region_draw_cb_exit(), blender::ED_workspace_status_text(), blender::ARegion::runtime, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, and blender::bke::ARegionRuntime::type.
Referenced by dyntopo_detail_size_edit_cancel(), dyntopo_detail_size_edit_modal(), and SCULPT_OT_dyntopo_detail_size_edit().
|
static |
Definition at line 555 of file sculpt_detail.cc.
References dyntopo_detail_size_edit_draw(), dyntopo_detail_size_parallel_lines_draw(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::gizmo_mat, blender::GPU_blend(), blender::GPU_BLEND_ALPHA, blender::GPU_BLEND_NONE, blender::GPU_line_smooth(), blender::GPU_line_width(), blender::GPU_matrix_mul(), blender::GPU_matrix_pop(), blender::GPU_matrix_push(), blender::GPU_PRIM_LINES, blender::GPU_SHADER_3D_UNIFORM_COLOR, blender::GPU_vertformat_attr_add(), blender::imm_draw_circle_wire_3d(), blender::immBegin(), blender::immBindBuiltinProgram(), blender::immEnd(), blender::immUnbindProgram(), blender::immUniformColor4f(), blender::immUniformColor4fv(), blender::immVertex3fv(), blender::immVertexFormat(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::outline_col, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::preview_tri, and blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::radius.
Referenced by dyntopo_detail_size_edit_draw(), and dyntopo_detail_size_edit_invoke().
|
static |
Definition at line 821 of file sculpt_detail.cc.
References blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::active_object, blender::BKE_brush_radius_get(), blender::BKE_paint_brush(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::brush_radius, C, blender::copy_m4_m4(), blender::copy_v3_v3(), blender::copy_v4_v4(), blender::CTX_data_active_object(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_tool_settings(), blender::CTX_wm_region(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::current_value, blender::SculptSession::cursor_location, blender::SculptSession::cursor_normal, blender::SculptSession::cursor_radius, blender::SculptSession::cursor_sampled_normal, blender::wmOperator::customdata, DEG2RAD, DETAILING_MODE_BRUSH_PERCENT, DETAILING_MODE_DETAIL_SIZE, DETAILING_MODE_RESOLUTION, blender::SculptSession::draw_faded_cursor, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::draw_handle, dyntopo_detail_size_bounds(), dyntopo_detail_size_edit_draw(), dyntopo_detail_size_edit_invoke(), dyntopo_detail_size_initial_value(), dyntopo_detail_size_update_header(), blender::ED_region_draw_cb_activate(), blender::ED_region_tag_redraw(), blender::ED_view3d_viewcontext_init(), blender::ED_workspace_status_text(), blender::Sculpt::flags, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::gizmo_mat, IFACE_, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::init_mval, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::init_value, blender::MEM_new_zeroed(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::mode, blender::mul_m4_m4_post(), blender::ed::sculpt_paint::object_space_radius_get(), blender::OPERATOR_RUNNING_MODAL, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::outline_col, blender::Sculpt::paint, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::pixel_radius, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::preview_tri, blender::quat_to_mat4(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::radius, REGION_DRAW_POST_VIEW, blender::rotate_v2_v2fl(), blender::rotation_between_vecs_to_quat(), blender::ARegion::runtime, blender::Object::runtime, blender::ToolSettings::sculpt, blender::SCULPT_DYNTOPO_DETAIL_BRUSH, blender::SCULPT_DYNTOPO_DETAIL_CONSTANT, blender::SCULPT_DYNTOPO_DETAIL_MANUAL, blender::bke::ObjectRuntime::sculpt_session, blender::translate_m4(), blender::bke::ARegionRuntime::type, blender::ed::sculpt_paint::vert_random_access_ensure(), blender::WM_event_add_modal_handler(), and blender::zero_v3().
Referenced by dyntopo_detail_size_edit_invoke(), and SCULPT_OT_dyntopo_detail_size_edit().
|
static |
Definition at line 740 of file sculpt_detail.cc.
References C, blender::Sculpt::constant_detail, blender::CTX_data_active_object(), blender::CTX_data_tool_settings(), blender::CTX_wm_area(), blender::CTX_wm_region(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::current_value, blender::wmOperator::customdata, blender::Sculpt::detail_percent, blender::Sculpt::detail_size, DETAILING_MODE_BRUSH_PERCENT, DETAILING_MODE_RESOLUTION, blender::SculptSession::draw_faded_cursor, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::draw_handle, dyntopo_detail_size_edit_cancel(), dyntopo_detail_size_edit_modal(), dyntopo_detail_size_sample_from_surface(), dyntopo_detail_size_update_from_mouse_delta(), dyntopo_detail_size_update_header(), blender::ED_area_status_text(), blender::ED_region_draw_cb_exit(), blender::ED_region_tag_redraw(), blender::ED_workspace_status_text(), ELEM, blender::EVT_ESCKEY, blender::EVT_LEFTCTRLKEY, blender::EVT_PADENTER, blender::EVT_RETKEY, blender::EVT_RIGHTCTRLKEY, blender::KM_PRESS, blender::KM_RELEASE, blender::LEFTMOUSE, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::mode, blender::OPERATOR_FINISHED, blender::OPERATOR_RUNNING_MODAL, blender::RIGHTMOUSE, blender::ARegion::runtime, blender::Object::runtime, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::sample_mode, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::bke::ARegionRuntime::type, blender::wmEvent::type, and blender::wmEvent::val.
Referenced by dyntopo_detail_size_edit_modal(), and SCULPT_OT_dyntopo_detail_size_edit().
|
static |
Definition at line 810 of file sculpt_detail.cc.
References blender::Sculpt::constant_detail, blender::Sculpt::detail_percent, blender::Sculpt::detail_size, DETAILING_MODE_BRUSH_PERCENT, DETAILING_MODE_RESOLUTION, and dyntopo_detail_size_initial_value().
Referenced by dyntopo_detail_size_edit_invoke(), and dyntopo_detail_size_initial_value().
|
static |
Definition at line 495 of file sculpt_detail.cc.
References blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::active_object, angle(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::brush_radius, blender::ed::sculpt_paint::dyntopo::detail_size::brush_to_detail_size(), blender::ed::sculpt_paint::dyntopo::detail_size::constant_to_detail_size(), blender::copy_v3_v3(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::current_value, DEG2RAD, DETAILING_MODE_BRUSH_PERCENT, DETAILING_MODE_RESOLUTION, dyntopo_detail_size_parallel_lines_draw(), float, blender::GPU_PRIM_LINES, blender::immBegin(), blender::immEnd(), blender::immVertex3fv(), blender::len_v3v3(), blender::madd_v3_v3v3fl(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::mode, blender::mul_v3_fl(), blender::normalize_v3(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::pixel_radius, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::preview_tri, blender::ed::sculpt_paint::dyntopo::detail_size::relative_to_detail_size(), blender::rotate_v2_v2fl(), blender::sub_v3_v3v3(), blender::U, and blender::zero_v3().
Referenced by dyntopo_detail_size_edit_draw(), and dyntopo_detail_size_parallel_lines_draw().
|
static |
Definition at line 635 of file sculpt_detail.cc.
References blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::active_object, blender::SculptSession::active_vert(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::brush_radius, blender::clamp_f(), blender::BMVert::co, blender::ed::sculpt_paint::dyntopo::detail_size::constant_to_brush_detail(), blender::ed::sculpt_paint::dyntopo::detail_size::constant_to_relative_detail(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::current_value, DETAILING_MODE_BRUSH_PERCENT, DETAILING_MODE_RESOLUTION, dyntopo_detail_size_sample_from_surface(), blender::len_v3v3(), blender::mat4_to_scale(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::max_value, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::min_value, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::mode, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::pixel_radius, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::U, and blender::ed::sculpt_paint::vert_neighbors_get_bmesh().
Referenced by dyntopo_detail_size_edit_modal(), and dyntopo_detail_size_sample_from_surface().
|
static |
Definition at line 673 of file sculpt_detail.cc.
References blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::accurate_mode, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::accurate_mval, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::accurate_value, blender::clamp_f(), blender::copy_v2_v2(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::current_value, DETAIL_SIZE_DELTA_ACCURATE_SPEED, DETAIL_SIZE_DELTA_SPEED, DETAILING_MODE_RESOLUTION, dyntopo_detail_size_update_from_mouse_delta(), blender::EVT_LEFTSHIFTKEY, float, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::init_mval, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::init_value, invert(), blender::KM_PRESS, blender::KM_RELEASE, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::max_value, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::min_value, blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::mode, blender::wmEvent::mval, blender::wmEvent::type, and blender::wmEvent::val.
Referenced by dyntopo_detail_size_edit_modal(), and dyntopo_detail_size_update_from_mouse_delta().
|
static |
Definition at line 703 of file sculpt_detail.cc.
References blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::accurate_mode, C, blender::CTX_data_scene(), blender::CTX_wm_area(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::current_value, DETAILING_MODE_BRUSH_PERCENT, DETAILING_MODE_RESOLUTION, dyntopo_detail_size_update_header(), blender::ED_area_status_text(), blender::Scene::id, IFACE_, blender::WorkspaceStatus::item(), blender::WorkspaceStatus::item_bool(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::mode, blender::RNA_pointer_create_discrete(), blender::RNA_property_ui_name(), blender::RNA_struct_find_property(), blender::ed::sculpt_paint::dyntopo::DyntopoDetailSizeEditCustomData::sample_mode, blender::ToolSettings::sculpt, SNPRINTF_UTF8, blender::Scene::toolsettings, and UI_MAX_DRAW_STR.
Referenced by dyntopo_detail_size_edit_invoke(), dyntopo_detail_size_edit_modal(), and dyntopo_detail_size_update_header().
|
static |
Definition at line 220 of file sculpt_dyntopo.cc.
References blender::BM_attribute_stored_in_bmesh_builtin(), blender::bke::AttributeIter::data_type, dyntopo_supports_layer(), blender::bke::Float, and blender::bke::AttributeIter::name.
Referenced by check_attribute_warning(), and dyntopo_supports_layer().
| void blender::ed::sculpt_paint::dyntopo::enable_ex | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Object & | ob ) |
Enable dynamic topology; mesh will be triangulated
Definition at line 61 of file sculpt_dyntopo.cc.
References blender::BMeshFromMeshParams::active_shapekey, blender::BKE_mesh_mselect_clear(), blender::BKE_scene_graph_update_tagged(), blender::BKE_sculptsession_free_deformMats(), blender::BKE_sculptsession_free_pbvh(), blender::SculptSession::bm, blender::BM_data_layer_ensure_named(), blender::SculptSession::bm_log, blender::BM_log_create(), blender::BM_mesh_bm_from_me(), blender::BM_mesh_create(), blender::BM_mesh_normals_update(), BMALLOC_TEMPLATE_FROM_ME, blender::BMeshFromMeshParams::calc_face_normal, blender::BMeshFromMeshParams::calc_vert_normal, blender::CD_PROP_FLOAT, blender::Object::data, blender::DEG_id_tag_update(), enable_ex(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::ME_SCULPT_DYNAMIC_TOPOLOGY, blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, blender::Object::shapenr, blender::BMesh::totface, triangulate(), blender::BMeshFromMeshParams::use_shapekey, blender::BMeshCreateParams::use_toolflags, and blender::BMesh::vdata.
Referenced by enable_ex(), enable_with_undo(), ENUM_OPERATORS(), and blender::ed::sculpt_paint::object_sculpt_mode_enter().
|
static |
Definition at line 180 of file sculpt_dyntopo.cc.
References blender::SculptSession::bm, blender::ed::sculpt_paint::undo::DyntopoBegin, blender::ED_undo_stack_get(), enable_ex(), enable_with_undo(), blender::G, blender::ed::sculpt_paint::undo::push_begin_ex(), blender::ed::sculpt_paint::undo::push_end_ex(), blender::ed::sculpt_paint::undo::push_node(), blender::Object::runtime, and blender::bke::ObjectRuntime::sculpt_session.
Referenced by enable_with_undo(), and sculpt_dynamic_topology_toggle_exec().
| blender::ed::sculpt_paint::dyntopo::ENUM_OPERATORS | ( | WarnFlag | ) |
References blender::bm, C, check_attribute_warning(), disable(), disable_with_undo(), enable_ex(), ENUM_OPERATORS(), stroke_is_dyntopo(), and triangulate().
Referenced by ENUM_OPERATORS().
|
static |
Definition at line 290 of file sculpt_detail.cc.
References blender::BKE_area_find_region_xy(), blender::BKE_base_is_visible(), blender::BKE_screen_find_area_xy(), blender::bke::pbvh::BMesh, C, blender::CTX_data_active_base(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_wm_area(), blender::CTX_wm_area_set(), blender::CTX_wm_region(), blender::CTX_wm_region_set(), blender::CTX_wm_screen(), blender::CTX_wm_view3d(), Dyntopo, blender::ED_view3d_viewcontext_init(), blender::bke::pbvh::Mesh, blender::ViewContext::obact, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::bke::object::pbvh_get(), blender::RGN_TYPE_WINDOW, sample_detail(), sample_detail_dyntopo(), sample_detail_voxel(), blender::SPACE_VIEW3D, Voxel, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.
Referenced by sample_detail(), sculpt_sample_detail_size_exec(), and sculpt_sample_detail_size_modal().
|
static |
Definition at line 252 of file sculpt_detail.cc.
References blender::BKE_paint_brush_for_read(), C, blender::Sculpt::constant_detail, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_tool_settings(), blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::depth, distance(), blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::edge_length, float, blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::hit, blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::isect_precalc, blender::isect_ray_tri_watertight_v3_precalc(), blender::mat4_to_scale(), node, blender::ViewContext::obact, blender::Sculpt::paint, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::ray_start, blender::bke::pbvh::raycast(), blender::ed::sculpt_paint::raycast_init(), sample_detail_dyntopo(), blender::ToolSettings::sculpt, sculpt_raycast_detail_cb(), and blender::ed::sculpt_paint::stroke_modifiers_check().
Referenced by sample_detail(), and sample_detail_dyntopo().
|
static |
Definition at line 206 of file sculpt_detail.cc.
References blender::SculptSession::active_vert(), blender::BKE_sculptsession_update_for_edit(), C, blender::CTX_data_depsgraph_pointer(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::Object::data, blender::math::distance(), blender::bke::Face, float, blender::bke::AttributeAccessor::lookup(), blender::ViewContext::obact, blender::Object::runtime, sample_detail_voxel(), blender::bke::ObjectRuntime::sculpt_session, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::ed::sculpt_paint::vert_neighbors_get_mesh(), and blender::bke::pbvh::vert_positions_eval().
Referenced by sample_detail(), and sample_detail_voxel().
|
static |
Definition at line 82 of file sculpt_detail.cc.
References blender::SculptSession::bm, C, blender::CTX_data_active_object(), blender::CTX_data_tool_settings(), blender::Sculpt::flags, blender::Object::runtime, blender::ToolSettings::sculpt, sculpt_and_constant_or_manual_detail_poll(), blender::SCULPT_DYNTOPO_DETAIL_CONSTANT, blender::SCULPT_DYNTOPO_DETAIL_MANUAL, blender::ed::sculpt_paint::sculpt_mode_poll(), and blender::bke::ObjectRuntime::sculpt_session.
Referenced by sculpt_and_constant_or_manual_detail_poll(), and SCULPT_OT_detail_flood_fill().
|
static |
Definition at line 91 of file sculpt_detail.cc.
References blender::SculptSession::bm, C, blender::CTX_data_active_object(), blender::Object::runtime, sculpt_and_dynamic_topology_poll(), blender::ed::sculpt_paint::sculpt_mode_poll(), and blender::bke::ObjectRuntime::sculpt_session.
Referenced by sculpt_and_dynamic_topology_poll(), and SCULPT_OT_dyntopo_detail_size_edit().
|
static |
Definition at line 104 of file sculpt_detail.cc.
References blender::bke::pbvh::all_leaf_nodes(), blender::BKE_base_is_visible(), blender::BKE_pbvh_node_mark_topology_update(), blender::BKE_sculptsession_free_pbvh(), blender::BLI_time_now_seconds(), blender::SculptSession::bm, blender::SculptSession::bm_log, blender::bke::pbvh::bmesh_update_topology(), blender::bke::pbvh::bounds_get(), C, CLOG_DEBUG, blender::Sculpt::constant_detail, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_view3d(), blender::DEG_id_tag_update(), blender::ed::sculpt_paint::dyntopo::detail_size::EDGE_LENGTH_MIN_FACTOR, blender::index_mask::IndexMask::foreach_index(), blender::Object::id, blender::ID_RECALC_GEOMETRY, LOG, blender::mat4_to_scale(), blender::math::midpoint(), NC_OBJECT, ND_DRAW, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::PBVH_Collapse, blender::bke::object::pbvh_get(), blender::PBVH_Subdivide, blender::ed::sculpt_paint::undo::Position, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_node(), blender::math::reduce_max(), blender::Object::runtime, blender::ToolSettings::sculpt, sculpt_detail_flood_fill_exec(), blender::bke::ObjectRuntime::sculpt_session, and blender::WM_event_add_notifier().
Referenced by sculpt_detail_flood_fill_exec(), and SCULPT_OT_detail_flood_fill().
|
static |
Definition at line 197 of file sculpt_dyntopo.cc.
References blender::SculptSession::bm, C, blender::CTX_data_active_object(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), disable_with_undo(), enable_with_undo(), NC_SCENE, ND_TOOLSETTINGS, blender::OPERATOR_FINISHED, blender::Object::runtime, sculpt_dynamic_topology_toggle_exec(), blender::bke::ObjectRuntime::sculpt_session, blender::WM_cursor_wait(), and blender::WM_main_add_notifier().
Referenced by sculpt_dynamic_topology_toggle_exec(), sculpt_dynamic_topology_toggle_invoke(), and SCULPT_OT_dynamic_topology_toggle().
|
static |
Definition at line 266 of file sculpt_dyntopo.cc.
References ATTRIBUTES, blender::BKE_report(), blender::SculptSession::bm, C, check_attribute_warning(), blender::CTX_data_active_object(), blender::CTX_data_scene(), IFACE_, MODIFIER, blender::wmOperator::reports, RPT_, blender::RPT_WARNING, blender::Object::runtime, sculpt_dynamic_topology_toggle_exec(), sculpt_dynamic_topology_toggle_invoke(), blender::bke::ObjectRuntime::sculpt_session, blender::ui::Warning, and blender::WM_operator_confirm_ex().
Referenced by sculpt_dynamic_topology_toggle_invoke(), and SCULPT_OT_dynamic_topology_toggle().
| void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_detail_flood_fill | ( | wmOperatorType * | ot | ) |
Definition at line 175 of file sculpt_detail.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, sculpt_and_constant_or_manual_detail_poll(), sculpt_detail_flood_fill_exec(), and SCULPT_OT_detail_flood_fill().
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt(), and SCULPT_OT_detail_flood_fill().
| void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dynamic_topology_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 298 of file sculpt_dyntopo.cc.
References blender::wmOperatorType::description, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::wmOperatorType::poll, sculpt_dynamic_topology_toggle_exec(), sculpt_dynamic_topology_toggle_invoke(), blender::ed::sculpt_paint::sculpt_mode_poll(), and SCULPT_OT_dynamic_topology_toggle().
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt(), and SCULPT_OT_dynamic_topology_toggle().
| void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dyntopo_detail_size_edit | ( | wmOperatorType * | ot | ) |
Definition at line 911 of file sculpt_detail.cc.
References blender::wmOperatorType::cancel, blender::wmOperatorType::description, dyntopo_detail_size_edit_cancel(), dyntopo_detail_size_edit_invoke(), dyntopo_detail_size_edit_modal(), blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, sculpt_and_dynamic_topology_poll(), and SCULPT_OT_dyntopo_detail_size_edit().
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt(), and SCULPT_OT_dyntopo_detail_size_edit().
| void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size | ( | wmOperatorType * | ot | ) |
Definition at line 412 of file sculpt_detail.cc.
References blender::wmOperatorType::description, Dyntopo, blender::wmOperatorType::exec, blender::wmOperatorType::flag, blender::wmOperatorType::idname, blender::wmOperatorType::invoke, blender::wmOperatorType::modal, blender::wmOperatorType::name, blender::OPTYPE_REGISTER, blender::OPTYPE_UNDO, blender::wmOperatorType::poll, blender::PROP_HIDDEN, prop_sculpt_sample_detail_mode_types, blender::PROP_SKIP_SAVE, blender::RNA_def_enum(), blender::RNA_def_int_array(), blender::RNA_def_property_flag(), blender::ed::sculpt_paint::sculpt_mode_poll(), SCULPT_OT_sample_detail_size(), sculpt_sample_detail_size_exec(), sculpt_sample_detail_size_invoke(), sculpt_sample_detail_size_modal(), SHRT_MAX, and blender::wmOperatorType::srna.
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt(), and SCULPT_OT_sample_detail_size().
|
static |
Definition at line 240 of file sculpt_detail.cc.
References blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::depth, distance(), blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::edge_length, blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::hit, blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::isect_precalc, node, blender::ed::sculpt_paint::dyntopo::SculptDetailRaycastData::ray_start, blender::bke::pbvh::raycast_node_detail_bmesh(), and sculpt_raycast_detail_cb().
Referenced by sample_detail_dyntopo(), and sculpt_raycast_detail_cb().
|
static |
Definition at line 361 of file sculpt_detail.cc.
References C, blender::wmOperator::ptr, blender::RNA_enum_get(), blender::RNA_int_get_array(), sample_detail(), and sculpt_sample_detail_size_exec().
Referenced by SCULPT_OT_sample_detail_size(), and sculpt_sample_detail_size_exec().
|
static |
Definition at line 369 of file sculpt_detail.cc.
References C, blender::CTX_wm_window(), blender::ED_workspace_status_text(), IFACE_, blender::OPERATOR_RUNNING_MODAL, sculpt_sample_detail_size_invoke(), blender::WM_CURSOR_EYEDROPPER, blender::WM_cursor_modal_set(), and blender::WM_event_add_modal_handler().
Referenced by SCULPT_OT_sample_detail_size(), and sculpt_sample_detail_size_invoke().
|
static |
Definition at line 379 of file sculpt_detail.cc.
References C, blender::CTX_wm_window(), blender::ED_workspace_status_text(), blender::EVT_ESCKEY, blender::KM_PRESS, blender::LEFTMOUSE, NC_SCENE, ND_TOOLSETTINGS, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::OPERATOR_RUNNING_MODAL, blender::wmOperator::ptr, blender::RIGHTMOUSE, blender::RNA_enum_get(), blender::RNA_int_set_array(), sample_detail(), sculpt_sample_detail_size_modal(), blender::wmEvent::type, blender::wmEvent::val, blender::WM_cursor_modal_restore(), blender::WM_main_add_notifier(), and blender::wmEvent::xy.
Referenced by SCULPT_OT_sample_detail_size(), and sculpt_sample_detail_size_modal().
| bool blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo | ( | const Object & | object, |
| const Brush & | brush ) |
Returns true if the stroke will use dynamic topology, false otherwise.
Factors: some brushes like grab cannot do dynamic topology. Others, like smooth, are better without. Same goes for alt-key smoothing.
Definition at line 986 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeToggleSettings::alt_smooth, blender::bke::pbvh::BMesh, blender::BRUSH_STROKE_ANCHORED, blender::BRUSH_STROKE_DRAG_DOT, blender::SculptSession::cache, ELEM, blender::bke::object::pbvh_get(), stroke_is_dyntopo(), blender::bke::brush::supports_dyntopo(), and blender::ed::sculpt_paint::StrokeCache::toggle_settings.
Referenced by blender::ed::sculpt_paint::calc_area_center(), blender::ed::sculpt_paint::calc_area_normal(), blender::ed::sculpt_paint::calc_area_normal_and_center(), ENUM_OPERATORS(), blender::ed::sculpt_paint::auto_mask::is_enabled(), blender::ed::sculpt_paint::sculpt_brush_stroke_cancel(), stroke_is_dyntopo(), blender::ed::sculpt_paint::SculptPaintStroke::test_cancel(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().
| void blender::ed::sculpt_paint::dyntopo::triangulate | ( | BMesh * | bm | ) |
Definition at line 47 of file sculpt_dyntopo.cc.
References blender::bm, blender::BM_mesh_triangulate(), blender::MOD_TRIANGULATE_NGON_EARCLIP, blender::MOD_TRIANGULATE_QUAD_BEAUTY, blender::BMesh::totface, blender::BMesh::totloop, and triangulate().
Referenced by enable_ex(), ENUM_OPERATORS(), blender::bke::tests::BMeshPaintBVHTest::SetUp(), blender::ed::sculpt_paint::symmetrize_exec(), and triangulate().
|
static |
Definition at line 67 of file sculpt_detail.cc.
Referenced by sculpt_detail_flood_fill_exec().
|
static |
Definition at line 200 of file sculpt_detail.cc.
Referenced by SCULPT_OT_sample_detail_size().