|
Blender V4.3
|
Classes | |
| struct | GestureData |
| struct | LassoData |
| struct | LineData |
| struct | Operation |
Enumerations | |
| enum | ShapeType { Box = 0 , Lasso = 1 , Line = 2 } |
| enum class | SelectionType { Inside = 0 , Outside = 1 } |
Functions | |
| void | operator_properties (wmOperatorType *ot, ShapeType shapeType) |
| static void | init_common (bContext *C, wmOperator *op, GestureData &gesture_data) |
| static void | lasso_px_cb (int x, int x_end, int y, void *user_data) |
| std::unique_ptr< GestureData > | init_from_polyline (bContext *C, wmOperator *op) |
| std::unique_ptr< GestureData > | init_from_lasso (bContext *C, wmOperator *op) |
| std::unique_ptr< GestureData > | init_from_box (bContext *C, wmOperator *op) |
| static void | line_plane_from_tri (float *r_plane, GestureData &gesture_data, const bool flip, const float p1[3], const float p2[3], const float p3[3]) |
| static void | line_calculate_plane_points (GestureData &gesture_data, float line_points[2][2], float r_plane_points[4][3], float r_offset_plane_points[2][3]) |
| std::unique_ptr< GestureData > | init_from_line (bContext *C, wmOperator *op) |
| static void | flip_plane (float out[4], const float in[4], const char symm) |
| static void | flip_for_symmetry_pass (GestureData &gesture_data, const ePaintSymmetryFlags symmpass) |
| static void | update_affected_nodes_by_line_plane (GestureData &gesture_data) |
| static void | update_affected_nodes_by_clip_planes (GestureData &gesture_data) |
| static void | update_affected_nodes (GestureData &gesture_data) |
| static bool | is_affected_lasso (const GestureData &gesture_data, const float3 &position) |
| bool | is_affected (const GestureData &gesture_data, const float3 &position, const float3 &normal) |
| void | filter_factors (const GestureData &gesture_data, const Span< float3 > positions, const Span< float3 > normals, const MutableSpan< float > factors) |
| void | apply (bContext &C, GestureData &gesture_data, wmOperator &op) |
|
strong |
| Enumerator | |
|---|---|
| Inside | |
| Outside | |
Definition at line 38 of file sculpt_gesture.hh.
| Enumerator | |
|---|---|
| Box | |
| Lasso | |
| Line | |
Definition at line 29 of file sculpt_gesture.hh.
| void blender::ed::sculpt_paint::gesture::apply | ( | bContext & | C, |
| GestureData & | gesture_data, | ||
| wmOperator & | op ) |
Definition at line 457 of file sculpt_gesture.cc.
References blender::ed::sculpt_paint::gesture::Operation::apply_for_symmetry_pass, blender::ed::sculpt_paint::gesture::Operation::begin, blender::ed::sculpt_paint::gesture::Operation::end, flip_for_symmetry_pass(), blender::ed::sculpt_paint::gesture::GestureData::operation, SCULPT_is_symmetry_iteration_valid(), SCULPT_tag_update_overlays(), blender::ed::sculpt_paint::gesture::GestureData::symm, and update_affected_nodes().
Referenced by blender::ed::sculpt_paint::trim::gesture_box_exec(), blender::ed::sculpt_paint::trim::gesture_lasso_exec(), blender::ed::sculpt_paint::project::gesture_line_exec(), blender::ed::sculpt_paint::trim::gesture_line_exec(), and blender::ed::sculpt_paint::trim::gesture_polyline_exec().
| void blender::ed::sculpt_paint::gesture::filter_factors | ( | const GestureData & | gesture_data, |
| const Span< float3 > | positions, | ||
| const Span< float3 > | normals, | ||
| const MutableSpan< float > | factors ) |
Definition at line 445 of file sculpt_gesture.cc.
References filter_factors(), and is_affected().
Referenced by blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), and filter_factors().
|
static |
Definition at line 308 of file sculpt_gesture.cc.
References blender::ed::sculpt_paint::gesture::GestureData::clip_planes, flip_plane(), blender::ed::sculpt_paint::gesture::GestureData::line, negate_m4(), blender::ed::sculpt_paint::gesture::LineData::plane, blender::ed::sculpt_paint::gesture::LineData::side_plane, blender::ed::sculpt_paint::symmetry_flip(), blender::ed::sculpt_paint::gesture::GestureData::symmpass, blender::ed::sculpt_paint::gesture::GestureData::true_clip_planes, blender::ed::sculpt_paint::gesture::LineData::true_plane, blender::ed::sculpt_paint::gesture::LineData::true_side_plane, blender::ed::sculpt_paint::gesture::GestureData::true_view_normal, blender::ed::sculpt_paint::gesture::GestureData::true_view_origin, blender::ed::sculpt_paint::gesture::GestureData::view_normal, and blender::ed::sculpt_paint::gesture::GestureData::view_origin.
Referenced by apply().
|
static |
Definition at line 284 of file sculpt_gesture.cc.
References PAINT_SYMM_X, PAINT_SYMM_Y, and PAINT_SYMM_Z.
Referenced by flip_for_symmetry_pass().
|
static |
Definition at line 60 of file sculpt_gesture.cc.
References copy_m3_m4(), copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_view3d_viewcontext_init(), blender::ed::sculpt_paint::gesture::GestureData::front_faces_only, Inside, mul_m3_v3(), normalize_v3_v3(), ViewContext::obact, wmOperator::ptr, RNA_boolean_get(), ViewContext::rv3d, Object::sculpt, SCULPT_mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::gesture::GestureData::selection_type, blender::ed::sculpt_paint::gesture::GestureData::ss, blender::ed::sculpt_paint::gesture::GestureData::symm, blender::ed::sculpt_paint::gesture::GestureData::true_view_normal, blender::ed::sculpt_paint::gesture::GestureData::true_view_origin, blender::ed::sculpt_paint::gesture::GestureData::vc, RegionView3D::viewinv, blender::ed::sculpt_paint::gesture::GestureData::world_space_view_normal, and blender::ed::sculpt_paint::gesture::GestureData::world_space_view_origin.
Referenced by init_from_box(), init_from_lasso(), and init_from_line().
| std::unique_ptr< GestureData > blender::ed::sculpt_paint::gesture::init_from_box | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 153 of file sculpt_gesture.cc.
References Box, ED_view3d_clipping_calc(), init_common(), WM_operator_properties_border_to_rcti(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blender::ed::sculpt_paint::trim::gesture_box_exec().
| std::unique_ptr< GestureData > blender::ed::sculpt_paint::gesture::init_from_lasso | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 107 of file sculpt_gesture.cc.
References BLI_bitmap_draw_2d_poly_v2i_n(), BLI_lasso_boundbox(), ED_view3d_clipping_calc(), ED_view3d_ob_project_mat_get(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), init_common(), Lasso, lasso_px_cb(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), and WM_gesture_lasso_path_to_array().
Referenced by blender::ed::sculpt_paint::trim::gesture_lasso_exec(), and init_from_polyline().
| std::unique_ptr< GestureData > blender::ed::sculpt_paint::gesture::init_from_line | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 227 of file sculpt_gesture.cc.
References init_common(), Line, line_calculate_plane_points(), line_plane_from_tri(), wmOperator::ptr, RNA_boolean_get(), and RNA_int_get().
Referenced by blender::ed::sculpt_paint::project::gesture_line_exec(), and blender::ed::sculpt_paint::trim::gesture_line_exec().
| std::unique_ptr< GestureData > blender::ed::sculpt_paint::gesture::init_from_polyline | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 102 of file sculpt_gesture.cc.
References init_from_lasso().
Referenced by blender::ed::sculpt_paint::trim::gesture_polyline_exec().
| bool blender::ed::sculpt_paint::gesture::is_affected | ( | const GestureData & | gesture_data, |
| const float3 & | position, | ||
| const float3 & | normal ) |
Definition at line 417 of file sculpt_gesture.cc.
References blender::ed::sculpt_paint::gesture::GestureData::clip_planes, blender::math::dot(), blender::ed::sculpt_paint::gesture::GestureData::front_faces_only, is_affected(), is_affected_lasso(), isect_point_planes_v3(), blender::ed::sculpt_paint::gesture::GestureData::line, blender::ed::sculpt_paint::gesture::LineData::plane, plane_point_side_v3(), blender::ed::sculpt_paint::gesture::GestureData::selection_type, blender::ed::sculpt_paint::gesture::GestureData::shape_type, blender::ed::sculpt_paint::gesture::LineData::side_plane, blender::ed::sculpt_paint::gesture::LineData::use_side_planes, and blender::ed::sculpt_paint::gesture::GestureData::view_normal.
Referenced by filter_factors(), and is_affected().
|
static |
Definition at line 385 of file sculpt_gesture.cc.
References BLI_assert_unreachable, BLI_rcti_isect_pt(), blender::ed::sculpt_paint::gesture::LassoData::boundbox, ED_view3d_project_float_v2_m4(), is_affected_lasso(), blender::ed::sculpt_paint::gesture::GestureData::lasso, blender::ed::sculpt_paint::gesture::LassoData::mask_px, blender::ed::sculpt_paint::gesture::LassoData::projviewobjmat, ViewContext::region, blender::ed::sculpt_paint::gesture::GestureData::selection_type, blender::ed::sculpt_paint::symmetry_flip(), blender::ed::sculpt_paint::gesture::GestureData::symmpass, blender::ed::sculpt_paint::gesture::GestureData::vc, blender::ed::sculpt_paint::gesture::LassoData::width, rcti::xmin, and rcti::ymin.
Referenced by is_affected(), and is_affected_lasso().
|
static |
Definition at line 91 of file sculpt_gesture.cc.
References blender::ed::sculpt_paint::gesture::GestureData::lasso, blender::ed::sculpt_paint::gesture::LassoData::mask_px, and blender::ed::sculpt_paint::gesture::LassoData::width.
Referenced by init_from_lasso().
|
static |
Definition at line 203 of file sculpt_gesture.cc.
References add_v3_v3v3(), ED_view3d_win_to_3d(), madd_v3_v3v3fl(), normal_tri_v3(), ViewContext::region, blender::ed::sculpt_paint::gesture::GestureData::true_view_normal, blender::ed::sculpt_paint::gesture::GestureData::true_view_origin, ViewContext::v3d, and blender::ed::sculpt_paint::gesture::GestureData::vc.
Referenced by init_from_line().
|
static |
Definition at line 183 of file sculpt_gesture.cc.
References mul_v3_fl(), mul_v3_m4v3(), mul_v3_mat3_m4v3(), normal_tri_v3(), ViewContext::obact, plane_from_point_normal_v3(), and blender::ed::sculpt_paint::gesture::GestureData::vc.
Referenced by init_from_line().
| void blender::ed::sculpt_paint::gesture::operator_properties | ( | wmOperatorType * | ot, |
| ShapeType | shapeType ) |
Definition at line 42 of file sculpt_gesture.cc.
References Line, ot, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_box_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_lasso_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_line_gesture(), and blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture().
|
static |
Definition at line 372 of file sculpt_gesture.cc.
References blender::ed::sculpt_paint::gesture::GestureData::shape_type, update_affected_nodes(), update_affected_nodes_by_clip_planes(), and update_affected_nodes_by_line_plane().
Referenced by apply(), and update_affected_nodes().
|
static |
Definition at line 342 of file sculpt_gesture.cc.
References BLI_assert_unreachable, blender::ed::sculpt_paint::gesture::GestureData::clip_planes, copy_m4_m4(), negate_m4(), blender::ed::sculpt_paint::gesture::GestureData::node_mask, blender::ed::sculpt_paint::gesture::GestureData::node_mask_memory, ViewContext::obact, blender::bke::object::pbvh_get(), PBVHFrustumPlanes::planes, blender::bke::pbvh::search_nodes(), and blender::ed::sculpt_paint::gesture::GestureData::vc.
Referenced by update_affected_nodes().
|
static |
Definition at line 324 of file sculpt_gesture.cc.
References copy_v4_v4(), blender::ed::sculpt_paint::gesture::GestureData::line, blender::ed::sculpt_paint::gesture::GestureData::node_mask, blender::ed::sculpt_paint::gesture::GestureData::node_mask_memory, ViewContext::obact, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::gesture::LineData::plane, PBVHFrustumPlanes::planes, blender::bke::pbvh::search_nodes(), blender::ed::sculpt_paint::gesture::LineData::side_plane, blender::ed::sculpt_paint::gesture::LineData::use_side_planes, and blender::ed::sculpt_paint::gesture::GestureData::vc.
Referenced by update_affected_nodes().