Blender V4.3
blender::ed::sculpt_paint::hide Namespace Reference

Classes

struct  DualBitBuffer
 
struct  DualBuffer
 
struct  HideShowOperation
 

Functions

Span< intnode_visible_verts (const bke::pbvh::MeshNode &node, const Span< bool > hide_vert, Vector< int > &indices)
 
bool vert_all_faces_visible_get (const Span< bool > hide_poly, const GroupedSpan< int > vert_to_face_map, const int vert)
 
bool vert_all_faces_visible_get (const Span< bool > hide_poly, const SubdivCCG &subdiv_ccg, const SubdivCCGCoord vert)
 
bool vert_all_faces_visible_get (BMVert *vert)
 
Public API
void sync_all_from_faces (Object &object)
 
void tag_update_visibility (const bContext &C)
 
void mesh_show_all (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
void grids_show_all (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
Gesture-based Visibility Operators

Operators that act upon a user-selected area.

static void partialvis_gesture_update_mesh (gesture::GestureData &gesture_data)
 
static void partialvis_gesture_update_grids (Depsgraph &depsgraph, gesture::GestureData &gesture_data)
 
static void partialvis_gesture_update_bmesh (gesture::GestureData &gesture_data)
 
static void hide_show_begin (bContext &C, wmOperator &op, gesture::GestureData &)
 
static void hide_show_apply_for_symmetry_pass (bContext &C, gesture::GestureData &gesture_data)
 
static void hide_show_end (bContext &C, gesture::GestureData &gesture_data)
 
static void hide_show_init_properties (bContext &, gesture::GestureData &gesture_data, wmOperator &op)
 
static int hide_show_gesture_box_exec (bContext *C, wmOperator *op)
 
static int hide_show_gesture_lasso_exec (bContext *C, wmOperator *op)
 
static int hide_show_gesture_line_exec (bContext *C, wmOperator *op)
 
static int hide_show_gesture_polyline_exec (bContext *C, wmOperator *op)
 
static void hide_show_operator_gesture_properties (wmOperatorType *ot)
 
void PAINT_OT_hide_show (wmOperatorType *ot)
 
void PAINT_OT_hide_show_lasso_gesture (wmOperatorType *ot)
 
void PAINT_OT_hide_show_line_gesture (wmOperatorType *ot)
 
void PAINT_OT_hide_show_polyline_gesture (wmOperatorType *ot)
 

Internal Visibility Utilities

Functions that assist with applying changes to the different bke::pbvh::Tree types.

enum class  VisAction { Hide = 0 , Show = 1 }
 
static bool action_to_hide (const VisAction action)
 
static void calc_face_hide (const Span< int > node_faces, const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< bool > hide_vert, MutableSpan< bool > hide_face)
 
static void flush_face_changes_node (Mesh &mesh, bke::pbvh::Tree &pbvh, const IndexMask &node_mask, const Span< bool > hide_vert)
 
static void flush_face_changes (Mesh &mesh, const Span< bool > hide_vert)
 
static void flush_edge_changes (Mesh &mesh, const Span< bool > hide_vert)
 
static void vert_hide_update (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const FunctionRef< void(Span< int >, MutableSpan< bool >)> calc_hide)
 
static void grid_hide_update (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const FunctionRef< void(const int, MutableBoundedBitSpan)> calc_hide)
 
static void partialvis_update_bmesh_verts (const Set< BMVert *, 0 > &verts, const VisAction action, const FunctionRef< bool(BMVert *v)> should_update, bool *any_changed, bool *any_visible)
 
static void partialvis_update_bmesh_faces (const Set< BMFace *, 0 > &faces)
 
static void partialvis_update_bmesh_nodes (const Depsgraph &depsgraph, Object &ob, const IndexMask &node_mask, const VisAction action, const FunctionRef< bool(BMVert *v)> vert_test_fn)
 

Global Visibility Operators

Operators that act upon the entirety of a given object's mesh.

static constexpr float VERTEX_ITERATION_THRESHOLD = 50000.0f
 
static void partialvis_all_update_mesh (const Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void partialvis_all_update_grids (Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void partialvis_all_update_bmesh (const Depsgraph &depsgraph, Object &ob, const VisAction action, const IndexMask &node_mask)
 
static int hide_show_all_exec (bContext *C, wmOperator *op)
 
static void partialvis_masked_update_mesh (const Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void partialvis_masked_update_grids (Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void partialvis_masked_update_bmesh (const Depsgraph &depsgraph, Object &ob, const VisAction action, const IndexMask &node_mask)
 
static int hide_show_masked_exec (bContext *C, wmOperator *op)
 
static void hide_show_operator_properties (wmOperatorType *ot)
 
void PAINT_OT_hide_show_masked (wmOperatorType *ot)
 
void PAINT_OT_hide_show_all (wmOperatorType *ot)
 
static void invert_visibility_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static void invert_visibility_grids (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static void invert_visibility_bmesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static int visibility_invert_exec (bContext *C, wmOperator *op)
 
void PAINT_OT_visibility_invert (wmOperatorType *ot)
 
template<bool value>
static void affect_visibility_mesh (const IndexRange face, const Span< int > corner_verts, const Span< bool > read_buffer, MutableSpan< bool > write_buffer)
 
static void propagate_vertex_visibility (Mesh &mesh, DualBuffer &buffers, const VArraySpan< bool > &hide_poly, const VisAction action, const int iterations)
 
static void update_undo_state (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const Span< bool > old_hide_vert, const Span< bool > new_hide_vert)
 
static void update_node_visibility_from_face_changes (MutableSpan< bke::pbvh::MeshNode > nodes, const IndexMask &node_mask, const Span< bool > orig_hide_poly, const Span< bool > new_hide_poly, const Span< bool > hide_vert)
 
static void grow_shrink_visibility_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const VisAction action, const int iterations)
 
static void grow_shrink_visibility_grid (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const VisAction action, const int iterations)
 
static Array< bool > duplicate_visibility_bmesh (const Object &object)
 
static void grow_shrink_visibility_bmesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const VisAction action, const int iterations)
 
static int visibility_filter_exec (bContext *C, wmOperator *op)
 
void PAINT_OT_visibility_filter (wmOperatorType *ot)
 

Enumeration Type Documentation

◆ VisAction

Enumerator
Hide 
Show 

Definition at line 187 of file paint_hide.cc.

Function Documentation

◆ action_to_hide()

static bool blender::ed::sculpt_paint::hide::action_to_hide ( const VisAction action)
static

◆ affect_visibility_mesh()

template<bool value>
static void blender::ed::sculpt_paint::hide::affect_visibility_mesh ( const IndexRange face,
const Span< int > corner_verts,
const Span< bool > read_buffer,
MutableSpan< bool > write_buffer )
static

◆ calc_face_hide()

static void blender::ed::sculpt_paint::hide::calc_face_hide ( const Span< int > node_faces,
const OffsetIndices< int > faces,
const Span< int > corner_verts,
const Span< bool > hide_vert,
MutableSpan< bool > hide_face )
static

◆ duplicate_visibility_bmesh()

static Array< bool > blender::ed::sculpt_paint::hide::duplicate_visibility_bmesh ( const Object & object)
static

◆ flush_edge_changes()

static void blender::ed::sculpt_paint::hide::flush_edge_changes ( Mesh & mesh,
const Span< bool > hide_vert )
static

◆ flush_face_changes()

static void blender::ed::sculpt_paint::hide::flush_face_changes ( Mesh & mesh,
const Span< bool > hide_vert )
static

◆ flush_face_changes_node()

◆ grid_hide_update()

◆ grids_show_all()

◆ grow_shrink_visibility_bmesh()

static void blender::ed::sculpt_paint::hide::grow_shrink_visibility_bmesh ( const Depsgraph & depsgraph,
Object & object,
const IndexMask & node_mask,
const VisAction action,
const int iterations )
static

◆ grow_shrink_visibility_grid()

◆ grow_shrink_visibility_mesh()

◆ hide_show_all_exec()

◆ hide_show_apply_for_symmetry_pass()

◆ hide_show_begin()

static void blender::ed::sculpt_paint::hide::hide_show_begin ( bContext & C,
wmOperator & op,
gesture::GestureData &  )
static

◆ hide_show_end()

static void blender::ed::sculpt_paint::hide::hide_show_end ( bContext & C,
gesture::GestureData & gesture_data )
static

◆ hide_show_gesture_box_exec()

static int blender::ed::sculpt_paint::hide::hide_show_gesture_box_exec ( bContext * C,
wmOperator * op )
static

◆ hide_show_gesture_lasso_exec()

static int blender::ed::sculpt_paint::hide::hide_show_gesture_lasso_exec ( bContext * C,
wmOperator * op )
static

◆ hide_show_gesture_line_exec()

static int blender::ed::sculpt_paint::hide::hide_show_gesture_line_exec ( bContext * C,
wmOperator * op )
static

◆ hide_show_gesture_polyline_exec()

static int blender::ed::sculpt_paint::hide::hide_show_gesture_polyline_exec ( bContext * C,
wmOperator * op )
static

◆ hide_show_init_properties()

◆ hide_show_masked_exec()

◆ hide_show_operator_gesture_properties()

static void blender::ed::sculpt_paint::hide::hide_show_operator_gesture_properties ( wmOperatorType * ot)
static

◆ hide_show_operator_properties()

static void blender::ed::sculpt_paint::hide::hide_show_operator_properties ( wmOperatorType * ot)
static

◆ invert_visibility_bmesh()

◆ invert_visibility_grids()

◆ invert_visibility_mesh()

◆ mesh_show_all()

◆ node_visible_verts()

◆ PAINT_OT_hide_show()

◆ PAINT_OT_hide_show_all()

◆ PAINT_OT_hide_show_lasso_gesture()

◆ PAINT_OT_hide_show_line_gesture()

◆ PAINT_OT_hide_show_masked()

◆ PAINT_OT_hide_show_polyline_gesture()

◆ PAINT_OT_visibility_filter()

◆ PAINT_OT_visibility_invert()

◆ partialvis_all_update_bmesh()

static void blender::ed::sculpt_paint::hide::partialvis_all_update_bmesh ( const Depsgraph & depsgraph,
Object & ob,
const VisAction action,
const IndexMask & node_mask )
static

Definition at line 501 of file paint_hide.cc.

References depsgraph, and partialvis_update_bmesh_nodes().

Referenced by hide_show_all_exec().

◆ partialvis_all_update_grids()

static void blender::ed::sculpt_paint::hide::partialvis_all_update_grids ( Depsgraph & depsgraph,
Object & object,
const VisAction action,
const IndexMask & node_mask )
static

◆ partialvis_all_update_mesh()

static void blender::ed::sculpt_paint::hide::partialvis_all_update_mesh ( const Depsgraph & depsgraph,
Object & object,
const VisAction action,
const IndexMask & node_mask )
static

◆ partialvis_gesture_update_bmesh()

◆ partialvis_gesture_update_grids()

◆ partialvis_gesture_update_mesh()

◆ partialvis_masked_update_bmesh()

static void blender::ed::sculpt_paint::hide::partialvis_masked_update_bmesh ( const Depsgraph & depsgraph,
Object & ob,
const VisAction action,
const IndexMask & node_mask )
static

◆ partialvis_masked_update_grids()

static void blender::ed::sculpt_paint::hide::partialvis_masked_update_grids ( Depsgraph & depsgraph,
Object & object,
const VisAction action,
const IndexMask & node_mask )
static

◆ partialvis_masked_update_mesh()

static void blender::ed::sculpt_paint::hide::partialvis_masked_update_mesh ( const Depsgraph & depsgraph,
Object & object,
const VisAction action,
const IndexMask & node_mask )
static

◆ partialvis_update_bmesh_faces()

static void blender::ed::sculpt_paint::hide::partialvis_update_bmesh_faces ( const Set< BMFace *, 0 > & faces)
static

◆ partialvis_update_bmesh_nodes()

◆ partialvis_update_bmesh_verts()

static void blender::ed::sculpt_paint::hide::partialvis_update_bmesh_verts ( const Set< BMVert *, 0 > & verts,
const VisAction action,
const FunctionRef< bool(BMVert *v)> should_update,
bool * any_changed,
bool * any_visible )
static

◆ propagate_vertex_visibility()

static void blender::ed::sculpt_paint::hide::propagate_vertex_visibility ( Mesh & mesh,
DualBuffer & buffers,
const VArraySpan< bool > & hide_poly,
const VisAction action,
const int iterations )
static

◆ sync_all_from_faces()

◆ tag_update_visibility()

◆ update_node_visibility_from_face_changes()

static void blender::ed::sculpt_paint::hide::update_node_visibility_from_face_changes ( MutableSpan< bke::pbvh::MeshNode > nodes,
const IndexMask & node_mask,
const Span< bool > orig_hide_poly,
const Span< bool > new_hide_poly,
const Span< bool > hide_vert )
static

◆ update_undo_state()

static void blender::ed::sculpt_paint::hide::update_undo_state ( const Depsgraph & depsgraph,
Object & object,
const IndexMask & node_mask,
const Span< bool > old_hide_vert,
const Span< bool > new_hide_vert )
static

◆ vert_all_faces_visible_get() [1/3]

bool blender::ed::sculpt_paint::hide::vert_all_faces_visible_get ( BMVert * vert)

◆ vert_all_faces_visible_get() [2/3]

bool blender::ed::sculpt_paint::hide::vert_all_faces_visible_get ( const Span< bool > hide_poly,
const GroupedSpan< int > vert_to_face_map,
const int vert )

◆ vert_all_faces_visible_get() [3/3]

bool blender::ed::sculpt_paint::hide::vert_all_faces_visible_get ( const Span< bool > hide_poly,
const SubdivCCG & subdiv_ccg,
const SubdivCCGCoord vert )

◆ vert_hide_update()

◆ visibility_filter_exec()

◆ visibility_invert_exec()

Variable Documentation

◆ VERTEX_ITERATION_THRESHOLD

float blender::ed::sculpt_paint::hide::VERTEX_ITERATION_THRESHOLD = 50000.0f
staticconstexpr

Definition at line 832 of file paint_hide.cc.

Referenced by visibility_filter_exec().