Blender V4.3
paint_hide.cc File Reference
#include "paint_hide.hh"
#include "MEM_guardedalloc.h"
#include "BLI_array_utils.hh"
#include "BLI_bit_span_ops.hh"
#include "BLI_enumerable_thread_specific.hh"
#include "BLI_math_geom.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "DNA_object_types.h"
#include "BKE_attribute.hh"
#include "BKE_ccg.hh"
#include "BKE_context.hh"
#include "BKE_mesh.hh"
#include "BKE_multires.hh"
#include "BKE_paint.hh"
#include "BKE_pbvh_api.hh"
#include "BKE_subdiv_ccg.hh"
#include "BKE_subsurf.hh"
#include "DEG_depsgraph.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_screen.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "bmesh.hh"
#include "mesh_brush_common.hh"
#include "paint_intern.hh"
#include "sculpt_automask.hh"
#include "sculpt_gesture.hh"
#include "sculpt_intern.hh"
#include "sculpt_islands.hh"
#include "sculpt_undo.hh"

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::hide::DualBuffer
 
struct  blender::ed::sculpt_paint::hide::DualBitBuffer
 
struct  blender::ed::sculpt_paint::hide::HideShowOperation
 

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::sculpt_paint
 
namespace  blender::ed::sculpt_paint::hide
 

Functions

Public API
void blender::ed::sculpt_paint::hide::sync_all_from_faces (Object &object)
 
void blender::ed::sculpt_paint::hide::tag_update_visibility (const bContext &C)
 
void blender::ed::sculpt_paint::hide::mesh_show_all (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
void blender::ed::sculpt_paint::hide::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 blender::ed::sculpt_paint::hide::partialvis_gesture_update_mesh (gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::hide::partialvis_gesture_update_grids (Depsgraph &depsgraph, gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::hide::partialvis_gesture_update_bmesh (gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::hide::hide_show_begin (bContext &C, wmOperator &op, gesture::GestureData &)
 
static void blender::ed::sculpt_paint::hide::hide_show_apply_for_symmetry_pass (bContext &C, gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::hide::hide_show_end (bContext &C, gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::hide::hide_show_init_properties (bContext &, gesture::GestureData &gesture_data, wmOperator &op)
 
static int blender::ed::sculpt_paint::hide::hide_show_gesture_box_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::hide::hide_show_gesture_lasso_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::hide::hide_show_gesture_line_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::hide::hide_show_gesture_polyline_exec (bContext *C, wmOperator *op)
 
static void blender::ed::sculpt_paint::hide::hide_show_operator_gesture_properties (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::hide::PAINT_OT_hide_show (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_lasso_gesture (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_line_gesture (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::hide::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  blender::ed::sculpt_paint::hide::VisAction { blender::ed::sculpt_paint::hide::Hide = 0 , blender::ed::sculpt_paint::hide::Show = 1 }
 
static bool blender::ed::sculpt_paint::hide::action_to_hide (const VisAction action)
 
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 void blender::ed::sculpt_paint::hide::flush_face_changes_node (Mesh &mesh, bke::pbvh::Tree &pbvh, const IndexMask &node_mask, const Span< bool > hide_vert)
 
static void blender::ed::sculpt_paint::hide::flush_face_changes (Mesh &mesh, const Span< bool > hide_vert)
 
static void blender::ed::sculpt_paint::hide::flush_edge_changes (Mesh &mesh, const Span< bool > hide_vert)
 
static void blender::ed::sculpt_paint::hide::vert_hide_update (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const FunctionRef< void(Span< int >, MutableSpan< bool >)> calc_hide)
 
static void blender::ed::sculpt_paint::hide::grid_hide_update (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const FunctionRef< void(const int, MutableBoundedBitSpan)> calc_hide)
 
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 void blender::ed::sculpt_paint::hide::partialvis_update_bmesh_faces (const Set< BMFace *, 0 > &faces)
 
static void blender::ed::sculpt_paint::hide::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 blender::ed::sculpt_paint::hide::VERTEX_ITERATION_THRESHOLD = 50000.0f
 
static void blender::ed::sculpt_paint::hide::partialvis_all_update_mesh (const Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::hide::partialvis_all_update_grids (Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::hide::partialvis_all_update_bmesh (const Depsgraph &depsgraph, Object &ob, const VisAction action, const IndexMask &node_mask)
 
static int blender::ed::sculpt_paint::hide::hide_show_all_exec (bContext *C, wmOperator *op)
 
static void blender::ed::sculpt_paint::hide::partialvis_masked_update_mesh (const Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::hide::partialvis_masked_update_grids (Depsgraph &depsgraph, Object &object, const VisAction action, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::hide::partialvis_masked_update_bmesh (const Depsgraph &depsgraph, Object &ob, const VisAction action, const IndexMask &node_mask)
 
static int blender::ed::sculpt_paint::hide::hide_show_masked_exec (bContext *C, wmOperator *op)
 
static void blender::ed::sculpt_paint::hide::hide_show_operator_properties (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_masked (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_all (wmOperatorType *ot)
 
static void blender::ed::sculpt_paint::hide::invert_visibility_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::hide::invert_visibility_grids (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::hide::invert_visibility_bmesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static int blender::ed::sculpt_paint::hide::visibility_invert_exec (bContext *C, wmOperator *op)
 
void blender::ed::sculpt_paint::hide::PAINT_OT_visibility_invert (wmOperatorType *ot)
 
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 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 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 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 void blender::ed::sculpt_paint::hide::grow_shrink_visibility_mesh (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const VisAction action, const int iterations)
 
static void blender::ed::sculpt_paint::hide::grow_shrink_visibility_grid (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const VisAction action, const int iterations)
 
static Array< bool > blender::ed::sculpt_paint::hide::duplicate_visibility_bmesh (const Object &object)
 
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 int blender::ed::sculpt_paint::hide::visibility_filter_exec (bContext *C, wmOperator *op)
 
void blender::ed::sculpt_paint::hide::PAINT_OT_visibility_filter (wmOperatorType *ot)
 

Detailed Description

Implements the bke::pbvh::Tree node hiding operator.

Definition in file paint_hide.cc.