Blender V4.3
sculpt_face_set.cc File Reference
#include "sculpt_face_set.hh"
#include <cmath>
#include <cstdlib>
#include <queue>
#include "MEM_guardedalloc.h"
#include "BLI_array.hh"
#include "BLI_array_utils.hh"
#include "BLI_bit_vector.hh"
#include "BLI_enumerable_thread_specific.hh"
#include "BLI_function_ref.hh"
#include "BLI_hash.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "BLI_math_vector.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_span.hh"
#include "BLI_task.h"
#include "BLI_task.hh"
#include "BLI_vector.hh"
#include "DNA_customdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_attribute.hh"
#include "BKE_ccg.hh"
#include "BKE_context.hh"
#include "BKE_customdata.hh"
#include "BKE_layer.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_fair.hh"
#include "BKE_mesh_mapping.hh"
#include "BKE_object.hh"
#include "BKE_paint.hh"
#include "BKE_pbvh_api.hh"
#include "BKE_subdiv_ccg.hh"
#include "DEG_depsgraph.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_sculpt.hh"
#include "mesh_brush_common.hh"
#include "paint_hide.hh"
#include "sculpt_automask.hh"
#include "sculpt_boundary.hh"
#include "sculpt_gesture.hh"
#include "sculpt_intern.hh"
#include "sculpt_islands.hh"
#include "sculpt_undo.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "bmesh.hh"

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::face_set::FaceSetOperation
 

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::sculpt_paint
 
namespace  blender::ed::sculpt_paint::face_set
 

Functions

Public API
int blender::ed::sculpt_paint::face_set::find_next_available_id (Object &object)
 
void blender::ed::sculpt_paint::face_set::initialize_none_to_id (Mesh *mesh, int new_id)
 
int blender::ed::sculpt_paint::face_set::active_update_and_get (bContext *C, Object &ob, const float mval_fl[2])
 
bool blender::ed::sculpt_paint::face_set::create_face_sets_mesh (Object &object)
 
bke::SpanAttributeWriter< intblender::ed::sculpt_paint::face_set::ensure_face_sets_mesh (Mesh &mesh)
 
int blender::ed::sculpt_paint::face_set::ensure_face_sets_bmesh (Object &object)
 
Array< intblender::ed::sculpt_paint::face_set::duplicate_face_sets (const Mesh &mesh)
 
