|
Blender V4.3
|
Classes | |
| struct | AccumulatedVert |
| struct | Cache |
| struct | Settings |
Enumerations | |
| enum class | BoundaryAutomaskMode { Edges = 1 , FaceSets = 2 } |
Functions | |
| const Cache * | active_cache_get (const SculptSession &ss) |
| std::unique_ptr< Cache > | cache_init (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob) |
| std::unique_ptr< Cache > | cache_init (const Depsgraph &depsgraph, const Sculpt &sd, const Brush *brush, Object &ob) |
| bool | mode_enabled (const Sculpt &sd, const Brush *br, eAutomasking_flag mode) |
| bool | is_enabled (const Sculpt &sd, const Object &object, const Brush *br) |
| bool | needs_normal (const SculptSession &ss, const Sculpt &sd, const Brush *brush) |
| bool | brush_type_can_reuse_automask (int sculpt_brush_type) |
| void | calc_vert_factors (const Depsgraph &depsgraph, const Object &object, const Cache &cache, const bke::pbvh::MeshNode &node, Span< int > verts, MutableSpan< float > factors) |
| void | calc_vert_factors (const Depsgraph &depsgraph, const Object &object, const Cache *cache, const bke::pbvh::MeshNode &node, Span< int > verts, MutableSpan< float > factors) |
| void | calc_grids_factors (const Depsgraph &depsgraph, const Object &object, const Cache &cache, const bke::pbvh::GridsNode &node, Span< int > grids, MutableSpan< float > factors) |
| void | calc_grids_factors (const Depsgraph &depsgraph, const Object &object, const Cache *cache, const bke::pbvh::GridsNode &node, Span< int > grids, MutableSpan< float > factors) |
| void | calc_vert_factors (const Depsgraph &depsgraph, const Object &object, const Cache &cache, const bke::pbvh::BMeshNode &node, const Set< BMVert *, 0 > &verts, MutableSpan< float > factors) |
| void | calc_vert_factors (const Depsgraph &depsgraph, const Object &object, const Cache *cache, const bke::pbvh::BMeshNode &node, const Set< BMVert *, 0 > &verts, MutableSpan< float > factors) |
| void | calc_face_factors (const Depsgraph &depsgraph, const Object &object, OffsetIndices< int > faces, Span< int > corner_verts, const Cache &cache, const bke::pbvh::MeshNode &node, Span< int > face_indices, MutableSpan< float > factors) |
| static int | calc_effective_bits (const Sculpt &sd, const Brush *brush) |
| static float | normal_calc (const float3 &compare_normal, const float3 &normal, float limit_lower, float limit_upper) |
| static bool | is_constrained_by_radius (const Brush *br) |
| static int | boundary_propagation_steps (const Sculpt &sd, const Brush *brush) |
| static bool | needs_factors_cache (const Sculpt &sd, const Brush *brush) |
| static float | calc_brush_normal_factor (const Cache &automasking, const Object &object, const float3 &normal) |
| static float | calc_view_normal_factor (const Cache &automasking, const Object &object, const float3 &normal) |
| static bool | calc_view_occlusion_factor (const Depsgraph &depsgraph, Cache &automasking, const Object &object, const int vert, const float3 &vert_position) |
| static float | calc_cavity_factor (const Cache &automasking, float factor) |
| static void | calc_blurred_cavity_mesh (const Depsgraph &depsgraph, const Object &object, const Cache &automasking, const int steps, const int vert, MutableSpan< float > cavity_factors) |
| static void | calc_blurred_cavity_grids (const Object &object, const Cache &automasking, const int steps, const SubdivCCGCoord vert, MutableSpan< float > cavity_factors) |
| static void | calc_blurred_cavity_bmesh (const Cache &automasking, const int steps, BMVert *vert, MutableSpan< float > cavity_factors) |
| static float | process_cavity_factor (const Cache &automasking, float factor) |
| static float | calc_cavity_factor_mesh (const Depsgraph &depsgraph, const Cache &automasking, const Object &object, const int vert) |
| static float | calc_cavity_factor_grids (const CCGKey &key, const Cache &automasking, const Object &object, const int vert) |
| static float | calc_cavity_factor_bmesh (const Cache &automasking, BMVert *vert, const int vert_i) |
| static void | fill_topology_automasking_factors_mesh (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const Span< float3 > vert_positions, MutableSpan< float > factors) |
| static void | fill_topology_automasking_factors_grids (const Sculpt &sd, Object &ob, const SubdivCCG &subdiv_ccg, MutableSpan< float > factors) |
| static void | fill_topology_automasking_factors_bmesh (const Sculpt &sd, Object &ob, BMesh &bm, MutableSpan< float > factors) |
| static void | fill_topology_automasking_factors (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, MutableSpan< float > factors) |
| static void | init_face_sets_masking (const Sculpt &sd, Object &ob, MutableSpan< float > factors) |
| static void | init_boundary_masking_mesh (Object &object, const Depsgraph &depsgraph, const BoundaryAutomaskMode mode, const int propagation_steps, MutableSpan< float > factors) |
| static void | init_boundary_masking_grids (Object &object, const BoundaryAutomaskMode mode, const int propagation_steps, MutableSpan< float > factors) |
| static void | init_boundary_masking_bmesh (Object &object, const BoundaryAutomaskMode mode, const int propagation_steps, MutableSpan< float > factors) |
| static void | init_boundary_masking (Object &object, const Depsgraph &depsgraph, const BoundaryAutomaskMode mode, const int propagation_steps, MutableSpan< float > factors) |
| static void | cache_settings_update (Cache &automasking, Object &object, const Sculpt &sd, const Brush *brush) |
| static void | normal_occlusion_automasking_fill (const Depsgraph &depsgraph, Cache &automasking, Object &ob, eAutomasking_flag mode, MutableSpan< float > factors) |
Variables | |
| static constexpr int | EDGE_DISTANCE_INF = -1 |
|
strong |
| Enumerator | |
|---|---|
| Edges | |
| FaceSets | |
Definition at line 1309 of file sculpt_automasking.cc.
| const Cache * blender::ed::sculpt_paint::auto_mask::active_cache_get | ( | const SculptSession & | ss | ) |
Returns the auto-masking cache depending on the active tool. Used for code that can run both for brushes and filter.
Definition at line 49 of file sculpt_automasking.cc.
References blender::ed::sculpt_paint::filter::Cache::automasking, blender::ed::sculpt_paint::StrokeCache::automasking, SculptSession::cache, and SculptSession::filter_cache.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), and blender::ed::sculpt_paint::cloth::do_simulation_step().
|
static |
Definition at line 177 of file sculpt_automasking.cc.
References Brush::automasking_boundary_edges_propagation_steps, Sculpt::automasking_boundary_edges_propagation_steps, Brush::automasking_flags, BRUSH_AUTOMASKING_BOUNDARY_EDGES, and BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS.
Referenced by cache_init(), and needs_factors_cache().
| bool blender::ed::sculpt_paint::auto_mask::brush_type_can_reuse_automask | ( | int | sculpt_brush_type | ) |
Definition at line 1638 of file sculpt_automasking.cc.
References brush_type_can_reuse_automask(), ELEM, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_PAINT, and SCULPT_BRUSH_TYPE_SMEAR.
Referenced by brush_type_can_reuse_automask().
| std::unique_ptr< Cache > blender::ed::sculpt_paint::auto_mask::cache_init | ( | const Depsgraph & | depsgraph, |
| const Sculpt & | sd, | ||
| const Brush * | brush, | ||
| Object & | ob ) |
Definition at line 1652 of file sculpt_automasking.cc.
References SculptSession::active_vert_index(), Brush::automasking_cavity_curve, Sculpt::automasking_cavity_curve, BKE_curvemapping_init(), boundary_propagation_steps(), BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_CAVITY_USE_CURVE, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, BRUSH_AUTOMASKING_VIEW_NORMAL, BRUSH_AUTOMASKING_VIEW_OCCLUSION, cache_init(), cache_settings_update(), calc_effective_bits(), depsgraph, fill_topology_automasking_factors(), init_boundary_masking(), init_face_sets_masking(), is_constrained_by_radius(), is_enabled(), mode_enabled(), needs_factors_cache(), normal_occlusion_automasking_fill(), Object::sculpt, SCULPT_vertex_count_get(), SCULPT_vertex_random_access_ensure(), and steps.
| std::unique_ptr< Cache > blender::ed::sculpt_paint::auto_mask::cache_init | ( | const Depsgraph & | depsgraph, |
| const Sculpt & | sd, | ||
| Object & | ob ) |
Creates and initializes an auto-masking cache.
For auto-masking modes that cannot be calculated in real time, data is also stored at the vertex level prior to the stroke starting.
Definition at line 1647 of file sculpt_automasking.cc.
References cache_init(), and depsgraph.
Referenced by cache_init(), cache_init(), blender::ed::sculpt_paint::do_brush_action(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), and blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start().
|
static |
Definition at line 1525 of file sculpt_automasking.cc.
References Brush::automasking_cavity_blur_steps, Sculpt::automasking_cavity_blur_steps, Brush::automasking_cavity_curve, Sculpt::automasking_cavity_curve, Brush::automasking_cavity_factor, Sculpt::automasking_cavity_factor, Brush::automasking_flags, Brush::automasking_start_normal_falloff, Sculpt::automasking_start_normal_falloff, Brush::automasking_start_normal_limit, Sculpt::automasking_start_normal_limit, Brush::automasking_view_normal_falloff, Sculpt::automasking_view_normal_falloff, Brush::automasking_view_normal_limit, Sculpt::automasking_view_normal_limit, BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_VIEW_NORMAL, cache_settings_update(), calc_effective_bits(), blender::ed::sculpt_paint::auto_mask::Settings::cavity_blur_steps, blender::ed::sculpt_paint::auto_mask::Settings::cavity_curve, blender::ed::sculpt_paint::auto_mask::Settings::cavity_factor, blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::auto_mask::Settings::initial_face_set, blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::auto_mask::Settings::start_normal_falloff, blender::ed::sculpt_paint::auto_mask::Settings::start_normal_limit, blender::ed::sculpt_paint::auto_mask::Settings::view_normal_falloff, and blender::ed::sculpt_paint::auto_mask::Settings::view_normal_limit.
Referenced by cache_init(), and cache_settings_update().
|
static |
Definition at line 490 of file sculpt_automasking.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BLI_assert, BM_elem_index_get, calc_cavity_factor(), BMVert::co, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::ed::sculpt_paint::auto_mask::AccumulatedVert::count, blender::ed::sculpt_paint::auto_mask::AccumulatedVert::distance, blender::math::distance(), blender::math::dot(), float, BMVert::no, blender::ed::sculpt_paint::auto_mask::AccumulatedVert::normal, blender::math::normalize(), blender::ed::sculpt_paint::auto_mask::AccumulatedVert::position, steps, and blender::ed::sculpt_paint::vert_neighbors_get_bmesh().
Referenced by calc_cavity_factor_bmesh().
|
static |
Definition at line 389 of file sculpt_automasking.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), BLI_assert, calc_cavity_factor(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), SubdivCCGNeighbors::coords, blender::ed::sculpt_paint::auto_mask::AccumulatedVert::count, blender::ed::sculpt_paint::auto_mask::AccumulatedVert::distance, blender::math::distance(), blender::math::dot(), float, SubdivCCGCoord::from_index(), blender::ed::sculpt_paint::auto_mask::AccumulatedVert::normal, blender::math::normalize(), SubdivCCG::normals, blender::ed::sculpt_paint::auto_mask::AccumulatedVert::position, SubdivCCG::positions, steps, SculptSession::subdiv_ccg, and SubdivCCGCoord::to_index().
Referenced by calc_cavity_factor_grids().
|
static |
Definition at line 282 of file sculpt_automasking.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BLI_assert, calc_cavity_factor(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::ed::sculpt_paint::auto_mask::AccumulatedVert::count, depsgraph, blender::ed::sculpt_paint::auto_mask::AccumulatedVert::distance, blender::math::distance(), blender::math::dot(), blender::bke::Face, float, blender::ed::sculpt_paint::auto_mask::AccumulatedVert::normal, blender::math::normalize(), blender::ed::sculpt_paint::auto_mask::AccumulatedVert::position, steps, blender::ed::sculpt_paint::vert_neighbors_get_mesh(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by calc_cavity_factor_mesh().
|
static |
Definition at line 206 of file sculpt_automasking.cc.
References SculptSession::cache, SculptSession::filter_cache, blender::ed::sculpt_paint::filter::Cache::initial_normal, blender::ed::sculpt_paint::StrokeCache::initial_normal_symm, M_PI, normal_calc(), blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::auto_mask::Settings::start_normal_falloff, and blender::ed::sculpt_paint::auto_mask::Settings::start_normal_limit.
Referenced by calc_face_factors(), calc_grids_factors(), calc_vert_factors(), and calc_vert_factors().
|
static |
Definition at line 263 of file sculpt_automasking.cc.
References BRUSH_AUTOMASKING_CAVITY_INVERTED, blender::ed::sculpt_paint::auto_mask::Settings::cavity_factor, CLAMP, fabsf, blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::auto_mask::Cache::settings, and signf().
Referenced by calc_blurred_cavity_bmesh(), calc_blurred_cavity_grids(), and calc_blurred_cavity_mesh().
|
static |
Definition at line 629 of file sculpt_automasking.cc.
References calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::Settings::cavity_blur_steps, blender::ed::sculpt_paint::auto_mask::Cache::cavity_factor, process_cavity_factor(), and blender::ed::sculpt_paint::auto_mask::Cache::settings.
Referenced by calc_vert_factors().
|
static |
Definition at line 614 of file sculpt_automasking.cc.
References calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::Settings::cavity_blur_steps, blender::ed::sculpt_paint::auto_mask::Cache::cavity_factor, SubdivCCGCoord::from_index(), process_cavity_factor(), and blender::ed::sculpt_paint::auto_mask::Cache::settings.
Referenced by calc_grids_factors().
|
static |
Definition at line 598 of file sculpt_automasking.cc.
References calc_blurred_cavity_mesh(), blender::ed::sculpt_paint::auto_mask::Settings::cavity_blur_steps, blender::ed::sculpt_paint::auto_mask::Cache::cavity_factor, depsgraph, process_cavity_factor(), and blender::ed::sculpt_paint::auto_mask::Cache::settings.
Referenced by calc_face_factors(), and calc_vert_factors().
|
static |
Definition at line 101 of file sculpt_automasking.cc.
References Brush::automasking_flags, Sculpt::automasking_flags, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_CAVITY_NORMAL, and BRUSH_AUTOMASKING_CAVITY_USE_CURVE.
Referenced by cache_init(), cache_settings_update(), needs_factors_cache(), and needs_normal().
| void blender::ed::sculpt_paint::auto_mask::calc_face_factors | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| OffsetIndices< int > | faces, | ||
| Span< int > | corner_verts, | ||
| const Cache & | cache, | ||
| const bke::pbvh::MeshNode & | node, | ||
| Span< int > | face_indices, | ||
| MutableSpan< float > | factors ) |
Calculate all auto-masking influence on each face.
Definition at line 751 of file sculpt_automasking.cc.
References BLI_SCOPED_DEFER, SculptVertexInfo::boundary, blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, BRUSH_AUTOMASKING_VIEW_NORMAL, BRUSH_AUTOMASKING_VIEW_OCCLUSION, SculptSession::cache, calc_brush_normal_factor(), calc_cavity_factor_mesh(), calc_view_normal_factor(), calc_view_occlusion_factor(), depsgraph, blender::bke::Face, blender::ed::sculpt_paint::auto_mask::Cache::factor, SculptSession::filter_cache, blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::Span< T >::index_range(), blender::ed::sculpt_paint::auto_mask::Settings::initial_face_set, blender::ed::sculpt_paint::auto_mask::Settings::initial_island_nr, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::ed::sculpt_paint::StrokeCache::paint_face_set, blender::math::rcp(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::Span< T >::size(), blender::Span< T >::slice(), sum(), blender::ed::sculpt_paint::auto_mask::Settings::topology_use_brush_limit, blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::face_set::vert_has_face_set(), blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), blender::ed::sculpt_paint::islands::vert_id_get(), blender::ed::sculpt_paint::boundary::vert_is_boundary(), blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), and SculptSession::vertex_info.
| void blender::ed::sculpt_paint::auto_mask::calc_grids_factors | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const Cache & | cache, | ||
| const bke::pbvh::GridsNode & | node, | ||
| Span< int > | grids, | ||
| MutableSpan< float > | factors ) |
Definition at line 860 of file sculpt_automasking.cc.
References Geometry::attributes, BKE_subdiv_ccg_key_top_level(), SculptVertexInfo::boundary, blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, BRUSH_AUTOMASKING_VIEW_NORMAL, BRUSH_AUTOMASKING_VIEW_OCCLUSION, SculptSession::cache, calc_brush_normal_factor(), calc_cavity_factor_grids(), calc_view_normal_factor(), calc_view_occlusion_factor(), depsgraph, blender::bke::Face, blender::ed::sculpt_paint::auto_mask::Cache::factor, SculptSession::filter_cache, blender::ed::sculpt_paint::auto_mask::Settings::flags, SubdivCCGCoord::from_index(), CCGKey::grid_area, blender::Span< T >::index_range(), blender::ed::sculpt_paint::auto_mask::Settings::initial_face_set, blender::ed::sculpt_paint::auto_mask::Settings::initial_island_nr, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Span< T >::is_empty(), blender::ed::sculpt_paint::orig_position_data_lookup_grids(), blender::ed::sculpt_paint::StrokeCache::paint_face_set, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_FACE_SET_NONE, blender::ed::sculpt_paint::auto_mask::Cache::settings, SculptSession::subdiv_ccg, blender::ed::sculpt_paint::auto_mask::Settings::topology_use_brush_limit, blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), blender::ed::sculpt_paint::islands::vert_id_get(), blender::ed::sculpt_paint::boundary::vert_is_boundary(), and SculptSession::vertex_info.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), calc_grids_factors(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::cloth::do_simulation_step(), and blender::ed::sculpt_paint::sample_node_surface_grids().
|
inline |
Definition at line 135 of file sculpt_automask.hh.
References calc_grids_factors(), and depsgraph.
| void blender::ed::sculpt_paint::auto_mask::calc_vert_factors | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const Cache & | cache, | ||
| const bke::pbvh::BMeshNode & | node, | ||
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< float > | factors ) |
Definition at line 988 of file sculpt_automasking.cc.
References BLI_SCOPED_DEFER, bm, SculptSession::bm, BM_elem_index_get, SculptSession::bm_log, blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, BRUSH_AUTOMASKING_VIEW_NORMAL, BRUSH_AUTOMASKING_VIEW_OCCLUSION, SculptSession::cache, calc_brush_normal_factor(), calc_cavity_factor_bmesh(), calc_view_normal_factor(), calc_view_occlusion_factor(), CD_PROP_INT32, CustomData_get_offset_named(), depsgraph, blender::ed::sculpt_paint::auto_mask::Cache::factor, SculptSession::filter_cache, blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::auto_mask::Settings::initial_face_set, blender::ed::sculpt_paint::auto_mask::Settings::initial_island_nr, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::ed::sculpt_paint::orig_position_data_gather_bmesh(), blender::ed::sculpt_paint::StrokeCache::paint_face_set, BMesh::pdata, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::auto_mask::Settings::topology_use_brush_limit, blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::face_set::vert_has_face_set(), blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), blender::ed::sculpt_paint::islands::vert_id_get(), blender::ed::sculpt_paint::boundary::vert_is_boundary(), and verts.
| void blender::ed::sculpt_paint::auto_mask::calc_vert_factors | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const Cache & | cache, | ||
| const bke::pbvh::MeshNode & | node, | ||
| Span< int > | verts, | ||
| MutableSpan< float > | factors ) |
Calculate all auto-masking influence on each vertex.
Definition at line 640 of file sculpt_automasking.cc.
References SculptVertexInfo::boundary, blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, BRUSH_AUTOMASKING_VIEW_NORMAL, BRUSH_AUTOMASKING_VIEW_OCCLUSION, SculptSession::cache, calc_brush_normal_factor(), calc_cavity_factor_mesh(), calc_view_normal_factor(), calc_view_occlusion_factor(), depsgraph, blender::bke::Face, blender::ed::sculpt_paint::auto_mask::Cache::factor, SculptSession::filter_cache, blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::auto_mask::Settings::initial_face_set, blender::ed::sculpt_paint::auto_mask::Settings::initial_island_nr, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::ed::sculpt_paint::orig_position_data_lookup_mesh(), blender::ed::sculpt_paint::StrokeCache::paint_face_set, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::auto_mask::Settings::topology_use_brush_limit, blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::face_set::vert_has_face_set(), blender::ed::sculpt_paint::face_set::vert_has_unique_face_set(), blender::ed::sculpt_paint::islands::vert_id_get(), blender::ed::sculpt_paint::boundary::vert_is_boundary(), blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), SculptSession::vertex_info, and verts.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), calc_vert_factors(), calc_vert_factors(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::sample_node_surface_bmesh(), and blender::ed::sculpt_paint::sample_node_surface_mesh().
|
inline |
Definition at line 152 of file sculpt_automask.hh.
References calc_vert_factors(), depsgraph, and verts.
|
inline |
Definition at line 118 of file sculpt_automask.hh.
References calc_vert_factors(), depsgraph, and verts.
|
static |
Definition at line 227 of file sculpt_automasking.cc.
References SculptSession::cache, SculptSession::filter_cache, M_PI, normal_calc(), blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::filter::Cache::view_normal, blender::ed::sculpt_paint::auto_mask::Settings::view_normal_falloff, blender::ed::sculpt_paint::auto_mask::Settings::view_normal_limit, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_face_factors(), calc_grids_factors(), calc_vert_factors(), calc_vert_factors(), and normal_occlusion_automasking_fill().
|
static |
Definition at line 249 of file sculpt_automasking.cc.
References depsgraph, blender::ed::sculpt_paint::auto_mask::Cache::Occluded, blender::ed::sculpt_paint::auto_mask::Cache::occlusion, SCULPT_vertex_is_occluded(), blender::ed::sculpt_paint::auto_mask::Cache::Unknown, and blender::ed::sculpt_paint::auto_mask::Cache::Visible.
Referenced by calc_face_factors(), calc_grids_factors(), calc_vert_factors(), calc_vert_factors(), and normal_occlusion_automasking_fill().
|
static |
Definition at line 1213 of file sculpt_automasking.cc.
References SculptSession::bm, blender::bke::pbvh::BMesh, depsgraph, fill_topology_automasking_factors_bmesh(), fill_topology_automasking_factors_grids(), fill_topology_automasking_factors_mesh(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), Object::sculpt, SculptSession::subdiv_ccg, and blender::bke::pbvh::vert_positions_eval().
Referenced by cache_init().
|
static |
Definition at line 1177 of file sculpt_automasking.cc.
References SculptSession::active_vert(), blender::ed::sculpt_paint::flood_fill::FillDataBMesh::add_initial(), BKE_paint_brush_for_read(), bm, SculptSession::bm, BM_elem_index_get, BM_mesh_elem_count(), BM_VERT, SculptSession::cache, BMVert::co, blender::ed::sculpt_paint::flood_fill::FillDataBMesh::execute(), blender::ed::sculpt_paint::find_symm_verts_bmesh(), is_constrained_by_radius(), Sculpt::paint, blender::ed::sculpt_paint::StrokeCache::radius, Object::sculpt, SCULPT_is_vertex_inside_brush_radius_symm(), and SCULPT_mesh_symmetry_xyz_get().
Referenced by fill_topology_automasking_factors().
|
static |
Definition at line 1134 of file sculpt_automasking.cc.
References SculptSession::active_vert_index(), blender::ed::sculpt_paint::flood_fill::FillDataGrids::add_initial(), BKE_paint_brush_for_read(), BKE_subdiv_ccg_key_top_level(), SculptSession::cache, blender::ed::sculpt_paint::flood_fill::FillDataGrids::execute(), blender::ed::sculpt_paint::find_symm_verts_grids(), is_constrained_by_radius(), Sculpt::paint, SubdivCCG::positions, blender::ed::sculpt_paint::StrokeCache::radius, Object::sculpt, SCULPT_is_vertex_inside_brush_radius_symm(), SCULPT_mesh_symmetry_xyz_get(), and SubdivCCGCoord::to_index().
Referenced by fill_topology_automasking_factors().
|
static |
Definition at line 1095 of file sculpt_automasking.cc.
References SculptSession::active_vert(), blender::ed::sculpt_paint::flood_fill::FillDataMesh::add_initial(), BKE_paint_brush_for_read(), SculptSession::cache, Object::data, depsgraph, blender::ed::sculpt_paint::flood_fill::FillDataMesh::execute(), blender::ed::sculpt_paint::find_symm_verts_mesh(), is_constrained_by_radius(), Sculpt::paint, blender::ed::sculpt_paint::StrokeCache::radius, Object::sculpt, SCULPT_is_vertex_inside_brush_radius_symm(), SCULPT_mesh_symmetry_xyz_get(), and blender::Span< T >::size().
Referenced by fill_topology_automasking_factors().
|
static |
Definition at line 1505 of file sculpt_automasking.cc.
References depsgraph, init_boundary_masking(), init_boundary_masking_bmesh(), init_boundary_masking_grids(), and init_boundary_masking_mesh().
Referenced by cache_init(), and init_boundary_masking().
|
static |
Definition at line 1447 of file sculpt_automasking.cc.
References bm, SculptSession::bm, BM_elem_index_get, BM_mesh_elem_count(), BM_VERT, BM_vert_at_index(), CD_PROP_INT32, CustomData_get_offset_named(), EDGE_DISTANCE_INF, float, init_boundary_masking_bmesh(), BMesh::pdata, pow2f(), and blender::ed::sculpt_paint::vert_neighbors_get_bmesh().
Referenced by init_boundary_masking(), and init_boundary_masking_bmesh().
|
static |
Definition at line 1377 of file sculpt_automasking.cc.
References BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), SculptVertexInfo::boundary, SubdivCCGNeighbors::coords, EDGE_DISTANCE_INF, float, SubdivCCGCoord::from_index(), init_boundary_masking_grids(), SubdivCCG::positions, pow2f(), SculptSession::subdiv_ccg, and SculptSession::vertex_info.
Referenced by init_boundary_masking(), and init_boundary_masking_grids().
|
static |
Definition at line 1314 of file sculpt_automasking.cc.
References SculptVertexInfo::boundary, depsgraph, EDGE_DISTANCE_INF, float, init_boundary_masking_mesh(), pow2f(), blender::Span< T >::size(), blender::ed::sculpt_paint::vert_neighbors_get_mesh(), and SculptSession::vertex_info.
Referenced by init_boundary_masking(), and init_boundary_masking_mesh().
|
static |
Definition at line 1236 of file sculpt_automasking.cc.
References blender::ed::sculpt_paint::face_set::active_face_set_get(), Geometry::attributes, BKE_paint_brush_for_read(), Object::data, blender::bke::Face, SubdivCCG::grid_area, blender::bke::pbvh::Grids, blender::Span< T >::is_empty(), is_enabled(), blender::bke::pbvh::Mesh, Sculpt::paint, blender::threading::parallel_for(), blender::bke::object::pbvh_get(), Object::sculpt, and SculptSession::subdiv_ccg.
Referenced by cache_init().
|
static |
Definition at line 154 of file sculpt_automasking.cc.
References ELEM, Brush::falloff_shape, PAINT_FALLOFF_SHAPE_TUBE, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_ROTATE, and SCULPT_BRUSH_TYPE_THUMB.
Referenced by cache_init(), fill_topology_automasking_factors_bmesh(), fill_topology_automasking_factors_grids(), fill_topology_automasking_factors_mesh(), and needs_factors_cache().
| bool blender::ed::sculpt_paint::auto_mask::is_enabled | ( | const Sculpt & | sd, |
| const Object & | object, | ||
| const Brush * | br ) |
Definition at line 71 of file sculpt_automasking.cc.
References BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, BRUSH_AUTOMASKING_VIEW_NORMAL, mode_enabled(), and blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo().
Referenced by cache_init(), blender::ed::sculpt_paint::do_brush_action(), init_face_sets_masking(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), and blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start().
| bool blender::ed::sculpt_paint::auto_mask::mode_enabled | ( | const Sculpt & | sd, |
| const Brush * | br, | ||
| eAutomasking_flag | mode ) |
Definition at line 60 of file sculpt_automasking.cc.
References Brush::automasking_flags, and Sculpt::automasking_flags.
Referenced by cache_init(), and is_enabled().
|
static |
Definition at line 186 of file sculpt_automasking.cc.
References Brush::automasking_boundary_edges_propagation_steps, boundary_propagation_steps(), BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, BRUSH_AUTOMASKING_VIEW_NORMAL, calc_effective_bits(), and is_constrained_by_radius().
Referenced by cache_init().
| bool blender::ed::sculpt_paint::auto_mask::needs_normal | ( | const SculptSession & | ss, |
| const Sculpt & | sd, | ||
| const Brush * | brush ) |
Definition at line 123 of file sculpt_automasking.cc.
References BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_VIEW_NORMAL, and calc_effective_bits().
Referenced by blender::ed::sculpt_paint::sculpt_brush_needs_normal().
|
static |
Definition at line 130 of file sculpt_automasking.cc.
References blender::math::dot(), and blender::math::safe_acos().
Referenced by calc_brush_normal_factor(), and calc_view_normal_factor().
|
static |
Definition at line 1563 of file sculpt_automasking.cc.
References bm, SculptSession::bm, BRUSH_AUTOMASKING_VIEW_NORMAL, BRUSH_AUTOMASKING_VIEW_OCCLUSION, calc_view_normal_factor(), calc_view_occlusion_factor(), depsgraph, normal_occlusion_automasking_fill(), SubdivCCG::normals, SubdivCCG::positions, range, Object::sculpt, SCULPT_vertex_count_get(), SculptSession::subdiv_ccg, BMesh::totvert, and blender::bke::pbvh::vert_normals_eval().
Referenced by cache_init(), and normal_occlusion_automasking_fill().
|
static |
Definition at line 583 of file sculpt_automasking.cc.
References BKE_curvemapping_evaluateF(), BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_CAVITY_INVERTED, BRUSH_AUTOMASKING_CAVITY_USE_CURVE, blender::ed::sculpt_paint::auto_mask::Settings::cavity_curve, blender::ed::sculpt_paint::auto_mask::Settings::flags, and blender::ed::sculpt_paint::auto_mask::Cache::settings.
Referenced by calc_cavity_factor_bmesh(), calc_cavity_factor_grids(), and calc_cavity_factor_mesh().
|
staticconstexpr |
Definition at line 1307 of file sculpt_automasking.cc.
Referenced by init_boundary_masking_bmesh(), init_boundary_masking_grids(), and init_boundary_masking_mesh().