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

Classes

struct  TrimOperation
 

Enumerations

enum class  OperationType { Intersect = 0 , Difference = 1 , Union = 2 , Join = 3 }
 
enum class  OrientationType { View = 0 , Surface = 1 }
 
enum class  ExtrudeMode { Project = 0 , Fixed = 1 }
 
enum class  SolverMode { Exact = 0 , Fast = 1 }
 

Functions

void SCULPT_OT_trim_lasso_gesture (wmOperatorType *ot)
 
void SCULPT_OT_trim_box_gesture (wmOperatorType *ot)
 
void SCULPT_OT_trim_line_gesture (wmOperatorType *ot)
 
void SCULPT_OT_trim_polyline_gesture (wmOperatorType *ot)
 
static void update_normals (gesture::GestureData &gesture_data)
 
static void get_origin_and_normal (gesture::GestureData &gesture_data, float *r_origin, float *r_normal)
 
static void calculate_depth (gesture::GestureData &gesture_data, float &r_depth_front, float &r_depth_back)
 
static float calc_expand_factor (const gesture::GestureData &gesture_data)
 
static Array< float2gesture_to_screen_points (gesture::GestureData &gesture_data)
 
static void generate_geometry (gesture::GestureData &gesture_data)
 
static void gesture_begin (bContext &C, wmOperator &op, gesture::GestureData &gesture_data)
 
static int bm_face_isect_pair (BMFace *f, void *)
 
static void apply_trim (gesture::GestureData &gesture_data)
 
static void gesture_apply_for_symmetry_pass (bContext &, gesture::GestureData &gesture_data)
 
static void free_geometry (gesture::GestureData &gesture_data)
 
static void gesture_end (bContext &, gesture::GestureData &gesture_data)
 
static void init_operation (gesture::GestureData &gesture_data, wmOperator &op)
 
static void operator_properties (wmOperatorType *ot)
 
static bool can_invoke (const bContext &C)
 
static void report_invalid_mode (const blender::bke::pbvh::Type pbvh_type, ReportList &reports)
 
static bool can_exec (const bContext &C, ReportList &reports)
 
static void initialize_cursor_info (bContext &C, const wmOperator &op, gesture::GestureData &gesture_data)
 
static int gesture_box_exec (bContext *C, wmOperator *op)
 
static int gesture_box_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int gesture_lasso_exec (bContext *C, wmOperator *op)
 
static int gesture_lasso_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int gesture_line_exec (bContext *C, wmOperator *op)
 
static int gesture_line_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int gesture_polyline_exec (bContext *C, wmOperator *op)
 
static int gesture_polyline_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 

Variables

static EnumPropertyItem operation_types []
 
static EnumPropertyItem orientation_types []
 
static EnumPropertyItem extrude_modes []
 
static EnumPropertyItem solver_modes []
 

Enumeration Type Documentation

◆ ExtrudeMode

Enumerator
Project 
Fixed 

Definition at line 90 of file sculpt_trim.cc.

◆ OperationType

Enumerator
Intersect 
Difference 
Union 
Join 

Definition at line 48 of file sculpt_trim.cc.

◆ OrientationType

Enumerator
View 
Surface 

Definition at line 72 of file sculpt_trim.cc.

◆ SolverMode

Enumerator
Exact 
Fast 

Definition at line 109 of file sculpt_trim.cc.

Function Documentation

◆ apply_trim()

◆ bm_face_isect_pair()

static int blender::ed::sculpt_paint::trim::bm_face_isect_pair ( BMFace * f,
void *  )
static

Definition at line 531 of file sculpt_trim.cc.

References BM_ELEM_DRAW, and BM_elem_flag_test.

Referenced by apply_trim().

◆ calc_expand_factor()

◆ calculate_depth()

◆ can_exec()

static bool blender::ed::sculpt_paint::trim::can_exec ( const bContext & C,
ReportList & reports )
static

◆ can_invoke()

static bool blender::ed::sculpt_paint::trim::can_invoke ( const bContext & C)
static

◆ free_geometry()

◆ generate_geometry()

◆ gesture_apply_for_symmetry_pass()

◆ gesture_begin()

◆ gesture_box_exec()

◆ gesture_box_invoke()

static int blender::ed::sculpt_paint::trim::gesture_box_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ gesture_end()

◆ gesture_lasso_exec()

◆ gesture_lasso_invoke()

static int blender::ed::sculpt_paint::trim::gesture_lasso_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ gesture_line_exec()

◆ gesture_line_invoke()

static int blender::ed::sculpt_paint::trim::gesture_line_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ gesture_polyline_exec()

◆ gesture_polyline_invoke()

static int blender::ed::sculpt_paint::trim::gesture_polyline_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ gesture_to_screen_points()

◆ get_origin_and_normal()

◆ init_operation()

◆ initialize_cursor_info()

◆ operator_properties()

◆ report_invalid_mode()

static void blender::ed::sculpt_paint::trim::report_invalid_mode ( const blender::bke::pbvh::Type pbvh_type,
ReportList & reports )
static

◆ SCULPT_OT_trim_box_gesture()

◆ SCULPT_OT_trim_lasso_gesture()

◆ SCULPT_OT_trim_line_gesture()

◆ SCULPT_OT_trim_polyline_gesture()

◆ update_normals()

Variable Documentation

◆ extrude_modes

EnumPropertyItem blender::ed::sculpt_paint::trim::extrude_modes[]
static
Initial value:
= {
{int(ExtrudeMode::Project),
"PROJECT",
0,
"Project",
"Align trim geometry with the perspective of the current view for a tapered shape"},
{int(ExtrudeMode::Fixed),
"FIXED",
0,
"Fixed",
"Align trim geometry orthogonally for a shape with 90 degree angles"},
{0, nullptr, 0, nullptr, nullptr},
}
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int

Definition at line 95 of file sculpt_trim.cc.

Referenced by operator_properties().

◆ operation_types

EnumPropertyItem blender::ed::sculpt_paint::trim::operation_types[]
static
Initial value:
= {
{int(OperationType::Difference),
"DIFFERENCE",
0,
"Difference",
"Use a difference boolean operation"},
{int(OperationType::Union), "UNION", 0, "Union", "Use a union boolean operation"},
{int(OperationType::Join),
"JOIN",
0,
"Join",
"Join the new mesh as separate geometry, without performing any boolean operation"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 57 of file sculpt_trim.cc.

Referenced by operator_properties().

◆ orientation_types

EnumPropertyItem blender::ed::sculpt_paint::trim::orientation_types[]
static
Initial value:
= {
{int(OrientationType::View),
"VIEW",
0,
"View",
"Use the view to orientate the trimming shape"},
{int(OrientationType::Surface),
"SURFACE",
0,
"Surface",
"Use the surface normal to orientate the trimming shape"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 76 of file sculpt_trim.cc.

Referenced by operator_properties().

◆ solver_modes

EnumPropertyItem blender::ed::sculpt_paint::trim::solver_modes[]
static
Initial value:
= {
{int(SolverMode::Exact), "EXACT", 0, "Exact", "Use the exact boolean solver"},
{int(SolverMode::Fast), "FAST", 0, "Fast", "Use the fast float boolean solver"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 114 of file sculpt_trim.cc.

Referenced by operator_properties().