void blender::ed::sculpt_paint::face_set::filter_verts_with_unique_face_sets_mesh (const GroupedSpan< int > vert_to_face_map, const Span< int > face_sets, const bool unique, const Span< int > verts, const MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::face_set::filter_verts_with_unique_face_sets_grids (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< int > face_sets, const SubdivCCG &subdiv_ccg, const bool unique, const Span< int > grids, const MutableSpan< float > factors)
 
void blender::ed::sculpt_paint::face_set::filter_verts_with_unique_face_sets_bmesh (int face_set_offset, const bool unique, const Set< BMVert *, 0 > &verts, const MutableSpan< float > factors)
 
Gesture Operators

Operators that modify face sets based on a selected area.

static void blender::ed::sculpt_paint::face_set::gesture_begin (bContext &C, wmOperator &op, gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::face_set::gesture_apply_mesh (gesture::GestureData &gesture_data, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::face_set::gesture_apply_bmesh (gesture::GestureData &gesture_data, const IndexMask &node_mask)
 
static void blender::ed::sculpt_paint::face_set::gesture_apply_for_symmetry_pass (bContext &, gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::face_set::gesture_end (bContext &, gesture::GestureData &gesture_data)
 
static void blender::ed::sculpt_paint::face_set::init_operation (gesture::GestureData &gesture_data, wmOperator &)
 
static int blender::ed::sculpt_paint::face_set::gesture_box_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int blender::ed::sculpt_paint::face_set::gesture_box_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::face_set::gesture_lasso_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int blender::ed::sculpt_paint::face_set::gesture_lasso_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::face_set::gesture_line_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int blender::ed::sculpt_paint::face_set::gesture_line_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::face_set::gesture_polyline_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int blender::ed::sculpt_paint::face_set::gesture_polyline_exec (bContext *C, wmOperator *op)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_polyline_gesture (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_lasso_gesture (wmOperatorType *ot)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_line_gesture (wmOperatorType *ot)
 

Global Mesh Operators

Operators that work on the mesh as a whole.

enum class  blender::ed::sculpt_paint::face_set::CreateMode { blender::ed::sculpt_paint::face_set::Masked = 0 , blender::ed::sculpt_paint::face_set::Visible = 1 , blender::ed::sculpt_paint::face_set::All = 2 , blender::ed::sculpt_paint::face_set::Selection = 3 }
 
enum class  blender::ed::sculpt_paint::face_set::InitMode {
  blender::ed::sculpt_paint::face_set::LooseParts = 0 , blender::ed::sculpt_paint::face_set::Materials = 1 , blender::ed::sculpt_paint::face_set::Normals = 2 , blender::ed::sculpt_paint::face_set::UVSeams = 3 ,
  blender::ed::sculpt_paint::face_set::Creases = 4 , blender::ed::sculpt_paint::face_set::SharpEdges = 5 , blender::ed::sculpt_paint::face_set::BevelWeight = 6 , blender::ed::sculpt_paint::face_set::FaceSetBoundaries = 8
}
 
enum class  blender::ed::sculpt_paint::face_set::VisibilityMode { blender::ed::sculpt_paint::face_set::Toggle = 0 , blender::ed::sculpt_paint::face_set::ShowActive = 1 , blender::ed::sculpt_paint::face_set::HideActive = 2 }
 
enum class  blender::ed::sculpt_paint::face_set::EditMode {
  blender::ed::sculpt_paint::face_set::Grow = 0 , blender::ed::sculpt_paint::face_set::Shrink = 1 , blender::ed::sculpt_paint::face_set::DeleteGeometry = 2 , blender::ed::sculpt_paint::face_set::FairPositions = 3 ,
  blender::ed::sculpt_paint::face_set::FairTangency = 4
}
 
using blender::ed::sculpt_paint::face_set::FaceSetsFloodFillFn = FunctionRef<bool(int from_face, int edge, int to_face)>
 
static void blender::ed::sculpt_paint::face_set::face_sets_update (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const FunctionRef< void(Span< int >, MutableSpan< int >)> calc_face_sets)
 
static void blender::ed::sculpt_paint::face_set::clear_face_sets (const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static int blender::ed::sculpt_paint::face_set::create_op_exec (bContext *C, wmOperator *op)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_create (wmOperatorType *ot)
 
static void blender::ed::sculpt_paint::face_set::init_flood_fill (Object &ob, const FaceSetsFloodFillFn &test_fn)
 
Set< intblender::ed::sculpt_paint::face_set::gather_hidden_face_sets (const Span< bool > hide_poly, const Span< int > face_sets)
 
static int blender::ed::sculpt_paint::face_set::init_op_exec (bContext *C, wmOperator *op)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_init (wmOperatorType *ot)
 
static void blender::ed::sculpt_paint::face_set::face_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::face_set::show_all (Depsgraph &depsgraph, Object &object, const IndexMask &node_mask)
 
static int blender::ed::sculpt_paint::face_set::change_visibility_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::face_set::change_visibility_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility (wmOperatorType *ot)
 
static int blender::ed::sculpt_paint::face_set::randomize_colors_exec (bContext *C, wmOperator *)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_randomize_colors (wmOperatorType *ot)
 
static void blender::ed::sculpt_paint::face_set::edit_grow_shrink (const Depsgraph &depsgraph, const Scene &scene, Object &object, const EditMode mode, const int active_face_set_id, const bool modify_hidden, wmOperator *op)
 
static bool blender::ed::sculpt_paint::face_set::check_single_face_set (const Object &object, const bool check_visible_only)
 
static void blender::ed::sculpt_paint::face_set::delete_geometry (Object &ob, const int active_face_set_id, const bool modify_hidden)
 
static void blender::ed::sculpt_paint::face_set::edit_fairing (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const int active_face_set_id, const eMeshFairingDepth fair_order, const float strength)
 
static bool blender::ed::sculpt_paint::face_set::edit_is_operation_valid (const Object &object, const EditMode mode, const bool modify_hidden)
 
static void blender::ed::sculpt_paint::face_set::edit_modify_geometry (bContext *C, Object &ob, const int active_face_set, const bool modify_hidden, wmOperator *op)
 
static void blender::ed::sculpt_paint::face_set::edit_modify_coordinates (bContext *C, Object &ob, const int active_face_set, const EditMode mode, wmOperator *op)
 
static bool blender::ed::sculpt_paint::face_set::edit_op_init (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::face_set::edit_op_exec (bContext *C, wmOperator *op)
 
static int blender::ed::sculpt_paint::face_set::edit_op_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_edit (wmOperatorType *ot)