|
Blender V5.0
|
#include <optional>#include "BKE_paint.hh"#include "BKE_paint_bvh.hh"#include "BKE_subdiv_ccg.hh"#include "BLI_array.hh"#include "BLI_math_matrix_types.hh"#include "BLI_math_quaternion_types.hh"#include "BLI_math_vector_types.hh"#include "BLI_set.hh"#include "BLI_span.hh"#include "BLI_vector.hh"#include "DNA_brush_enums.h"#include "DNA_brush_types.h"#include "ED_view3d.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::ed |
| namespace | blender::ed::sculpt_paint |
| namespace | blender::ed::sculpt_paint::auto_mask |
| namespace | blender::ed::sculpt_paint::boundary |
| namespace | blender::ed::sculpt_paint::cloth |
| namespace | blender::ed::sculpt_paint::pose |
| namespace | blender::ed::sculpt_paint::undo |
| namespace | blender::ed::sculpt_paint::expand |
| namespace | blender::ed::sculpt_paint::project |
| namespace | blender::ed::sculpt_paint::trim |
| namespace | blender::ed::sculpt_paint::face_set |
| namespace | blender::ed::sculpt_paint::filter |
| namespace | blender::ed::sculpt_paint::color |
| namespace | blender::ed::sculpt_paint::mask |
| namespace | blender::ed::sculpt_paint::dyntopo |
Macros | |
Sculpt Types | |
| #define | SCULPT_RAKE_BRUSH_FACTOR 0.25f |
Typedefs | |
| using | blender::ed::sculpt_paint::BMeshNeighborVerts = Vector<BMVert *, 64> |
Variables | |
| static constexpr int | blender::ed::sculpt_paint::plane_brush_max_rolling_average_num = 20 |
Sculpt mesh accessor API | |
| #define | FAKE_NEIGHBOR_NONE -1 |
| int | SCULPT_vertex_count_get (const Object &object) |
| blender::Span< int > | SCULPT_fake_neighbors_ensure (const Depsgraph &depsgraph, Object &ob, float max_dist) |
| void | SCULPT_fake_neighbors_free (Object &ob) |
| #define FAKE_NEIGHBOR_NONE -1 |
Definition at line 585 of file sculpt_intern.hh.
Referenced by blender::ed::sculpt_paint::pose::add_fake_neighbors(), blender::ed::sculpt_paint::flood_fill::FillDataBMesh::execute(), blender::ed::sculpt_paint::flood_fill::FillDataGrids::execute(), blender::ed::sculpt_paint::flood_fill::FillDataMesh::execute(), blender::ed::sculpt_paint::fake_neighbor_init(), blender::ed::sculpt_paint::fake_neighbor_search(), blender::ed::sculpt_paint::fake_neighbor_search_bmesh(), blender::ed::sculpt_paint::fake_neighbor_search_grids(), blender::ed::sculpt_paint::fake_neighbor_search_mesh(), blender::ed::sculpt_paint::pose::grow_factors_bmesh(), and blender::ed::sculpt_paint::pose::grow_factors_grids().
| #define SCULPT_RAKE_BRUSH_FACTOR 0.25f |
Definition at line 130 of file sculpt_intern.hh.
Referenced by blender::ed::sculpt_paint::brush_delta_update().
| void sculpt_apply_texture | ( | const SculptSession & | ss, |
| const Brush & | brush, | ||
| const float | brush_point[3], | ||
| int | thread_id, | ||
| float * | r_value, | ||
| float | r_rgba[4] ) |
Sample the brush's texture value.
Definition at line 2322 of file sculpt.cc.
References add_v3_fl(), BKE_brush_mask_texture_get(), BKE_brush_sample_tex_3d(), blender::ed::sculpt_paint::StrokeCache::brush_local_mat, MTex::brush_map_mode, SculptSession::cache, copy_v4_fl(), ED_view3d_project_float_v2_m4(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, MTEX_MAP_MODE_3D, MTEX_MAP_MODE_AREA, mul_m4_v3(), OB_MODE_SCULPT, MTex::ofs, blender::ed::sculpt_paint::StrokeCache::paint, paint_get_tex_pixel(), blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::ed::sculpt_paint::StrokeCache::projection_mat, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, ViewContext::region, MTex::size, sub_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, blender::ed::sculpt_paint::symmetry_flip(), MTex::tex, SculptSession::tex_pool, Brush::texture_sample_bias, blender::ed::sculpt_paint::StrokeCache::vc, x, and y.
Referenced by blender::ed::sculpt_paint::calc_brush_texture_factors(), and blender::ed::sculpt_paint::calc_brush_texture_factors().
| bool SCULPT_brush_cursor_poll | ( | bContext * | C | ) |
Determines whether or not the brush cursor should be shown in the viewport
Definition at line 3734 of file sculpt.cc.
References C, is_brush_related_tool(), blender::ed::sculpt_paint::paint_brush_cursor_poll(), and SCULPT_mode_poll().
Referenced by blender::ed::sculpt_paint::object_sculpt_mode_enter().
| const float * SCULPT_brush_frontface_normal_from_falloff_shape | ( | const SculptSession & | ss, |
| char | falloff_shape ) |
Definition at line 1180 of file sculpt.cc.
References BLI_assert, SculptSession::cache, PAINT_FALLOFF_SHAPE_SPHERE, PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calculate_average_weight(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), and vpaint_do_draw().
| void SCULPT_cache_calc_brushdata_symm | ( | blender::ed::sculpt_paint::StrokeCache & | cache, |
| ePaintSymmetryFlags | symm, | ||
| char | axis, | ||
| float | angle ) |
Flip all the edit-data across the axis/axes specified by symm. Used to calculate multiple modifications to the mesh when symmetry is enabled.
Definition at line 3465 of file sculpt.cc.
References angle(), flip_qt_qt(), frac(), blender::ed::sculpt_paint::StrokeCache::grab_delta, blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::StrokeCache::gravity_direction, blender::ed::sculpt_paint::StrokeCache::gravity_direction_symm, blender::MatBase< float, 4, 4 >::identity(), blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::initial_normal_symm, blender::ed::sculpt_paint::StrokeCache::last_location, blender::ed::sculpt_paint::StrokeCache::last_location_symm, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::location_symm, mul_m4_v3(), mul_v3_fl(), PAINT_SYMMETRY_FEATHER, blender::ed::sculpt_paint::StrokeCache::plane_offset, printf, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, rotate_m4(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, blender::ed::sculpt_paint::symmetry_flip(), blender::ed::sculpt_paint::StrokeCache::view_normal, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and zero_v3().
Referenced by blender::ed::sculpt_paint::do_radial_symmetry(), blender::ed::sculpt_paint::do_symmetrical_brush_actions(), vpaint_do_paint(), vpaint_do_symmetrical_brush_actions(), wpaint_do_paint(), and wpaint_do_symmetrical_brush_actions().
| void SCULPT_calc_vertex_displacement | ( | const SculptSession & | ss, |
| const Brush & | brush, | ||
| float | translation[3] ) |
Calculates the vertex offset for a single vertex depending on the brush setting rgb as vector displacement.
Definition at line 2388 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::brush_local_mat_inv, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, copy_v3_v3(), i, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, Brush::mtex, mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), pow2f(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, blender::math::safe_divide(), MTex::size, blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, and blender::ed::sculpt_paint::symmetry_flip().
Definition at line 548 of file sculpt.cc.
References i.
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), blender::ed::sculpt_paint::filter_verts_outside_symmetry_area(), blender::ed::sculpt_paint::pose::grow_factors_bmesh(), blender::ed::sculpt_paint::pose::grow_factors_grids(), blender::ed::sculpt_paint::pose::grow_factors_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), and blender::ed::sculpt_paint::expand::reposition_pivot().
| void SCULPT_cube_tip_init | ( | const Sculpt & | sd, |
| const Object & | ob, | ||
| const Brush & | brush, | ||
| float | mat[4][4] ) |
Definition at line 6328 of file sculpt.cc.
References SculptSession::cache, blender::ed::sculpt_paint::calc_brush_local_mat(), invert_m4_m4(), mul_m4_m4m4(), mul_v3_fl(), normalize_m4(), blender::ed::sculpt_paint::StrokeCache::radius, scale_m4_fl(), Object::sculpt, Brush::tip_scale_x, and zero_m4().
Referenced by blender::ed::sculpt_paint::color::do_paint_brush().
| void SCULPT_do_paint_brush_image | ( | const Depsgraph & | depsgraph, |
| PaintModeSettings & | paint_mode_settings, | ||
| const Sculpt & | sd, | ||
| Object & | ob, | ||
| const blender::IndexMask & | node_mask ) |
Definition at line 497 of file sculpt_paint_image.cc.
References BKE_paint_brush_for_read(), depsgraph, blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::paint::image::do_push_undo_tile(), blender::ed::sculpt_paint::paint::image::fix_non_manifold_seam_bleeding(), blender::index_mask::IndexMask::foreach_index(), i, blender::ed::sculpt_paint::paint::image::ImageData::image, blender::ed::sculpt_paint::paint::image::ImageData::image_user, blender::ed::sculpt_paint::paint::image::ImageData::init_active_image(), blender::bke::pbvh::pixels::mark_image_dirty(), Sculpt::paint, and blender::bke::object::pbvh_get().
Referenced by blender::ed::sculpt_paint::color::do_paint_brush().
| blender::Span< int > SCULPT_fake_neighbors_ensure | ( | const Depsgraph & | depsgraph, |
| Object & | ob, | ||
| float | max_dist ) |
This allows the sculpt brushes to work on meshes with multiple connected components as if they had only one connected component. These neighbors are calculated for each vertex using the minimum distance to a vertex that is in a different connected component.
Definition at line 6098 of file sculpt.cc.
References SculptFakeNeighbors::current_max_distance, depsgraph, blender::ed::sculpt_paint::islands::ensure_cache(), SculptFakeNeighbors::fake_neighbor_index, blender::ed::sculpt_paint::fake_neighbor_init(), blender::ed::sculpt_paint::fake_neighbor_search(), SculptSession::fake_neighbors, Array< T, InlineBufferCapacity, Allocator >::is_empty(), and Object::sculpt.
Referenced by blender::ed::sculpt_paint::pose::ik_chain_init().
| void SCULPT_fake_neighbors_free | ( | Object & | ob | ) |
Definition at line 6120 of file sculpt.cc.
References blender::ed::sculpt_paint::pose_fake_neighbors_free(), and Object::sculpt.
Referenced by blender::ed::sculpt_paint::flush_update_done(), and blender::ed::sculpt_paint::pose::ik_chain_init().
| void SCULPT_flip_quat_by_symm_area | ( | float | quat[4], |
| ePaintSymmetryFlags | symm, | ||
| ePaintSymmetryAreas | symmarea, | ||
| const float | pivot[3] ) |
Definition at line 2889 of file sculpt.cc.
Referenced by blender::ed::sculpt_paint::pose::do_pose_brush(), and blender::ed::sculpt_paint::transform_matrices_init().
| blender::float3 SCULPT_flip_v3_by_symm_area | ( | const blender::float3 & | vector, |
| ePaintSymmetryFlags | symm, | ||
| ePaintSymmetryAreas | symmarea, | ||
| const blender::float3 & | pivot ) |
References depsgraph.
| ePaintSymmetryAreas SCULPT_get_vertex_symm_area | ( | const float | co[3] | ) |
Definition at line 2825 of file sculpt.cc.
References PAINT_SYMM_AREA_DEFAULT, PAINT_SYMM_AREA_X, PAINT_SYMM_AREA_Y, and PAINT_SYMM_AREA_Z.
Referenced by blender::ed::sculpt_paint::pose::calc_segment_translations(), blender::ed::sculpt_paint::calc_symm_area_transform_translations(), and blender::ed::sculpt_paint::transform_radius_elastic().
| bool SCULPT_is_vertex_inside_brush_radius_symm | ( | const float | vertex[3], |
| const float | br_co[3], | ||
| float | radius, | ||
| char | symm ) |
Checks if a vertex is inside the brush radius from any of its mirrored axis.
Definition at line 742 of file sculpt.cc.
References i, blender::ed::sculpt_paint::is_symmetry_iteration_valid(), len_squared_v3v3(), and blender::ed::sculpt_paint::symmetry_flip().
Referenced by blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_bmesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), and blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_mesh().
| ePaintSymmetryFlags SCULPT_mesh_symmetry_xyz_get | ( | const Object & | object | ) |
Definition at line 184 of file sculpt.cc.
References Mesh::symmetry.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::cursor_draw_point_with_symmetry(), blender::ed::sculpt_paint::pose::do_pose_brush(), blender::ed::sculpt_paint::do_symmetrical_brush_actions(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_bmesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_mesh(), blender::ed::sculpt_paint::expand::find_active_connected_components_from_vert(), blender::ed::sculpt_paint::find_symm_verts_bmesh(), blender::ed::sculpt_paint::find_symm_verts_grids(), blender::ed::sculpt_paint::find_symm_verts_mesh(), blender::ed::sculpt_paint::pose::grow_pose_factor(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::ed::sculpt_paint::gesture::init_common(), blender::ed::sculpt_paint::expand::reposition_pivot(), blender::ed::sculpt_paint::sculpt_transform_all_vertices(), blender::ed::sculpt_paint::set_pivot_position_exec(), blender::ed::sculpt_paint::transform_node_bmesh(), blender::ed::sculpt_paint::transform_node_grids(), blender::ed::sculpt_paint::transform_node_mesh(), blender::ed::sculpt_paint::transform_radius_elastic(), vpaint_do_symmetrical_brush_actions(), and wpaint_do_symmetrical_brush_actions().
| bool SCULPT_mode_poll | ( | bContext * | C | ) |
Definition at line 3677 of file sculpt.cc.
References C, CTX_data_active_object(), Object::mode, and OB_MODE_SCULPT.
Referenced by ED_keymap_paint(), blender::ed::sculpt_paint::no_multires_poll(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_flood_fill(), blender::ed::sculpt_paint::dyntopo::sculpt_and_constant_or_manual_detail_poll(), blender::ed::sculpt_paint::dyntopo::sculpt_and_dynamic_topology_poll(), SCULPT_brush_cursor_poll(), SCULPT_mode_poll_view3d(), blender::ed::sculpt_paint::cloth::SCULPT_OT_cloth_filter(), blender::ed::sculpt_paint::color::SCULPT_OT_color_filter(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dynamic_topology_toggle(), blender::ed::sculpt_paint::expand::SCULPT_OT_expand(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_create(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_edit(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_init(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_randomize_colors(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_by_color(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_filter(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_boundary(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_cavity(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_init(), blender::ed::sculpt_paint::filter::SCULPT_OT_mesh_filter(), blender::ed::sculpt_paint::SCULPT_OT_optimize(), blender::ed::sculpt_paint::SCULPT_OT_sample_color(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size(), blender::ed::sculpt_paint::SCULPT_OT_set_persistent_base(), blender::ed::sculpt_paint::SCULPT_OT_set_pivot_position(), and SCULPT_poll().
| bool SCULPT_mode_poll_view3d | ( | bContext * | C | ) |
Definition at line 3683 of file sculpt.cc.
References C, CTX_wm_region_view3d(), and SCULPT_mode_poll().
Referenced by blender::ed::sculpt_paint::hide::PAINT_OT_hide_show(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_all(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_lasso_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_line_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_masked(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_polyline_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_box_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_lasso_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_line_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_polyline_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_filter(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_invert(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_lasso_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_line_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_polyline_gesture(), blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_box_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_lasso_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_line_gesture(), and blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture().
| bool SCULPT_paint_image_canvas_get | ( | PaintModeSettings & | paint_mode_settings, |
| Object & | ob, | ||
| Image ** | r_image, | ||
| ImageUser ** | r_image_user ) |
Get the image canvas for painting on the given object.
Definition at line 466 of file sculpt_paint_image.cc.
References blender::ed::sculpt_paint::paint::image::ImageData::image, blender::ed::sculpt_paint::paint::image::ImageData::image_user, and blender::ed::sculpt_paint::paint::image::ImageData::init_active_image().
Referenced by sculpt_needs_pbvh_pixels(), and sculpt_pbvh_update_pixels().
| bool SCULPT_poll | ( | bContext * | C | ) |
Checks for a brush, not just sculpt mode.
Definition at line 3689 of file sculpt.cc.
References C, blender::ed::sculpt_paint::paint_brush_tool_poll(), and SCULPT_mode_poll().
Referenced by blender::ed::sculpt_paint::SCULPT_OT_brush_stroke().
| void sculpt_project_v3_normal_align | ( | const SculptSession & | ss, |
| float | normal_weight, | ||
| float | grab_delta[3] ) |
Align the grab delta to the brush normal.
| grab_delta | Typically from ss.cache->grab_delta_symmetry. |
Definition at line 567 of file sculpt.cc.
References SculptSession::cache, dot_v3v3(), fabsf, madd_v3_v3fl(), mul_v3_fl(), project_plane_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by blender::ed::sculpt_paint::brushes::do_elastic_deform_brush(), blender::ed::sculpt_paint::brushes::do_grab_brush(), and blender::ed::sculpt_paint::brushes::do_snake_hook_brush().
| bool SCULPT_stroke_is_first_brush_step | ( | const blender::ed::sculpt_paint::StrokeCache & | cache | ) |
Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes enabled.
This should be used for functionality that needs to be computed once per stroke of a particular tool (allocating memory, updating random seeds...).
Definition at line 536 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, and blender::ed::sculpt_paint::StrokeCache::tile_pass.
Referenced by blender::ed::sculpt_paint::brushes::do_surface_smooth_brush().
| bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass | ( | const blender::ed::sculpt_paint::StrokeCache & | cache | ) |
Returns true on the first brush step of each symmetry pass.
Definition at line 542 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::first_time.
Referenced by blender::ed::sculpt_paint::brush_delta_update(), blender::ed::sculpt_paint::calc_brush_plane(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::cloth::do_cloth_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_topology_relax_brush(), blender::ed::sculpt_paint::brushes::do_topology_slide_brush(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::sculpt_update_cache_variants(), and blender::ed::sculpt_paint::update_sculpt_normal().
| bool SCULPT_stroke_is_main_symmetry_pass | ( | const blender::ed::sculpt_paint::StrokeCache & | cache | ) |
Returns true when the step belongs to the stroke that is directly performed by the brush and not by one of the symmetry passes.
Definition at line 530 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, and blender::ed::sculpt_paint::StrokeCache::tile_pass.
Referenced by blender::ed::sculpt_paint::calc_brush_plane(), blender::ed::sculpt_paint::do_brush_action(), and blender::ed::sculpt_paint::brushes::do_clay_thumb_brush().
Definition at line 4468 of file sculpt.cc.
References BKE_sculpt_update_object_for_edit(), BKE_sculptsession_use_pbvh_draw(), blender::ed::sculpt_paint::brush_type_is_paint(), C, CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), CTX_wm_region_view3d(), SculptSession::deform_modifiers_active, depsgraph, Object::sculpt, ToolSettings::sculpt, Brush::sculpt_brush_type, blender::ed::sculpt_paint::sculpt_needs_connectivity_info(), and SculptSession::shapekey_active.
Referenced by blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::sculpt_paint::dyntopo::sample_detail_dyntopo(), blender::ed::sculpt_paint::stroke_done(), blender::ed::sculpt_paint::stroke_get_location_bvh_ex(), and blender::ed::sculpt_paint::stroke_update_step().
| void SCULPT_tag_update_overlays | ( | bContext * | C | ) |
Should be used after modifying the mask or Face Sets IDs.
Definition at line 759 of file sculpt.cc.
References BKE_sculptsession_use_pbvh_draw(), C, CTX_data_active_object(), CTX_wm_region(), CTX_wm_region_view3d(), DEG_id_tag_update(), ED_region_tag_redraw(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SHADING, NC_OBJECT, ND_DRAW, and WM_event_add_notifier().
Referenced by blender::ed::sculpt_paint::gesture::apply(), blender::ed::sculpt_paint::face_set::create_op_exec(), blender::ed::sculpt_paint::face_set::edit_op_exec(), blender::ed::sculpt_paint::face_set::init_op_exec(), 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::face_set::randomize_colors_exec(), blender::ed::sculpt_paint::expand::restore_original_state(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), and blender::ed::sculpt_paint::mask::sculpt_mask_init_exec().
| bool SCULPT_use_image_paint_brush | ( | PaintModeSettings & | settings, |
| Object & | ob ) |
Definition at line 484 of file sculpt_paint_image.cc.
References BKE_paint_canvas_image_get(), OB_MESH, Object::type, U, and USER_EXPERIMENTAL_TEST.
Referenced by brush_stroke_init(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::sculpt_paint::stroke_done(), blender::ed::sculpt_paint::stroke_test_start(), stroke_undo_begin(), stroke_undo_end(), and blender::ed::sculpt_paint::stroke_update_step().
| int SCULPT_vertex_count_get | ( | const Object & | object | ) |
Definition at line 151 of file sculpt.cc.
References BKE_pbvh_get_grid_num_verts(), BLI_assert, SculptSession::bm, BM_mesh_elem_count(), BM_VERT, blender::bke::pbvh::BMesh, blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, OB_MESH, and blender::bke::object::pbvh_get().
Referenced by blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::expand::boundary_topology_falloff_create(), blender::ed::sculpt_paint::cloth::brush_simulation_create(), blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::expand::calc_topology_falloff_from_verts(), blender::ed::sculpt_paint::cloth::cloth_brush_satisfy_constraints(), blender::ed::sculpt_paint::expand::diagonals_falloff_create(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::expand::enabled_state_to_bitmap(), blender::ed::sculpt_paint::fake_neighbor_init(), blender::ed::sculpt_paint::pose::grow_pose_factor(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::filter::mesh_filter_surface_smooth_init(), blender::ed::sculpt_paint::auto_mask::normal_occlusion_automasking_fill(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ed::sculpt_paint::expand::original_state_store(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_modal(), blender::ed::sculpt_paint::filter::sculpt_filter_specific_init(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::expand::spherical_falloff_create(), blender::ed::sculpt_paint::expand::topology_falloff_create(), blender::ed::sculpt_paint::expand::topology_from_state_boundary(), blender::ed::sculpt_paint::expand::update_max_vert_falloff_value(), and blender::ed::sculpt_paint::hide::visibility_filter_exec().