|
Blender V4.3
|
Classes | |
| struct | FilterLocalData |
| struct | LocalData |
| struct | MaskOperation |
Enumerations | |
| enum class | FilterType { Smooth = 0 , Sharpen = 1 , Grow = 2 , Shrink = 3 , ContrastIncrease = 5 , ContrastDecrease = 6 } |
| enum class | InitMode { Random , FaceSet , Island } |
Functions | |
| void | write_mask_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, FunctionRef< void(MutableSpan< float >, Span< int >)> write_fn) |
| static BLI_NOINLINE void | copy_old_hidden_mask_mesh (const Span< int > verts, const Span< bool > hide_vert, const Span< float > mask, const MutableSpan< float > new_mask) |
| static BLI_NOINLINE void | multiply_add (const Span< float > src, const float factor, const float offset, const MutableSpan< float > dst) |
| static BLI_NOINLINE void | mask_increase_contrast (const Span< float > src, const MutableSpan< float > dst) |
| static BLI_NOINLINE void | mask_decrease_contrast (const Span< float > src, const MutableSpan< float > dst) |
| static BLI_NOINLINE void | sharpen_masks (const Span< float > old_masks, const MutableSpan< float > new_mask) |
| static void | apply_new_mask_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const OffsetIndices< int > node_verts, const Span< float > new_mask, MutableSpan< float > mask) |
| static void | smooth_mask_mesh (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< bool > hide_poly, const Span< bool > hide_vert, const Span< float > mask, const bke::pbvh::MeshNode &node, FilterLocalData &tls, MutableSpan< float > new_mask) |
| static void | sharpen_mask_mesh (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< bool > hide_poly, const Span< bool > hide_vert, const Span< float > mask, const bke::pbvh::MeshNode &node, FilterLocalData &tls, MutableSpan< float > new_mask) |
| static void | grow_mask_mesh (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< bool > hide_poly, const Span< bool > hide_vert, const Span< float > mask, const bke::pbvh::MeshNode &node, FilterLocalData &tls, MutableSpan< float > new_mask) |
| static void | shrink_mask_mesh (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< bool > hide_poly, const Span< bool > hide_vert, const Span< float > mask, const bke::pbvh::MeshNode &node, FilterLocalData &tls, MutableSpan< float > new_mask) |
| static bool | increase_contrast_mask_mesh (const Depsgraph &depsgraph, const Object &object, const Span< bool > hide_vert, bke::pbvh::MeshNode &node, FilterLocalData &tls, MutableSpan< float > mask) |
| static bool | decrease_contrast_mask_mesh (const Depsgraph &depsgraph, const Object &object, const Span< bool > hide_vert, bke::pbvh::MeshNode &node, FilterLocalData &tls, MutableSpan< float > mask) |
| static BLI_NOINLINE void | copy_old_hidden_mask_grids (const SubdivCCG &subdiv_ccg, const Span< int > grids, const MutableSpan< float > new_mask) |
| static void | apply_new_mask_grids (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const OffsetIndices< int > node_verts, const Span< float > new_mask) |
| static void | smooth_mask_grids (const SubdivCCG &subdiv_ccg, const bke::pbvh::GridsNode &node, MutableSpan< float > new_mask) |
| static void | sharpen_mask_grids (const SubdivCCG &subdiv_ccg, const bke::pbvh::GridsNode &node, FilterLocalData &tls, MutableSpan< float > new_mask) |
| static void | grow_mask_grids (const SubdivCCG &subdiv_ccg, const bke::pbvh::GridsNode &node, MutableSpan< float > new_mask) |
| static void | shrink_mask_grids (const SubdivCCG &subdiv_ccg, const bke::pbvh::GridsNode &node, MutableSpan< float > new_mask) |
| static bool | increase_contrast_mask_grids (const Depsgraph &depsgraph, const Object &object, bke::pbvh::GridsNode &node, FilterLocalData &tls) |
| static bool | decrease_contrast_mask_grids (const Depsgraph &depsgraph, const Object &object, bke::pbvh::GridsNode &node, FilterLocalData &tls) |
| static BLI_NOINLINE void | copy_old_hidden_mask_bmesh (const int mask_offset, const Set< BMVert *, 0 > &verts, const MutableSpan< float > new_mask) |
| static void | apply_new_mask_bmesh (const Depsgraph &depsgraph, Object &object, const int mask_offset, const IndexMask &node_mask, const OffsetIndices< int > node_verts, const Span< float > new_mask) |
| static void | smooth_mask_bmesh (const int mask_offset, bke::pbvh::BMeshNode &node, MutableSpan< float > new_mask) |
| static void | sharpen_mask_bmesh (const BMesh &bm, const int mask_offset, bke::pbvh::BMeshNode &node, FilterLocalData &tls, MutableSpan< float > new_mask) |
| static void | grow_mask_bmesh (const int mask_offset, bke::pbvh::BMeshNode &node, MutableSpan< float > new_mask) |
| static void | shrink_mask_bmesh (const int mask_offset, bke::pbvh::BMeshNode &node, MutableSpan< float > new_mask) |
| static bool | increase_contrast_mask_bmesh (const Depsgraph &depsgraph, Object &object, const int mask_offset, bke::pbvh::BMeshNode &node, FilterLocalData &tls) |
| static bool | decrease_contrast_mask_bmesh (const Depsgraph &depsgraph, Object &object, const int mask_offset, bke::pbvh::BMeshNode &node, FilterLocalData &tls) |
| static int | sculpt_mask_filter_exec (bContext *C, wmOperator *op) |
| void | SCULPT_OT_mask_filter (wmOperatorType *ot) |
| void | SCULPT_OT_mask_init (wmOperatorType *ot) |
| static void | init_mask_grids (Main &bmain, Scene &scene, Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, FunctionRef< void(const BitGroupVector<> &, int, MutableSpan< float >)> write_fn) |
| static int | sculpt_mask_init_exec (bContext *C, wmOperator *op) |
Public API | |
| Array< float > | duplicate_mask (const Object &object) |
| void | mix_new_masks (const Span< float > new_masks, const Span< float > factors, const MutableSpan< float > masks) |
| void | clamp_mask (const MutableSpan< float > masks) |
| void | invert_mask (const MutableSpan< float > masks) |
| void | gather_mask_bmesh (const BMesh &bm, const Set< BMVert *, 0 > &verts, const MutableSpan< float > r_mask) |
| void | gather_mask_grids (const SubdivCCG &subdiv_ccg, const Span< int > grids, const MutableSpan< float > r_mask) |
| void | scatter_mask_grids (const Span< float > mask, SubdivCCG &subdiv_ccg, const Span< int > grids) |
| void | scatter_mask_bmesh (const Span< float > mask, const BMesh &bm, const Set< BMVert *, 0 > &verts) |
| static float | average_masks (const int mask_offset, const Span< const BMVert * > verts) |
| void | average_neighbor_mask_bmesh (const int mask_offset, const Set< BMVert *, 0 > &verts, const MutableSpan< float > new_masks) |
| void | update_mask_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, FunctionRef< void(MutableSpan< float >, Span< int >)> update_fn) |
| bool | mask_equals_array_grids (const Span< float > masks, const CCGKey &key, const Span< int > grids, const Span< float > values) |
| bool | mask_equals_array_bmesh (const int mask_offset, const Set< BMVert *, 0 > &verts, const Span< float > values) |
Gesture-based Mask Operators | |
Operators that act upon a user-selected area. | |
| static void | gesture_begin (bContext &C, wmOperator &op, gesture::GestureData &gesture_data) |
| static float | mask_gesture_get_new_value (const float elem, FloodFillMode mode, float value) |
| static void | gesture_apply_for_symmetry_pass (bContext &, gesture::GestureData &gesture_data) |
| static void | gesture_end (bContext &C, gesture::GestureData &gesture_data) |
| static void | init_operation (bContext &C, gesture::GestureData &gesture_data, wmOperator &op) |
| static void | gesture_operator_properties (wmOperatorType *ot) |
| static int | gesture_box_exec (bContext *C, wmOperator *op) |
| static int | gesture_lasso_exec (bContext *C, wmOperator *op) |
| static int | gesture_line_exec (bContext *C, wmOperator *op) |
| static int | gesture_polyline_exec (bContext *C, wmOperator *op) |
| void | PAINT_OT_mask_lasso_gesture (wmOperatorType *ot) |
| void | PAINT_OT_mask_box_gesture (wmOperatorType *ot) |
| void | PAINT_OT_mask_line_gesture (wmOperatorType *ot) |
| void | PAINT_OT_mask_polyline_gesture (wmOperatorType *ot) |
Mask By Color | |
| static float | color_delta_get (const float3 &color_a, const float3 &color_b, const float threshold, const bool invert) |
| static float | final_mask_get (const float current_mask, const float new_mask, const bool invert, const bool preserve_mask) |
| static void | mask_by_color_contiguous_mesh (const Depsgraph &depsgraph, Object &object, const int vert, const float threshold, const bool invert, const bool preserve_mask) |
| static void | mask_by_color_full_mesh (const Depsgraph &depsgraph, Object &object, const int vert, const float threshold, const bool invert, const bool preserve_mask) |
| static int | mask_by_color_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | SCULPT_OT_mask_by_color (wmOperatorType *ot) |
Global Mask Operators | |
Operators that act upon the entirety of a given object's mesh. | |
| enum class | FloodFillMode { Value = SEL_OP_SUB , InverseValue = SEL_OP_ADD , InverseMeshValue = SEL_OP_XOR } |
| static const EnumPropertyItem | mode_items [] |
| static Span< int > | get_hidden_verts (const bke::pbvh::MeshNode &node, const Span< bool > hide_vert, Vector< int > &indices) |
| static bool | try_remove_mask_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask) |
| static void | fill_mask_mesh (const Depsgraph &depsgraph, Object &object, const float value, const IndexMask &node_mask) |
| static void | fill_mask_grids (Main &bmain, const Scene &scene, Depsgraph &depsgraph, Object &object, const float value, const IndexMask &node_mask) |
| static void | fill_mask_bmesh (const Depsgraph &depsgraph, Object &object, const float value, const IndexMask &node_mask) |
| static void | fill_mask (Main &bmain, const Scene &scene, Depsgraph &depsgraph, Object &object, const float value) |
| static void | invert_mask_grids (Main &bmain, const Scene &scene, Depsgraph &depsgraph, Object &object, const IndexMask &node_mask) |
| static void | invert_mask_bmesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask) |
| static void | invert_mask (Main &bmain, const Scene &scene, Depsgraph &depsgraph, Object &object) |
| static int | mask_flood_fill_exec (bContext *C, wmOperator *op) |
| void | PAINT_OT_mask_flood_fill (wmOperatorType *ot) |
Mask from Cavity | |
| enum class | ApplyMaskMode : int8_t { Mix , Multiply , Divide , Add , Subtract } |
| enum class | MaskSettingsSource : int8_t { Operator , Scene , Brush } |
| enum class | MaskBoundaryMode : int8_t { Mesh , FaceSets } |
| static EnumPropertyItem | mix_modes [] |
| static EnumPropertyItem | settings_sources [] |
| static void | calc_new_masks (const ApplyMaskMode mode, const Span< float > node_mask, const MutableSpan< float > new_mask) |
| static void | apply_mask_mesh (const Depsgraph &depsgraph, const Object &object, const Span< bool > hide_vert, const auto_mask::Cache &automasking, const ApplyMaskMode mode, const float factor, const bool invert_automask, const bke::pbvh::MeshNode &node, LocalData &tls, const MutableSpan< float > mask) |
| static void | apply_mask_grids (const Depsgraph &depsgraph, Object &object, const auto_mask::Cache &automasking, const ApplyMaskMode mode, const float factor, const bool invert_automask, const bke::pbvh::GridsNode &node, LocalData &tls) |
| static void | apply_mask_bmesh (const Depsgraph &depsgraph, Object &object, const auto_mask::Cache &automasking, const ApplyMaskMode mode, const float factor, const float invert_automask, bke::pbvh::BMeshNode &node, LocalData &tls) |
| static void | apply_mask_from_settings (const Depsgraph &depsgraph, Object &object, bke::pbvh::Tree &pbvh, const IndexMask &node_mask, const auto_mask::Cache &automasking, const ApplyMaskMode mode, const float factor, const bool invert_automask) |
| static int | mask_from_cavity_exec (bContext *C, wmOperator *op) |
| static void | mask_from_cavity_ui (bContext *C, wmOperator *op) |
| static void | SCULPT_OT_mask_from_cavity (wmOperatorType *ot) |
| static int | mask_from_boundary_exec (bContext *C, wmOperator *op) |
| static void | mask_from_boundary_ui (bContext *C, wmOperator *op) |
| static void | SCULPT_OT_mask_from_boundary (wmOperatorType *ot) |
|
strong |
| Enumerator | |
|---|---|
| Mix | |
| Multiply | |
| Divide | |
| Add | |
| Subtract | |
Definition at line 891 of file sculpt_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| Smooth | |
| Sharpen | |
| Grow | |
| Shrink | |
| ContrastIncrease | |
| ContrastDecrease | |
Definition at line 40 of file sculpt_filter_mask.cc.
|
strong |
| Enumerator | |
|---|---|
| Value | |
| InverseValue | |
| InverseMeshValue | |
Definition at line 281 of file paint_mask.cc.
|
strong |
| Enumerator | |
|---|---|
| Random | |
| FaceSet | |
| Island | |
Definition at line 45 of file sculpt_mask_init.cc.
|
strong |
| Enumerator | |
|---|---|
| Mesh | |
| FaceSets | |
Definition at line 1324 of file sculpt_ops.cc.
|
strong |
| Enumerator | |
|---|---|
| Operator | |
| Scene | |
| Brush | |
Definition at line 908 of file sculpt_ops.cc.
|
static |
Definition at line 1034 of file sculpt_ops.cc.
References blender::MutableSpan< T >::as_span(), BKE_pbvh_bmesh_node_unique_verts(), SculptSession::bm, calc_new_masks(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, blender::ed::sculpt_paint::mask::LocalData::factors, blender::MutableSpan< T >::fill(), blender::ed::sculpt_paint::fill_factor_from_hide(), gather_mask_bmesh(), invert_mask(), blender::ed::sculpt_paint::mask::LocalData::mask, mix_new_masks(), blender::ed::sculpt_paint::mask::LocalData::new_mask, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), scatter_mask_bmesh(), and verts.
Referenced by apply_mask_from_settings().
|
static |
Definition at line 1070 of file sculpt_ops.cc.
References apply_mask_bmesh(), apply_mask_grids(), apply_mask_mesh(), BKE_subdiv_ccg_key_top_level(), blender::bke::pbvh::BMesh, CD_PROP_FLOAT, CustomData_get_offset_named(), depsgraph, blender::index_mask::IndexMask::foreach_index(), blender::bke::pbvh::Grids, blender::threading::EnumerableThreadSpecific< T >::local(), SubdivCCG::masks, blender::bke::pbvh::Mesh, blender::bke::pbvh::node_update_mask_bmesh(), blender::bke::pbvh::node_update_mask_grids(), blender::bke::pbvh::node_update_mask_mesh(), blender::bke::pbvh::Tree::nodes(), blender::bke::Point, and blender::bke::pbvh::Tree::type().
Referenced by mask_from_boundary_exec(), and mask_from_cavity_exec().
|
static |
Definition at line 994 of file sculpt_ops.cc.
References blender::MutableSpan< T >::as_span(), BKE_subdiv_ccg_key_top_level(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), calc_new_masks(), depsgraph, blender::ed::sculpt_paint::mask::LocalData::factors, blender::MutableSpan< T >::fill(), blender::ed::sculpt_paint::fill_factor_from_hide(), gather_mask_grids(), CCGKey::grid_area, invert_mask(), blender::ed::sculpt_paint::mask::LocalData::mask, mix_new_masks(), blender::ed::sculpt_paint::mask::LocalData::new_mask, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), scatter_mask_grids(), blender::Span< T >::size(), and SculptSession::subdiv_ccg.
Referenced by apply_mask_from_settings().
|
static |
Definition at line 957 of file sculpt_ops.cc.
References blender::MutableSpan< T >::as_span(), calc_new_masks(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, blender::ed::sculpt_paint::mask::LocalData::factors, blender::MutableSpan< T >::fill(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::gather_data_mesh(), invert_mask(), blender::ed::sculpt_paint::mask::LocalData::mask, mix_new_masks(), blender::ed::sculpt_paint::mask::LocalData::new_mask, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scatter_data_mesh(), and verts.
Referenced by apply_mask_from_settings().
|
static |
Definition at line 528 of file sculpt_filter_mask.cc.
References BKE_pbvh_bmesh_node_unique_verts(), bm, SculptSession::bm, depsgraph, blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::from_bools(), blender::ed::sculpt_paint::undo::Mask, mask_equals_array_bmesh(), blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::node_update_mask_bmesh(), blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), pos, blender::ed::sculpt_paint::undo::push_node(), scatter_mask_bmesh(), blender::Span< T >::slice(), blender::bke::pbvh::Tree::tag_masks_changed(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 321 of file sculpt_filter_mask.cc.
References BKE_subdiv_ccg_average_grids(), BKE_subdiv_ccg_key_top_level(), depsgraph, blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::from_bools(), blender::ed::sculpt_paint::undo::Mask, mask_equals_array_grids(), blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::node_update_mask_grids(), blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), pos, blender::ed::sculpt_paint::undo::push_node(), blender::ed::sculpt_paint::scatter_data_grids(), blender::Span< T >::slice(), SculptSession::subdiv_ccg, and blender::bke::pbvh::Tree::tag_masks_changed().
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 127 of file sculpt_filter_mask.cc.
References depsgraph, blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::from_bools(), blender::array_utils::indexed_data_equal(), blender::ed::sculpt_paint::undo::Mask, blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::node_update_mask_mesh(), blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), pos, blender::ed::sculpt_paint::undo::push_node(), blender::ed::sculpt_paint::scatter_data_mesh(), blender::Span< T >::slice(), blender::bke::pbvh::Tree::tag_masks_changed(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 169 of file paint_mask.cc.
References BM_ELEM_CD_GET_FLOAT, float, sum(), and verts.
Referenced by average_neighbor_mask_bmesh().
| void blender::ed::sculpt_paint::mask::average_neighbor_mask_bmesh | ( | const int | mask_offset, |
| const Set< BMVert *, 0 > & | verts, | ||
| const MutableSpan< float > | new_masks ) |
Definition at line 178 of file paint_mask.cc.
References average_masks(), blender::ed::sculpt_paint::vert_neighbors_get_bmesh(), and verts.
Referenced by sharpen_mask_bmesh(), and smooth_mask_bmesh().
|
static |
Definition at line 926 of file sculpt_ops.cc.
References Add, clamp_mask(), Divide, blender::Span< T >::index_range(), Mix, Multiply, and Subtract.
Referenced by apply_mask_bmesh(), apply_mask_grids(), and apply_mask_mesh().
| void blender::ed::sculpt_paint::mask::clamp_mask | ( | const MutableSpan< float > | masks | ) |
Definition at line 110 of file paint_mask.cc.
Referenced by calc_new_masks(), mask_decrease_contrast(), mask_increase_contrast(), and sharpen_masks().
|
static |
Definition at line 686 of file sculpt_ops.cc.
References blender::math::distance(), invert(), len, MASK_BY_COLOR_SLOPE, and blender::math::numbers::sqrt3_v.
Referenced by mask_by_color_contiguous_mesh(), and mask_by_color_full_mesh().
|
static |
Definition at line 515 of file sculpt_filter_mask.cc.
References BM_ELEM_CD_GET_FLOAT, BM_elem_flag_test, BM_ELEM_HIDDEN, and verts.
Referenced by decrease_contrast_mask_bmesh(), grow_mask_bmesh(), increase_contrast_mask_bmesh(), sharpen_mask_bmesh(), shrink_mask_bmesh(), and smooth_mask_bmesh().
|
static |
Definition at line 303 of file sculpt_filter_mask.cc.
References BKE_subdiv_ccg_key_top_level(), blender::bits::foreach_1_index(), SubdivCCG::grid_hidden, blender::bke::ccg::grid_range(), blender::Span< T >::index_range(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), SubdivCCG::masks, blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by decrease_contrast_mask_grids(), grow_mask_grids(), increase_contrast_mask_grids(), sharpen_mask_grids(), shrink_mask_grids(), and smooth_mask_grids().
|
static |
Definition at line 49 of file sculpt_filter_mask.cc.
References BLI_assert, blender::Span< T >::is_empty(), blender::MutableSpan< T >::size(), and verts.
Referenced by decrease_contrast_mask_mesh(), grow_mask_mesh(), increase_contrast_mask_mesh(), sharpen_mask_mesh(), shrink_mask_mesh(), and smooth_mask_mesh().
|
static |
Definition at line 655 of file sculpt_filter_mask.cc.
References blender::MutableSpan< T >::as_span(), BKE_pbvh_bmesh_node_unique_verts(), bm, SculptSession::bm, copy_old_hidden_mask_bmesh(), depsgraph, gather_mask_bmesh(), blender::ed::sculpt_paint::undo::Mask, mask_decrease_contrast(), blender::ed::sculpt_paint::mask::FilterLocalData::new_mask, blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::bke::pbvh::node_update_mask_bmesh(), blender::ed::sculpt_paint::undo::push_node(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), scatter_mask_bmesh(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 483 of file sculpt_filter_mask.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::MutableSpan< T >::as_span(), BKE_subdiv_ccg_key_top_level(), copy_old_hidden_mask_grids(), depsgraph, blender::ed::sculpt_paint::gather_data_grids(), CCGKey::grid_area, blender::ed::sculpt_paint::undo::Mask, mask_decrease_contrast(), SubdivCCG::masks, blender::ed::sculpt_paint::mask::FilterLocalData::new_mask, blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::bke::pbvh::node_update_mask_grids(), blender::ed::sculpt_paint::undo::push_node(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scatter_data_grids(), blender::Span< T >::size(), and SculptSession::subdiv_ccg.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 277 of file sculpt_filter_mask.cc.
References blender::MutableSpan< T >::as_span(), copy_old_hidden_mask_mesh(), depsgraph, blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::undo::Mask, mask_decrease_contrast(), blender::ed::sculpt_paint::mask::FilterLocalData::new_mask, blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::bke::pbvh::node_update_mask_mesh(), blender::ed::sculpt_paint::hide::node_visible_verts(), blender::ed::sculpt_paint::undo::push_node(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scatter_data_mesh(), verts, and blender::ed::sculpt_paint::mask::FilterLocalData::visible_verts.
Referenced by sculpt_mask_filter_exec().
Definition at line 58 of file paint_mask.cc.
References BLI_assert_unreachable, bm, SculptSession::bm, BM_ELEM_CD_GET_FLOAT, BM_mesh_elem_table_ensure(), BM_VERT, BM_vert_at_index(), blender::bke::pbvh::BMesh, CD_PROP_FLOAT, CustomData_get_offset_named(), blender::bke::pbvh::Grids, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), SubdivCCG::masks, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), blender::bke::Point, SubdivCCG::positions, result, SculptSession::subdiv_ccg, BMesh::totvert, and BMesh::vdata.
|
static |
Definition at line 544 of file paint_mask.cc.
References depsgraph, fill_mask(), fill_mask_bmesh(), fill_mask_grids(), fill_mask_mesh(), and blender::bke::pbvh::Tree::type().
Referenced by fill_mask(), and mask_flood_fill_exec().
|
static |
Definition at line 494 of file paint_mask.cc.
References BKE_pbvh_bmesh_node_unique_verts(), BKE_pbvh_node_fully_masked_set(), BKE_pbvh_node_fully_unmasked_set(), BLI_assert_unreachable, bm, SculptSession::bm, BM_ELEM_CD_GET_FLOAT, BM_ELEM_CD_SET_FLOAT, BM_elem_flag_test, BM_ELEM_HIDDEN, CD_PROP_FLOAT, CustomData_get_offset_named(), depsgraph, fill_mask_bmesh(), blender::index_mask::IndexMask::foreach_index(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::Tree::nodes(), blender::bke::pbvh::Tree::tag_masks_changed(), and BMesh::vdata.
Referenced by fill_mask(), and fill_mask_bmesh().
|
static |
Definition at line 427 of file paint_mask.cc.
References blender::Span< T >::begin(), BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BKE_subdiv_ccg_key_top_level(), depsgraph, blender::Span< T >::end(), fill_mask_grids(), blender::index_mask::IndexMask::foreach_index(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), SubdivCCG::masks, blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::Tree::nodes(), blender::MutableSpan< T >::slice(), and SculptSession::subdiv_ccg.
Referenced by fill_mask(), and fill_mask_grids().
|
static |
Definition at line 382 of file paint_mask.cc.
References BKE_pbvh_node_fully_masked_set(), BKE_pbvh_node_fully_unmasked_set(), depsgraph, fill_mask_mesh(), blender::index_mask::IndexMask::foreach_index(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::Tree::nodes(), blender::bke::pbvh::Tree::tag_masks_changed(), try_remove_mask_mesh(), and verts.
Referenced by fill_mask(), and fill_mask_mesh().
|
static |
Definition at line 711 of file sculpt_ops.cc.
References invert().
Referenced by mask_by_color_contiguous_mesh(), and mask_by_color_full_mesh().
| void blender::ed::sculpt_paint::mask::gather_mask_bmesh | ( | const BMesh & | bm, |
| const Set< BMVert *, 0 > & | verts, | ||
| const MutableSpan< float > | r_mask ) |
Definition at line 124 of file paint_mask.cc.
References BLI_assert, bm, BM_ELEM_CD_GET_FLOAT, CD_PROP_FLOAT, CustomData_get_offset_named(), blender::MutableSpan< T >::size(), BMesh::vdata, and verts.
Referenced by apply_mask_bmesh(), decrease_contrast_mask_bmesh(), increase_contrast_mask_bmesh(), and sharpen_mask_bmesh().
| void blender::ed::sculpt_paint::mask::gather_mask_grids | ( | const SubdivCCG & | subdiv_ccg, |
| const Span< int > | grids, | ||
| const MutableSpan< float > | r_mask ) |
Definition at line 139 of file paint_mask.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::MutableSpan< T >::fill(), blender::ed::sculpt_paint::gather_data_grids(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), and SubdivCCG::masks.
Referenced by apply_mask_grids().
|
static |
Definition at line 748 of file paint_mask.cc.
References BKE_pbvh_bmesh_node_unique_verts(), BKE_subdiv_ccg_foreach_visible_grid_vert(), BKE_subdiv_ccg_key_top_level(), bm, SculptSession::bm, BM_ELEM_CD_GET_FLOAT, BM_ELEM_CD_SET_FLOAT, CD_PROP_FLOAT, CustomData_get_offset_named(), depsgraph, ViewContext::depsgraph, blender::index_mask::IndexMask::foreach_index(), gesture_apply_for_symmetry_pass(), CCGKey::grid_area, mask_gesture_get_new_value(), blender::index_mask::IndexMask::min_array_size(), blender::ed::sculpt_paint::mask::MaskOperation::mode, blender::ed::sculpt_paint::gesture::GestureData::node_mask, blender::bke::pbvh::Tree::nodes(), ViewContext::obact, blender::ed::sculpt_paint::gesture::GestureData::operation, blender::ed::sculpt_paint::gesture::GestureData::ss, SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::tag_masks_changed(), blender::ed::sculpt_paint::mask::MaskOperation::value, blender::ed::sculpt_paint::gesture::GestureData::vc, BMesh::vdata, and verts.
Referenced by gesture_apply_for_symmetry_pass(), and init_operation().
|
static |
Definition at line 726 of file paint_mask.cc.
References BKE_sculpt_update_object_for_edit(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, gesture_begin(), ViewContext::obact, and blender::ed::sculpt_paint::gesture::GestureData::vc.
Referenced by gesture_begin(), and init_operation().
|
static |
Definition at line 887 of file paint_mask.cc.
References gesture_box_exec(), init_operation(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by gesture_box_exec(), and PAINT_OT_mask_box_gesture().
|
static |
Definition at line 842 of file paint_mask.cc.
References CTX_data_depsgraph_pointer(), depsgraph, gesture_end(), MULTIRES_COORDS_MODIFIED, multires_mark_as_modified(), ViewContext::obact, and blender::ed::sculpt_paint::gesture::GestureData::vc.
Referenced by gesture_end(), and init_operation().
|
static |
Definition at line 898 of file paint_mask.cc.
References gesture_lasso_exec(), init_operation(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by gesture_lasso_exec(), and PAINT_OT_mask_lasso_gesture().
|
static |
Definition at line 909 of file paint_mask.cc.
References gesture_line_exec(), init_operation(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by gesture_line_exec(), and PAINT_OT_mask_line_gesture().
|
static |
Definition at line 872 of file paint_mask.cc.
References gesture_operator_properties(), mode_items, ot, RNA_def_enum(), RNA_def_float(), and wmOperatorType::srna.
Referenced by gesture_operator_properties(), PAINT_OT_mask_box_gesture(), PAINT_OT_mask_lasso_gesture(), PAINT_OT_mask_line_gesture(), and PAINT_OT_mask_polyline_gesture().
|
static |
Definition at line 920 of file paint_mask.cc.
References gesture_polyline_exec(), init_operation(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by gesture_polyline_exec(), and PAINT_OT_mask_polyline_gesture().
|
static |
Definition at line 301 of file paint_mask.cc.
References BKE_pbvh_node_fully_hidden_get(), indices, blender::Span< T >::is_empty(), and verts.
Referenced by try_remove_mask_mesh().
|
static |
Definition at line 586 of file sculpt_filter_mask.cc.
References BKE_pbvh_bmesh_node_unique_verts(), BM_ELEM_CD_GET_FLOAT, copy_old_hidden_mask_bmesh(), blender::ed::sculpt_paint::vert_neighbors_get_bmesh(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 385 of file sculpt_filter_mask.cc.
References BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), CCG_grid_xy_to_index(), SubdivCCGNeighbors::coords, copy_old_hidden_mask_grids(), blender::bke::ccg::grid_range(), CCGKey::grid_size, blender::Span< T >::index_range(), SubdivCCG::masks, blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), and x.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 201 of file sculpt_filter_mask.cc.
References blender::ed::sculpt_paint::calc_vert_neighbors(), copy_old_hidden_mask_mesh(), blender::ed::sculpt_paint::mask::FilterLocalData::vert_neighbors, and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 624 of file sculpt_filter_mask.cc.
References blender::MutableSpan< T >::as_span(), BKE_pbvh_bmesh_node_unique_verts(), bm, SculptSession::bm, copy_old_hidden_mask_bmesh(), depsgraph, gather_mask_bmesh(), blender::ed::sculpt_paint::undo::Mask, mask_increase_contrast(), blender::ed::sculpt_paint::mask::FilterLocalData::new_mask, blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::bke::pbvh::node_update_mask_bmesh(), blender::ed::sculpt_paint::undo::push_node(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), scatter_mask_bmesh(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 451 of file sculpt_filter_mask.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::MutableSpan< T >::as_span(), BKE_subdiv_ccg_key_top_level(), copy_old_hidden_mask_grids(), depsgraph, blender::ed::sculpt_paint::gather_data_grids(), CCGKey::grid_area, blender::ed::sculpt_paint::undo::Mask, mask_increase_contrast(), SubdivCCG::masks, blender::ed::sculpt_paint::mask::FilterLocalData::new_mask, blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::bke::pbvh::node_update_mask_grids(), blender::ed::sculpt_paint::undo::push_node(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scatter_data_grids(), blender::Span< T >::size(), and SculptSession::subdiv_ccg.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 251 of file sculpt_filter_mask.cc.
References blender::MutableSpan< T >::as_span(), copy_old_hidden_mask_mesh(), depsgraph, blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::undo::Mask, mask_increase_contrast(), blender::ed::sculpt_paint::mask::FilterLocalData::new_mask, blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::bke::pbvh::node_update_mask_mesh(), blender::ed::sculpt_paint::hide::node_visible_verts(), blender::ed::sculpt_paint::undo::push_node(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scatter_data_mesh(), verts, and blender::ed::sculpt_paint::mask::FilterLocalData::visible_verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 79 of file sculpt_mask_init.cc.
References BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BKE_subdiv_ccg_average_grids(), BKE_subdiv_ccg_key_top_level(), depsgraph, blender::index_mask::IndexMask::foreach_index(), blender::bke::ccg::grid_range(), blender::ed::sculpt_paint::undo::Mask, blender::bke::pbvh::node_update_mask_grids(), blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::undo::push_nodes(), SculptSession::subdiv_ccg, and blender::bke::pbvh::Tree::tag_masks_changed().
Referenced by sculpt_mask_init_exec().
|
static |
Definition at line 852 of file paint_mask.cc.
References blender::ed::sculpt_paint::gesture::Operation::apply_for_symmetry_pass, blender::ed::sculpt_paint::gesture::Operation::begin, BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), CTX_data_depsgraph_pointer(), CTX_data_main(), blender::ed::sculpt_paint::gesture::Operation::end, gesture_apply_for_symmetry_pass(), gesture_begin(), gesture_end(), init_operation(), blender::ed::sculpt_paint::mask::MaskOperation::mode, ViewContext::obact, blender::ed::sculpt_paint::mask::MaskOperation::op, blender::ed::sculpt_paint::gesture::GestureData::operation, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), ViewContext::scene, blender::ed::sculpt_paint::mask::MaskOperation::value, and blender::ed::sculpt_paint::gesture::GestureData::vc.
Referenced by gesture_box_exec(), gesture_lasso_exec(), gesture_line_exec(), gesture_polyline_exec(), and init_operation().
| void blender::ed::sculpt_paint::mask::invert_mask | ( | const MutableSpan< float > | masks | ) |
Definition at line 117 of file paint_mask.cc.
Referenced by apply_mask_bmesh(), apply_mask_grids(), apply_mask_mesh(), invert_mask(), and mask_flood_fill_exec().
|
static |
Definition at line 631 of file paint_mask.cc.
References depsgraph, invert_mask(), invert_mask_bmesh(), invert_mask_grids(), verts, and write_mask_mesh().
|
static |
Definition at line 606 of file paint_mask.cc.
References BKE_pbvh_bmesh_node_unique_verts(), BLI_assert_unreachable, bm, BM_ELEM_CD_GET_FLOAT, BM_ELEM_CD_SET_FLOAT, BM_elem_flag_test, BM_ELEM_HIDDEN, CD_PROP_FLOAT, CustomData_get_offset_named(), depsgraph, blender::index_mask::IndexMask::foreach_index(), invert_mask_bmesh(), blender::bke::pbvh::Tree::nodes(), blender::bke::pbvh::Tree::tag_masks_changed(), and BMesh::vdata.
Referenced by invert_mask(), and invert_mask_bmesh().
|
static |
Definition at line 563 of file paint_mask.cc.
References BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BKE_subdiv_ccg_key_top_level(), depsgraph, blender::index_mask::IndexMask::foreach_index(), invert_mask_grids(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::bke::pbvh::Tree::nodes(), blender::MutableSpan< T >::slice(), and SculptSession::subdiv_ccg.
Referenced by invert_mask(), and invert_mask_grids().
|
static |
Definition at line 725 of file sculpt_ops.cc.
References blender::bke::pbvh::all_leaf_nodes(), color_delta_get(), depsgraph, blender::math::distance(), final_mask_get(), invert(), len, blender::bke::object::pbvh_get(), blender::bke::Point, blender::math::numbers::sqrt3_v, update_mask_mesh(), verts, and blender::VecBase< T, Size >::xyz().
Referenced by mask_by_color_invoke().
|
static |
Definition at line 768 of file sculpt_ops.cc.
References blender::bke::pbvh::all_leaf_nodes(), color_delta_get(), depsgraph, final_mask_get(), invert(), blender::bke::object::pbvh_get(), blender::bke::Point, update_mask_mesh(), verts, and blender::VecBase< T, Size >::xyz().
Referenced by mask_by_color_invoke().
|
static |
Definition at line 797 of file sculpt_ops.cc.
References SculptSession::active_vert(), BKE_base_is_visible(), BKE_sculpt_color_layer_create_if_needed(), BKE_sculpt_update_object_for_edit(), View3DShading::color_type, CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_view3d(), DEG_id_tag_update(), depsgraph, float, blender::ed::sculpt_paint::flush_update_done(), Object::id, ID_RECALC_GEOMETRY, invert(), blender::ed::sculpt_paint::Mask, mask_by_color_contiguous_mesh(), mask_by_color_full_mesh(), wmEvent::mval, OB_SOLID, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), wmOperator::reports, RNA_boolean_get(), RNA_float_get(), Object::sculpt, SCULPT_cursor_geometry_info_update(), SCULPT_handles_colors_report(), View3D::shading, View3DShading::type, and V3D_SHADING_VERTEX_COLOR.
Referenced by SCULPT_OT_mask_by_color().
|
static |
Definition at line 88 of file sculpt_filter_mask.cc.
References clamp_mask(), and multiply_add().
Referenced by decrease_contrast_mask_bmesh(), decrease_contrast_mask_grids(), and decrease_contrast_mask_mesh().
| bool blender::ed::sculpt_paint::mask::mask_equals_array_bmesh | ( | const int | mask_offset, |
| const Set< BMVert *, 0 > & | verts, | ||
| const Span< float > | values ) |
Definition at line 251 of file paint_mask.cc.
References BLI_assert, BM_ELEM_CD_GET_FLOAT, and verts.
Referenced by apply_new_mask_bmesh().
| bool blender::ed::sculpt_paint::mask::mask_equals_array_grids | ( | Span< float > | masks, |
| const CCGKey & | key, | ||
| Span< int > | grids, | ||
| Span< float > | values ) |
Check whether array data is the same as the stored mask for the referenced geometry.
Definition at line 236 of file paint_mask.cc.
References BLI_assert, CCGKey::grid_area, blender::Span< T >::index_range(), and blender::Span< T >::size().
Referenced by apply_new_mask_grids().
|
static |
Definition at line 653 of file paint_mask.cc.
References BKE_sculpt_update_object_for_edit(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), depsgraph, fill_mask(), invert_mask(), mask_flood_fill_exec(), OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), and SCULPT_tag_update_overlays().
Referenced by mask_flood_fill_exec(), and PAINT_OT_mask_flood_fill().
|
static |
Definition at line 1326 of file sculpt_ops.cc.
References blender::bke::pbvh::all_leaf_nodes(), apply_mask_from_settings(), Brush::automasking_boundary_edges_propagation_steps, Sculpt::automasking_boundary_edges_propagation_steps, Brush::automasking_flags, Sculpt::automasking_flags, BKE_base_is_visible(), BKE_paint_brush_for_read(), BKE_report(), BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BKE_sculpt_update_object_for_edit(), Brush, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, blender::ed::sculpt_paint::auto_mask::cache_init(), CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_view3d(), depsgraph, FaceSets, blender::ed::sculpt_paint::flush_update_done(), blender::ed::sculpt_paint::undo::Mask, blender::ed::sculpt_paint::Mask, Mesh, Operator, OPERATOR_CANCELLED, OPERATOR_FINISHED, Sculpt::paint, blender::bke::object::pbvh_get(), wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_nodes(), wmOperator::reports, RNA_enum_get(), RNA_float_get(), RNA_int_get(), RPT_WARNING, Scene, ToolSettings::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_SMOOTH, SCULPT_tag_update_overlays(), SCULPT_vertex_random_access_ensure(), and blender::bke::pbvh::Tree::tag_masks_changed().
Referenced by SCULPT_OT_mask_from_boundary().
|
static |
Definition at line 1425 of file sculpt_ops.cc.
References Brush, CTX_data_scene(), wmOperator::layout, Operator, wmOperator::ptr, RNA_enum_get(), Scene, UI_ITEM_NONE, uiItemR(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by SCULPT_OT_mask_from_boundary().
|
static |
Definition at line 1133 of file sculpt_ops.cc.
References blender::bke::pbvh::all_leaf_nodes(), apply_mask_from_settings(), Brush::automasking_boundary_edges_propagation_steps, Brush::automasking_cavity_blur_steps, Sculpt::automasking_cavity_blur_steps, Brush::automasking_cavity_curve, Sculpt::automasking_cavity_curve, Sculpt::automasking_cavity_curve_op, Brush::automasking_cavity_factor, Sculpt::automasking_cavity_factor, Brush::automasking_flags, Sculpt::automasking_flags, BKE_base_is_visible(), BKE_paint_brush_for_read(), BKE_report(), BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BKE_sculpt_update_object_for_edit(), Brush, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_AUTOMASKING_CAVITY_INVERTED, BRUSH_AUTOMASKING_CAVITY_NORMAL, BRUSH_AUTOMASKING_CAVITY_USE_CURVE, blender::ed::sculpt_paint::auto_mask::cache_init(), CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_view3d(), depsgraph, blender::ed::sculpt_paint::flush_update_done(), blender::ed::sculpt_paint::undo::Mask, blender::ed::sculpt_paint::Mask, Operator, OPERATOR_CANCELLED, OPERATOR_FINISHED, Sculpt::paint, blender::bke::object::pbvh_get(), wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_nodes(), wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), RNA_int_get(), RPT_WARNING, Scene, ToolSettings::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_SMOOTH, SCULPT_tag_update_overlays(), SCULPT_vertex_random_access_ensure(), and blender::bke::pbvh::Tree::tag_masks_changed().
Referenced by SCULPT_OT_mask_from_cavity().
|
static |
Definition at line 1243 of file sculpt_ops.cc.
References Brush, CTX_data_scene(), wmOperator::layout, Operator, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), RNA_pointer_create(), Scene, UI_ITEM_NONE, uiItemR(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), and uiTemplateCurveMapping().
Referenced by SCULPT_OT_mask_from_cavity().
|
static |
Definition at line 734 of file paint_mask.cc.
References BLI_assert_unreachable, and mask_gesture_get_new_value().
Referenced by gesture_apply_for_symmetry_pass(), and mask_gesture_get_new_value().
|
static |
Definition at line 76 of file sculpt_filter_mask.cc.
References clamp_mask(), multiply_add(), and blender::math::rcp().
Referenced by increase_contrast_mask_bmesh(), increase_contrast_mask_grids(), and increase_contrast_mask_mesh().
| void blender::ed::sculpt_paint::mask::mix_new_masks | ( | const Span< float > | new_masks, |
| const Span< float > | factors, | ||
| const MutableSpan< float > | masks ) |
Definition at line 98 of file paint_mask.cc.
References BLI_assert, and blender::Span< T >::size().
Referenced by apply_mask_bmesh(), apply_mask_grids(), and apply_mask_mesh().
|
static |
Definition at line 66 of file sculpt_filter_mask.cc.
References blender::Span< T >::index_range().
Referenced by mask_decrease_contrast(), and mask_increase_contrast().
| void blender::ed::sculpt_paint::mask::PAINT_OT_mask_box_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 951 of file paint_mask.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gesture_box_exec(), gesture_operator_properties(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, PAINT_OT_mask_box_gesture(), wmOperatorType::poll, SCULPT_mode_poll_view3d(), WM_gesture_box_invoke(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by PAINT_OT_mask_box_gesture().
| void blender::ed::sculpt_paint::mask::PAINT_OT_mask_flood_fill | ( | wmOperatorType * | ot | ) |
Definition at line 685 of file paint_mask.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mask_flood_fill_exec(), mode_items, wmOperatorType::name, OPTYPE_REGISTER, ot, PAINT_OT_mask_flood_fill(), wmOperatorType::poll, RNA_def_enum(), RNA_def_float(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by PAINT_OT_mask_flood_fill().
| void blender::ed::sculpt_paint::mask::PAINT_OT_mask_lasso_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 931 of file paint_mask.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gesture_lasso_exec(), gesture_operator_properties(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, ot, PAINT_OT_mask_lasso_gesture(), wmOperatorType::poll, SCULPT_mode_poll_view3d(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by PAINT_OT_mask_lasso_gesture().
| void blender::ed::sculpt_paint::mask::PAINT_OT_mask_line_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 971 of file paint_mask.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gesture_line_exec(), gesture_operator_properties(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, PAINT_OT_mask_line_gesture(), wmOperatorType::poll, SCULPT_mode_poll_view3d(), WM_CURSOR_EDIT, WM_gesture_straightline_active_side_invoke(), WM_gesture_straightline_oneshot_modal(), and WM_operator_properties_gesture_straightline().
Referenced by PAINT_OT_mask_line_gesture().
| void blender::ed::sculpt_paint::mask::PAINT_OT_mask_polyline_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 991 of file paint_mask.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gesture_operator_properties(), gesture_polyline_exec(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, ot, PAINT_OT_mask_polyline_gesture(), wmOperatorType::poll, SCULPT_mode_poll_view3d(), WM_gesture_polyline_invoke(), WM_gesture_polyline_modal(), and WM_operator_properties_gesture_polyline().
Referenced by PAINT_OT_mask_polyline_gesture().
| void blender::ed::sculpt_paint::mask::scatter_mask_bmesh | ( | const Span< float > | mask, |
| const BMesh & | bm, | ||
| const Set< BMVert *, 0 > & | verts ) |
Definition at line 156 of file paint_mask.cc.
References BLI_assert, bm, BM_ELEM_CD_SET_FLOAT, CD_PROP_FLOAT, CustomData_get_offset_named(), BMesh::vdata, and verts.
Referenced by apply_mask_bmesh(), apply_new_mask_bmesh(), decrease_contrast_mask_bmesh(), and increase_contrast_mask_bmesh().
| void blender::ed::sculpt_paint::mask::scatter_mask_grids | ( | const Span< float > | mask, |
| SubdivCCG & | subdiv_ccg, | ||
| const Span< int > | grids ) |
Definition at line 151 of file paint_mask.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), SubdivCCG::masks, and blender::ed::sculpt_paint::scatter_data_grids().
Referenced by apply_mask_grids().
|
static |
Definition at line 686 of file sculpt_filter_mask.cc.
References blender::bke::pbvh::all_leaf_nodes(), apply_new_mask_bmesh(), apply_new_mask_grids(), apply_new_mask_mesh(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), BKE_base_is_visible(), BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BKE_sculpt_update_object_for_edit(), BKE_subdiv_ccg_key_top_level(), bm, SculptSession::bm, BM_mesh_elem_index_ensure(), BM_VERT, blender::bke::pbvh::BMesh, CD_PROP_FLOAT, blender::ed::sculpt_paint::create_node_vert_offsets(), blender::ed::sculpt_paint::create_node_vert_offsets_bmesh(), CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_wm_view3d(), CustomData_get_offset_named(), Object::data, decrease_contrast_mask_bmesh(), decrease_contrast_mask_grids(), decrease_contrast_mask_mesh(), depsgraph, blender::bke::Face, blender::ed::sculpt_paint::flush_update_done(), blender::ed::sculpt_paint::flush_update_step(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::from_bools(), blender::bke::pbvh::Grids, grow_mask_bmesh(), grow_mask_grids(), grow_mask_mesh(), increase_contrast_mask_bmesh(), increase_contrast_mask_grids(), increase_contrast_mask_mesh(), int, blender::threading::EnumerableThreadSpecific< T >::local(), blender::ed::sculpt_paint::Mask, blender::bke::pbvh::Mesh, blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::Tree::nodes(), OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::bke::object::pbvh_get(), blender::bke::Point, pos, wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), RNA_boolean_get(), RNA_enum_get(), RNA_int_get(), Object::sculpt, SCULPT_tag_update_overlays(), SCULPT_vertex_count_get(), sharpen_mask_bmesh(), sharpen_mask_grids(), sharpen_mask_mesh(), shrink_mask_bmesh(), shrink_mask_grids(), shrink_mask_mesh(), smooth_mask_bmesh(), smooth_mask_grids(), smooth_mask_mesh(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::tag_masks_changed(), blender::offset_indices::OffsetIndices< T >::total_size(), blender::bke::pbvh::Tree::type(), and BMesh::vdata.
Referenced by SCULPT_OT_mask_filter().
|
static |
Definition at line 110 of file sculpt_mask_init.cc.
References blender::bke::pbvh::all_leaf_nodes(), BKE_base_is_visible(), BKE_pbvh_bmesh_node_unique_verts(), BKE_sculpt_update_object_for_edit(), BKE_subdiv_ccg_foreach_visible_grid_vert(), BKE_subdiv_ccg_key_top_level(), BLI_hash_int_01(), BLI_time_now_seconds(), SculptSession::bm, BM_ELEM_CD_SET_FLOAT, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, blender::bke::pbvh::BMesh, CD_PROP_FLOAT, CTX_data_active_base(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_view3d(), CustomData_get_offset_named(), Object::data, depsgraph, blender::ed::sculpt_paint::islands::ensure_cache(), blender::bke::Face, FaceSet, blender::index_mask::IndexMask::foreach_index(), CCGKey::grid_area, SubdivCCG::grid_to_face_map, blender::bke::pbvh::Grids, init_mask_grids(), blender::index_mask::IndexMask::is_empty(), Island, blender::bke::pbvh::Mesh, blender::bke::pbvh::node_update_mask_bmesh(), blender::bke::pbvh::Tree::nodes(), OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::bke::object::pbvh_get(), wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), Random, RNA_enum_get(), Object::sculpt, SCULPT_tag_update_overlays(), seed, SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::tag_masks_changed(), blender::bke::pbvh::Tree::type(), BMesh::vdata, blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::islands::vert_id_get(), verts, and write_mask_mesh().
Referenced by SCULPT_OT_mask_init().
|
static |
Definition at line 852 of file sculpt_ops.cc.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, mask_by_color_invoke(), wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_float(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt().
| void blender::ed::sculpt_paint::mask::SCULPT_OT_mask_filter | ( | wmOperatorType * | ot | ) |
Definition at line 988 of file sculpt_filter_mask.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, int, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum(), RNA_def_int(), sculpt_mask_filter_exec(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt().
|
static |
Definition at line 1455 of file sculpt_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, FaceSets, wmOperatorType::flag, wmOperatorType::idname, int, mask_from_boundary_exec(), mask_from_boundary_ui(), Mesh, Mix, mix_modes, wmOperatorType::name, Operator, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), RNA_def_float(), RNA_def_int(), SCULPT_mode_poll(), settings_sources, wmOperatorType::srna, and wmOperatorType::ui.
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt().
|
static |
Definition at line 1282 of file sculpt_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mask_from_cavity_exec(), mask_from_cavity_ui(), Mix, mix_modes, wmOperatorType::name, Operator, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum(), RNA_def_float(), RNA_def_int(), SCULPT_mode_poll(), settings_sources, wmOperatorType::srna, and wmOperatorType::ui.
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt().
| void blender::ed::sculpt_paint::mask::SCULPT_OT_mask_init | ( | wmOperatorType * | ot | ) |
Definition at line 277 of file sculpt_mask_init.cc.
References wmOperatorType::description, wmOperatorType::exec, FaceSet, wmOperatorType::flag, wmOperatorType::idname, int, Island, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, Random, RNA_def_enum(), sculpt_mask_init_exec(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by blender::ed::sculpt_paint::operatortypes_sculpt().
|
static |
Definition at line 567 of file sculpt_filter_mask.cc.
References average_neighbor_mask_bmesh(), BKE_pbvh_bmesh_node_unique_verts(), bm, copy_old_hidden_mask_bmesh(), gather_mask_bmesh(), blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), sharpen_masks(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 364 of file sculpt_filter_mask.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::smooth::average_data_grids(), BKE_subdiv_ccg_key_top_level(), copy_old_hidden_mask_grids(), blender::ed::sculpt_paint::gather_data_grids(), CCGKey::grid_area, SubdivCCG::masks, blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), sharpen_masks(), and blender::Span< T >::size().
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 175 of file sculpt_filter_mask.cc.
References blender::ed::sculpt_paint::calc_vert_neighbors(), copy_old_hidden_mask_mesh(), blender::ed::sculpt_paint::gather_data_mesh(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh(), blender::ed::sculpt_paint::mask::FilterLocalData::node_mask, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), sharpen_masks(), blender::ed::sculpt_paint::mask::FilterLocalData::vert_neighbors, and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 100 of file sculpt_filter_mask.cc.
References clamp_mask(), and blender::Span< T >::index_range().
Referenced by sharpen_mask_bmesh(), sharpen_mask_grids(), and sharpen_mask_mesh().
|
static |
Definition at line 605 of file sculpt_filter_mask.cc.
References BKE_pbvh_bmesh_node_unique_verts(), BM_ELEM_CD_GET_FLOAT, copy_old_hidden_mask_bmesh(), blender::ed::sculpt_paint::vert_neighbors_get_bmesh(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 418 of file sculpt_filter_mask.cc.
References BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), CCG_grid_xy_to_index(), SubdivCCGNeighbors::coords, copy_old_hidden_mask_grids(), blender::bke::ccg::grid_range(), CCGKey::grid_size, blender::Span< T >::index_range(), SubdivCCG::masks, blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), and x.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 226 of file sculpt_filter_mask.cc.
References blender::ed::sculpt_paint::calc_vert_neighbors(), copy_old_hidden_mask_mesh(), blender::ed::sculpt_paint::mask::FilterLocalData::vert_neighbors, and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 558 of file sculpt_filter_mask.cc.
References average_neighbor_mask_bmesh(), BKE_pbvh_bmesh_node_unique_verts(), copy_old_hidden_mask_bmesh(), and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 355 of file sculpt_filter_mask.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::smooth::average_data_grids(), copy_old_hidden_mask_grids(), and SubdivCCG::masks.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 155 of file sculpt_filter_mask.cc.
References blender::ed::sculpt_paint::calc_vert_neighbors(), copy_old_hidden_mask_mesh(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh(), blender::ed::sculpt_paint::mask::FilterLocalData::vert_neighbors, and verts.
Referenced by sculpt_mask_filter_exec().
|
static |
Definition at line 320 of file paint_mask.cc.
References blender::index_mask::IndexMask::foreach_index(), get_hidden_verts(), blender::index_mask::IndexMask::index_range(), blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::index_mask::IndexMask::slice(), and verts.
Referenced by fill_mask_mesh().
| void blender::ed::sculpt_paint::mask::update_mask_mesh | ( | const Depsgraph & | depsgraph, |
| Object & | object, | ||
| const IndexMask & | node_mask, | ||
| FunctionRef< void(MutableSpan< float >, Span< int >)> | update_fn ) |
Write to each node's mask data for visible vertices. Store undo data and mark for redraw only if the data is actually changed.
Definition at line 190 of file paint_mask.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), depsgraph, blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::from_bools(), blender::ed::sculpt_paint::gather_data_mesh(), blender::array_utils::indexed_data_equal(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::ed::sculpt_paint::undo::Mask, blender::ed::sculpt_paint::mask::LocalData::mask, blender::index_mask::IndexMask::min_array_size(), blender::bke::pbvh::node_update_mask_mesh(), blender::ed::sculpt_paint::hide::node_visible_verts(), blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::ed::sculpt_paint::undo::push_node(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scatter_data_mesh(), blender::bke::pbvh::Tree::tag_masks_changed(), and verts.
Referenced by mask_by_color_contiguous_mesh(), and mask_by_color_full_mesh().
| void blender::ed::sculpt_paint::mask::write_mask_mesh | ( | const Depsgraph & | depsgraph, |
| Object & | object, | ||
| const IndexMask & | node_mask, | ||
| FunctionRef< void(MutableSpan< float >, Span< int >)> | write_fn ) |
Write to the mask attribute for each node, storing undo data.
Definition at line 51 of file sculpt_mask_init.cc.
References depsgraph, blender::index_mask::IndexMask::foreach_index(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::ed::sculpt_paint::undo::Mask, blender::bke::pbvh::node_update_mask_mesh(), blender::ed::sculpt_paint::hide::node_visible_verts(), blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::ed::sculpt_paint::undo::push_nodes(), and blender::bke::pbvh::Tree::tag_masks_changed().
Referenced by invert_mask(), and sculpt_mask_init_exec().
|
static |
Definition at line 899 of file sculpt_ops.cc.
Referenced by SCULPT_OT_mask_from_boundary(), and SCULPT_OT_mask_from_cavity().
|
static |
Definition at line 287 of file paint_mask.cc.
Referenced by gesture_operator_properties(), and PAINT_OT_mask_flood_fill().
|
static |
Definition at line 910 of file sculpt_ops.cc.
Referenced by SCULPT_OT_mask_from_boundary(), and SCULPT_OT_mask_from_cavity().