|
Blender V4.5
|
Namespaces | |
| namespace | expand |
| namespace | filter |
| namespace | undo |
| namespace | face_set |
| namespace | brushes |
| namespace | select_random |
| namespace | select_grow |
| namespace | min_distance_edit |
| namespace | greasepencil |
| namespace | auto_mask |
| namespace | tests |
| namespace | canvas |
| namespace | hide |
| namespace | image |
| namespace | vwpaint |
| namespace | mask |
| namespace | boundary |
| namespace | dyntopo |
| namespace | islands |
| namespace | cloth |
| namespace | color |
| namespace | flood_fill |
| namespace | geodesic |
| namespace | gesture |
| namespace | pose |
| namespace | project |
| namespace | trim |
| namespace | paint |
| namespace | smooth |
Typedefs | |
| using | DeltaProjectionFunc |
| using | StrokeGetLocation |
| using | StrokeTestStart = bool (*)(bContext *C, wmOperator *op, const float mouse[2]) |
| using | StrokeUpdateStep |
| using | StrokeRedraw = void (*)(const bContext *C, PaintStroke *stroke, bool final) |
| using | StrokeDone = void (*)(const bContext *C, PaintStroke *stroke) |
| using | BrushActionFunc |
| using | BMeshNeighborVerts = Vector<BMVert *, 64> |
Enumerations | |
| enum class | PaintCursorDrawingType { Curve , Cursor2D , Cursor3D } |
| enum class | UpdateType { Position , Mask , Visibility , Color , Image , FaceSet } |
| enum class | TransformDisplacementMode { Original = 0 , Incremental = 1 } |
| enum class | PivotPositionMode { Origin = 0 , Unmasked = 1 , MaskBorder = 2 , ActiveVert = 3 , CursorSurface = 4 } |
Variables | |
| constexpr int | AntiAliasingSamplesPerTexelAxisMin = 3 |
| constexpr int | AntiAliasingSamplesPerTexelAxisMax = 16 |
| constexpr int | CurveSamplesBaseLen = 1024 |
| Number of samples to use between 0..1. | |
| constexpr int | CurveSamplesLen = M_SQRT2 * CurveSamplesBaseLen + 1 |
| Number of samples to store in the cache. | |
| static constexpr int | plane_brush_max_rolling_average_num = 20 |
| static constexpr float | transform_mirror_max_distance_eps = 0.00002f |
| static EnumPropertyItem | prop_sculpt_pivot_position_types [] |
The code below uses a suffix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a prefix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a prefix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a suffix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. wo: World space. re: 2D coordinates within the region.
The code below uses a suffix naming convention to indicate the coordinate space:
The code below uses a prefix naming convention to indicate the coordinate space:
| using blender::ed::sculpt_paint::BMeshNeighborVerts = Vector<BMVert *, 64> |
Definition at line 571 of file sculpt_intern.hh.
Projects a screen-space displacement vector into layer space. Current position (in layer space) is used to compute the perspective distance (zfac). Returns the new layer space position with the projected delta applied.
Definition at line 33 of file grease_pencil_intern.hh.
| using blender::ed::sculpt_paint::StrokeDone = void (*)(const bContext *C, PaintStroke *stroke) |
Callback function for cleaning up and finalizing data after a stroke has finished.
Definition at line 109 of file paint_intern.hh.
Callback function to retrieve the object space coordinates based on screen space coordinates.
| location | resulting object space coordinates |
Definition at line 82 of file paint_intern.hh.
| using blender::ed::sculpt_paint::StrokeRedraw = void (*)(const bContext *C, PaintStroke *stroke, bool final) |
Callback function for performing necessary redraw functions based on the stroke.
Definition at line 104 of file paint_intern.hh.
| using blender::ed::sculpt_paint::StrokeTestStart = bool (*)(bContext *C, wmOperator *op, const float mouse[2]) |
Callback function to determine whether a stroke has started, and performing initialization.
In many cases, this is a check to whether the stroke is over the active mesh.
Definition at line 91 of file paint_intern.hh.
Callback function for performing a paint stroke for a new step.
Definition at line 96 of file paint_intern.hh.
|
strong |
| Enumerator | |
|---|---|
| Cancel | |
| Confirm | |
| ExtensionModeToggle | |
| ExtensionLengthen | |
| ExtensionShorten | |
| ExtensionDrag | |
| ExtensionCollide | |
| Invert | |
| Precision | |
Definition at line 1601 of file grease_pencil_draw_ops.cc.
| Enumerator | |
|---|---|
| Curve | |
| Cursor2D | |
| Cursor3D | |
Definition at line 1258 of file paint_cursor.cc.
|
strong |
| Enumerator | |
|---|---|
| Origin | |
| Unmasked | |
| MaskBorder | |
| ActiveVert | |
| CursorSurface | |
Definition at line 601 of file sculpt_transform.cc.
| Enumerator | |
|---|---|
| Original | |
| Incremental | |
Definition at line 139 of file sculpt_intern.hh.
|
strong |
| Enumerator | |
|---|---|
| Position | |
| Mask | |
| Visibility | |
| Color | |
| Image | |
| FaceSet | |
Definition at line 117 of file sculpt_intern.hh.
|
static |
Definition at line 35 of file paint_image_2d_curve_mask.cc.
References AntiAliasingSamplesPerTexelAxisMax, AntiAliasingSamplesPerTexelAxisMin, BRUSH_PAINT_ANTIALIASING, clamp_i(), and Brush::sampling_flag.
Referenced by update_curve_mask().
|
static |
Definition at line 1330 of file sculpt.cc.
References area_center_calc_weighted(), blender::ed::sculpt_paint::AreaNormalCenterData::area_cos, blender::ed::sculpt_paint::AreaNormalCenterData::count_co, and distance().
Referenced by calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 1342 of file sculpt.cc.
References area_normal_calc_weight(), blender::ed::sculpt_paint::AreaNormalCenterData::area_nos, blender::ed::sculpt_paint::AreaNormalCenterData::count_no, and distance().
Referenced by calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
|
inline |
Definition at line 451 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::mesh::face_find_adjacent_verts(), faces, i, blender::Span< T >::is_empty(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by calc_vert_neighbors(), and calc_vert_neighbors_interior_impl().
| void blender::ed::sculpt_paint::apply_crazyspace_to_translations | ( | Span< float3x3 > | deform_imats, |
| Span< int > | verts, | ||
| MutableSpan< float3float3 > | translations ) |
Rotate translations to account for rotations from procedural deformation.
Definition at line 7305 of file sculpt.cc.
References apply_crazyspace_to_translations(), BLI_assert, i, blender::MutableSpan< T >::size(), blender::math::transform_point(), and verts.
Referenced by apply_crazyspace_to_translations(), blender::ed::sculpt_paint::PositionDeformData::deform(), and blender::ed::sculpt_paint::undo::restore_position_from_undo_step().
|
inline |
Definition at line 336 of file mesh_brush_common.hh.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::hardness, and blender::ed::sculpt_paint::StrokeCache::radius.
| void blender::ed::sculpt_paint::apply_hardness_to_distances | ( | float | radius, |
| float | hardness, | ||
| MutableSpan< float > | distances ) |
Scale the distances based on the brush radius and the cached "hardness" setting, which increases the strength of the effect for vertices towards the outside of the radius.
Definition at line 7140 of file sculpt.cc.
References apply_hardness_to_distances(), i, blender::MutableSpan< T >::index_range(), and blender::math::rcp().
Referenced by apply_hardness_to_distances(), apply_hardness_to_distances(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_mesh().
|
static |
Definition at line 350 of file sculpt_transform.cc.
References BKE_kelvinlet_grab_triscale(), BLI_NOINLINE, i, blender::Span< T >::index_range(), and params.
Referenced by elastic_transform_node_bmesh(), elastic_transform_node_grids(), and elastic_transform_node_mesh().
| void blender::ed::sculpt_paint::apply_translations | ( | Span< float3float3 > | translations, |
| const Set< BMVert *, 0 > & | verts ) |
Definition at line 7280 of file sculpt.cc.
References add_v3_v3(), apply_translations(), BLI_assert, blender::Span< T >::cast(), contains_nan(), i, blender::Span< T >::size(), and verts.
| void blender::ed::sculpt_paint::apply_translations | ( | Span< float3float3 > | translations, |
| Span< int > | grids, | ||
| SubdivCCG & | subdiv_ccg ) |
Definition at line 7262 of file sculpt.cc.
References apply_translations(), BKE_subdiv_ccg_key_top_level(), BLI_assert, blender::Span< T >::cast(), contains_nan(), CCGKey::grid_area, blender::bke::ccg::grid_range(), i, blender::MutableSpan< T >::index_range(), blender::Span< T >::index_range(), SubdivCCG::positions, blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
| void blender::ed::sculpt_paint::apply_translations | ( | Span< float3float3 > | translations, |
| Span< int > | verts, | ||
| MutableSpan< float3float3 > | positions ) |
Many brushes end up calculating translations from the original positions. Instead of applying these directly to the modified values, it's helpful to process them separately to easily calculate various effects like clipping. After they are processed, this function can be used to simply add them to the final vertex positions.
Definition at line 7249 of file sculpt.cc.
References apply_translations(), BLI_assert, blender::Span< T >::cast(), contains_nan(), i, blender::Span< T >::size(), and verts.
Referenced by blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), apply_translations(), apply_translations(), apply_translations(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::PositionDeformData::deform(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), transform_node_bmesh(), and transform_node_grids().
|
static |
Definition at line 1317 of file sculpt.cc.
References distance().
Referenced by accumulate_area_center().
|
static |
Definition at line 1281 of file sculpt.cc.
References SculptSession::cache, SculptSession::cursor_radius, Brush::normal_radius_factor, Brush::ob_mode, OB_MODE_SCULPT, and blender::ed::sculpt_paint::StrokeCache::radius.
Referenced by calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 1290 of file sculpt.cc.
References Brush::area_radius_factor, BRUSH_AREA_RADIUS_PRESSURE, SculptSession::cache, SculptSession::cursor_radius, Brush::flag2, Brush::normal_radius_factor, Brush::ob_mode, OB_MODE_SCULPT, blender::ed::sculpt_paint::StrokeCache::pressure, blender::ed::sculpt_paint::StrokeCache::radius, Brush::sculpt_brush_type, and SCULPT_BRUSH_TYPE_PLANE.
Referenced by calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), and calc_area_normal_and_center_node_mesh().
|
static |
Definition at line 1310 of file sculpt.cc.
References distance().
Referenced by accumulate_area_normal().
|
static |
Definition at line 5221 of file sculpt.cc.
References attribute_matches(), b, blender::bke::AttributeAccessor::lookup(), and blender::bke::GAttributeReader::sharing_info.
Referenced by attribute_matches(), store_mesh_from_eval(), and topology_matches().
|
static |
Definition at line 792 of file sculpt_transform.cc.
References average_mask_border_position(), combine_average_position_accumulation(), depsgraph, blender::bke::pbvh::Grids, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), blender::bke::pbvh::Mesh, node_fully_masked_or_hidden(), blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, blender::math::safe_divide(), blender::bke::pbvh::search_nodes(), SculptSession::subdiv_ccg, sum(), blender::bke::pbvh::Tree::type(), and blender::bke::pbvh::vert_positions_eval().
Referenced by average_mask_border_position(), and set_pivot_position_exec().
|
static |
Definition at line 670 of file sculpt_transform.cc.
References combine_average_position_accumulation(), depsgraph, blender::bke::pbvh::Grids, blender::index_mask::IndexMask::index_range(), blender::bke::pbvh::Mesh, node_fully_masked_or_hidden(), blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::math::safe_divide(), blender::bke::pbvh::search_nodes(), SculptSession::subdiv_ccg, sum(), blender::bke::pbvh::Tree::type(), and blender::bke::pbvh::vert_positions_eval().
Referenced by set_pivot_position_exec().
|
static |
Definition at line 53 of file brush_asset_ops.cc.
References blender::asset_system::all_library_reference(), blender::bke::asset_edit_id_from_weak_reference(), BKE_paint_get_active_from_context(), BKE_paint_previous_asset_reference_clear(), BKE_paint_previous_asset_reference_set(), BKE_report(), BLI_assert, C, CTX_data_main(), G, ID_BR, NA_ACTIVATED, NC_ASSET, NC_SCENE, ND_TOOLSETTINGS, blender::ed::asset::operator_asset_reference_props_get_asset_from_all_library(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_WARNING, blender::ed::asset::list::storage_fetch_blocking(), WM_main_add_notifier(), and WM_toolsystem_activate_brush_and_tool().
Referenced by BRUSH_OT_asset_activate().
|
static |
Definition at line 600 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_delete(), BKE_paint_brush(), BKE_paint_brush_set_default(), BKE_paint_get_active_from_context(), BKE_preferences_asset_library_find_by_name(), C, CTX_data_main(), Brush::id, NA_EDITED, NA_REMOVED, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, OPERATOR_FINISHED, blender::ed::asset::refresh_asset_library(), wmOperator::reports, U, and WM_main_add_notifier().
Referenced by BRUSH_OT_asset_delete().
|
static |
Definition at line 625 of file brush_asset_ops.cc.
References ALERT_ICON_WARNING, BKE_paint_brush(), BKE_paint_get_active_from_context(), C, ID_IS_LINKED, IFACE_, and WM_operator_confirm_ex().
Referenced by BRUSH_OT_asset_delete().
|
static |
Definition at line 581 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_writable(), BKE_paint_brush(), BKE_paint_get_active_from_context(), C, CTX_wm_operator_poll_msg_set(), Brush::id, and ID_IS_LINKED.
Referenced by BRUSH_OT_asset_delete().
|
static |
Definition at line 369 of file brush_asset_ops.cc.
References ID::asset_data, blender::bke::asset_edit_id_save(), AssetMetaData::author, BKE_asset_metadata_catalog_id_set(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BLI_assert, C, blender::asset_system::AssetCatalog::catalog_id, blender::ed::asset::catalogs_save_from_asset_reference(), CTX_data_main(), AssetMetaData::description, blender::ed::asset::find_asset_from_weak_ref(), Brush::id, ID_IS_ASSET, blender::ed::asset::library_ensure_catalogs_in_path(), MAX_NAME, MEM_SAFE_FREE, NA_EDITED, NC_ASSET, ND_ASSET_LIST, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, blender::ed::asset::refresh_asset_library_from_asset(), wmOperator::reports, RNA_string_get(), RNA_string_get_alloc(), blender::asset_system::AssetCatalog::simple_name, and WM_main_add_notifier().
Referenced by BRUSH_OT_asset_edit_metadata().
|
static |
Definition at line 411 of file brush_asset_ops.cc.
References AssetMetaData::author, BKE_paint_get_active_from_context(), C, AssetMetaData::catalog_id, blender::asset_system::AssetLibrary::catalog_service(), AssetMetaData::description, blender::ed::asset::find_asset_from_weak_ref(), blender::asset_system::AssetCatalogService::find_catalog(), IFACE_, OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_string_set(), RNA_struct_property_is_set(), and WM_operator_props_dialog_popup().
Referenced by BRUSH_OT_asset_edit_metadata().
|
static |
Definition at line 463 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_writable(), ASSET_LIBRARY_LOCAL, BKE_paint_brush(), BKE_paint_get_active_from_context(), BLI_assert_unreachable, C, CTX_wm_operator_poll_msg_set(), CTX_wm_reports(), blender::ed::asset::find_asset_from_weak_ref(), Brush::id, ID_IS_ASSET, and library_is_editable().
Referenced by BRUSH_OT_asset_edit_metadata(), and BRUSH_OT_asset_load_preview().
|
static |
Definition at line 520 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_save(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_previewimg_id_custom_set(), BKE_reportf(), BLI_assert, BLI_is_file(), C, CTX_data_main(), FILE_MAX, blender::ed::asset::find_asset_from_weak_ref(), Brush::id, ID_IS_ASSET, NA_EDITED, NC_ASSET, ND_ASSET_LIST, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, blender::ed::asset::refresh_asset_library_from_asset(), wmOperator::reports, RNA_string_get(), RPT_ERROR, and WM_main_add_notifier().
Referenced by brush_asset_load_preview_invoke(), and BRUSH_OT_asset_load_preview().
|
static |
Definition at line 552 of file brush_asset_ops.cc.
References brush_asset_load_preview_exec(), C, wmOperator::ptr, RNA_struct_property_is_set(), and WM_operator_filesel().
Referenced by BRUSH_OT_asset_load_preview().
|
static |
Definition at line 762 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_revert(), BKE_paint_brush(), BKE_paint_brush_set(), BKE_paint_brush_set_default(), BKE_paint_get_active_from_context(), BLI_assert, C, CTX_data_main(), GS, Brush::id, ID_BR, NA_EDITED, NC_BRUSH, NC_TEXTURE, ND_NODES, OPERATOR_FINISHED, wmOperator::reports, and WM_main_add_notifier().
Referenced by BRUSH_OT_asset_revert().
|
static |
Definition at line 740 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_editable(), ASSET_LIBRARY_LOCAL, BKE_paint_brush(), BKE_paint_get_active_from_context(), BLI_assert_unreachable, C, CTX_wm_operator_poll_msg_set(), get_asset_library_reference(), and Brush::id.
Referenced by BRUSH_OT_asset_revert().
|
static |
Definition at line 149 of file brush_asset_ops.cc.
References AS_asset_library_load(), ID::asset_data, blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_save_as(), ASSET_LIBRARY_LOCAL, BKE_asset_metadata_catalog_id_set(), BKE_asset_metadata_copy(), BKE_asset_metadata_free(), BKE_brush_duplicate(), BKE_libblock_rename(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_report(), BLI_assert, C, blender::asset_system::AssetCatalog::catalog_id, blender::asset_system::AssetLibrary::catalog_service(), CTX_data_main(), blender::asset_system::current_file_library_reference(), blender::ed::asset::generate_preview(), blender::ed::asset::get_asset_library_from_opptr(), Brush::has_unsaved_changes, Brush::id, ID_BR, ID_IS_ASSET, LIB_ID_DUPLICATE_IS_ROOT_ID, blender::ed::asset::library_ensure_catalogs_in_path(), blender::ed::asset::mark_id(), MAX_NAME, NA_ADDED, NA_EDITED, ID::name, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, blender::ed::asset::refresh_asset_library(), wmOperator::reports, RNA_enum_get(), RNA_property_is_set(), RNA_property_string_get(), RNA_string_get(), RNA_struct_find_property(), RPT_ERROR, RPT_WARNING, blender::ed::asset::shelf::show_catalog_in_visible_shelves(), blender::asset_system::AssetCatalog::simple_name, STRNCPY(), ID::us, USER_DUP_LINKED_ID, USER_DUP_OBDATA, blender::ed::asset::user_library_to_library_ref(), WM_file_tag_modified(), WM_main_add_notifier(), WM_toolsystem_activate_brush_and_tool(), and blender::asset_system::AssetCatalogService::write_to_disk().
Referenced by BRUSH_OT_asset_save_as().
|
static |
Definition at line 266 of file brush_asset_ops.cc.
References BKE_paint_get_active_from_context(), BLI_assert_unreachable, C, blender::asset_system::AssetLibrary::catalog_service(), blender::ed::asset::find_asset_from_weak_ref(), blender::asset_system::AssetCatalogService::find_catalog(), IFACE_, library_is_editable(), blender::asset_system::AssetLibrary::library_reference(), blender::ed::asset::library_reference_to_enum_value(), OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_enum_set(), RNA_string_set(), RNA_struct_property_is_set(), RNA_struct_property_is_set_ex(), U, blender::ed::asset::user_library_to_library_ref(), and WM_operator_props_dialog_popup().
Referenced by BRUSH_OT_asset_save_as().
|
static |
Definition at line 133 of file brush_asset_ops.cc.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), and C.
Referenced by BRUSH_OT_asset_save_as().
|
static |
Definition at line 705 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_save(), AssetWeakReference::asset_library_identifier, BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_preferences_asset_library_find_by_name(), BLI_assert, C, CTX_data_main(), Brush::has_unsaved_changes, Brush::id, ID_IS_ASSET, NA_EDITED, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::ed::asset::refresh_asset_library(), wmOperator::reports, U, and WM_main_add_notifier().
Referenced by BRUSH_OT_asset_save().
|
static |
Definition at line 677 of file brush_asset_ops.cc.
References blender::bke::asset_edit_id_is_writable(), ASSET_LIBRARY_LOCAL, BKE_paint_brush(), BKE_paint_get_active_from_context(), BLI_assert_unreachable, C, CTX_wm_operator_poll_msg_set(), get_asset_library_reference(), and Brush::id.
Referenced by BRUSH_OT_asset_save().
|
static |
Definition at line 4126 of file sculpt.cc.
References SculptSession::active_vert(), SculptSession::active_vert_position(), add_v3_v3(), UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, blender::math::AxisAngleBase< T, AngleT >::angle(), blender::math::AxisAngleBase< T, AngleT >::axis(), BRUSH_ANCHORED, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, brush_delta_update(), BRUSH_GRAB_ACTIVE_VERTEX, brush_needs_rake_rotation(), brush_uses_topology_rake(), SculptSession::cache, Brush::cloth_deform_type, copy_v2_v2(), copy_v3_v3(), depsgraph, UnifiedPaintSettings::draw_anchored, ED_view3d_win_to_3d(), ELEM, eps, Brush::falloff_shape, Brush::flag, SculptRakeData::follow_co, SculptRakeData::follow_dist, blender::ed::sculpt_paint::StrokeCache::grab_delta, blender::ed::sculpt_paint::StrokeCache::initial_mouse, invert_m4_m4(), is_zero_v3(), len_squared_v3v3(), blender::ed::sculpt_paint::StrokeCache::location, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::StrokeCache::mouse_event, mul_mat3_m4_v3(), mul_v3_m4v3(), need_delta_for_tip_orientation(), need_delta_from_anchored_origin(), normalize_v3(), blender::ed::sculpt_paint::StrokeCache::old_grab_location, blender::ed::sculpt_paint::StrokeCache::orig_grab_location, PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), UnifiedPaintSettings::pixel_radius, project_plane_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::rake_data, rake_data_update(), Brush::rake_factor, blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, ViewContext::region, Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLAY_STRIPS, SCULPT_BRUSH_TYPE_CLAY_THUMB, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, SCULPT_BRUSH_TYPE_NUDGE, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_PINCH, SCULPT_BRUSH_TYPE_PLANE, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_SMEAR, SCULPT_BRUSH_TYPE_SNAKE_HOOK, SCULPT_BRUSH_TYPE_THUMB, SCULPT_RAKE_BRUSH_FACTOR, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), sqrtf, square_f(), sub_v3_v3(), sub_v3_v3v3(), blender::math::to_quaternion(), blender::bke::pbvh::Tree::type(), v2, ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, vert_positions_for_grab_active_get(), blender::ed::sculpt_paint::StrokeCache::view_normal, and zero_v3().
Referenced by brush_delta_update(), and sculpt_update_cache_variants().
|
static |
Definition at line 4067 of file sculpt.cc.
References brush_dynamic_size_get(), blender::ed::sculpt_paint::brushes::clay_thumb_get_stabilized_pressure(), max_ff(), pow3f(), powf, blender::ed::sculpt_paint::StrokeCache::pressure, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLAY, SCULPT_BRUSH_TYPE_CLAY_STRIPS, and SCULPT_BRUSH_TYPE_CLAY_THUMB.
Referenced by brush_dynamic_size_get(), and sculpt_update_cache_variants().
|
static |
Definition at line 5560 of file sculpt.cc.
References BKE_brush_mask_texture_get(), BKE_paint_brush(), brush_exit_tex(), Tex::nodetree, ntreeTexEndExecTree(), OB_MODE_SCULPT, Sculpt::paint, bNodeTree::runtime, and MTex::tex.
Referenced by brush_exit_tex(), sculpt_brush_stroke_cancel(), and stroke_done().
|
static |
Definition at line 830 of file sculpt.cc.
References Brush::rake_factor, and blender::bke::brush::supports_rake_factor().
Referenced by brush_delta_update().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_activate | ( | wmOperatorType * | ot | ) |
Definition at line 115 of file brush_asset_ops.cc.
References brush_asset_activate_exec(), blender::ed::asset::operator_asset_reference_props_register(), ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), and RNA_def_property_flag().
Referenced by ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_delete | ( | wmOperatorType * | ot | ) |
Definition at line 644 of file brush_asset_ops.cc.
References brush_asset_delete_exec(), brush_asset_delete_invoke(), brush_asset_delete_poll(), and ot.
Referenced by ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_edit_metadata | ( | wmOperatorType * | ot | ) |
Definition at line 502 of file brush_asset_ops.cc.
References brush_asset_edit_metadata_exec(), brush_asset_edit_metadata_invoke(), brush_asset_edit_metadata_poll(), MAX_NAME, ot, PROP_STRING_SEARCH_SUGGESTION, RNA_def_property_string_search_func_runtime(), RNA_def_string(), and visit_active_library_catalogs_catalog_for_search_fn().
Referenced by ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_load_preview | ( | wmOperatorType * | ot | ) |
Definition at line 562 of file brush_asset_ops.cc.
References brush_asset_edit_metadata_poll(), brush_asset_load_preview_exec(), brush_asset_load_preview_invoke(), FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_IMAGE, ot, WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_revert | ( | wmOperatorType * | ot | ) |
Definition at line 784 of file brush_asset_ops.cc.
References brush_asset_revert_exec(), brush_asset_revert_poll(), and ot.
Referenced by ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_save | ( | wmOperatorType * | ot | ) |
Definition at line 730 of file brush_asset_ops.cc.
References brush_asset_save_exec(), brush_asset_save_poll(), and ot.
Referenced by ED_operatortypes_paint().
| void blender::ed::sculpt_paint::BRUSH_OT_asset_save_as | ( | wmOperatorType * | ot | ) |
Definition at line 344 of file brush_asset_ops.cc.
References brush_asset_save_as_exec(), brush_asset_save_as_invoke(), brush_asset_save_as_poll(), MAX_NAME, ot, PROP_ENUM, PROP_NONE, PROP_STRING_SEARCH_SUGGESTION, rna_asset_library_reference_itemf(), RNA_def_enum_funcs(), RNA_def_property(), RNA_def_property_string_search_func_runtime(), RNA_def_property_ui_text(), RNA_def_string(), and visit_library_prop_catalogs_catalog_for_search_fn().
Referenced by ED_operatortypes_paint().
| float blender::ed::sculpt_paint::brush_plane_offset_get | ( | const Brush & | brush, |
| const SculptSession & | ss ) |
Definition at line 2974 of file sculpt.cc.
References BRUSH_OFFSET_PRESSURE, SculptSession::cache, Brush::flag, Brush::plane_offset, and blender::ed::sculpt_paint::StrokeCache::pressure.
Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), and blender::ed::sculpt_paint::brushes::do_plane_brush().
| float blender::ed::sculpt_paint::brush_radius_factor | ( | const Brush & | brush, |
| const StrokeExtension & | stroke_extension ) |
Definition at line 89 of file curves_sculpt_ops.cc.
References BKE_brush_use_size_pressure(), and blender::ed::sculpt_paint::StrokeExtension::pressure.
Referenced by brush_radius_get(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
| float blender::ed::sculpt_paint::brush_radius_get | ( | const Scene & | scene, |
| const Brush & | brush, | ||
| const StrokeExtension & | stroke_extension ) |
Definition at line 97 of file curves_sculpt_ops.cc.
References BKE_brush_size_get(), and brush_radius_factor().
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), and blender::ed::sculpt_paint::DensityAddOperationExecutor::execute().
| float blender::ed::sculpt_paint::brush_strength_factor | ( | const Brush & | brush, |
| const StrokeExtension & | stroke_extension ) |
Definition at line 104 of file curves_sculpt_ops.cc.
References BKE_brush_use_alpha_pressure(), and blender::ed::sculpt_paint::StrokeExtension::pressure.
Referenced by brush_strength_get().
| float blender::ed::sculpt_paint::brush_strength_get | ( | const Scene & | scene, |
| const Brush & | brush, | ||
| const StrokeExtension & | stroke_extension ) |
Definition at line 112 of file curves_sculpt_ops.cc.
References BKE_brush_alpha_get(), and brush_strength_factor().
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
|
static |
Definition at line 5744 of file sculpt.cc.
References brush_stroke_modal(), C, wmOperator::customdata, and paint_stroke_modal().
Referenced by brush_stroke_modal(), and SCULPT_OT_brush_stroke().
Definition at line 1768 of file paint_stroke.cc.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), C, CTX_data_active_object(), CTX_wm_area(), CTX_wm_region(), ELEM, bToolRef_Runtime::flag, ARegion::regiontype, RGN_TYPE_WINDOW, bToolRef::runtime, ScrArea::runtime, SPACE_IMAGE, SPACE_VIEW3D, ScrArea::spacetype, ScrArea_Runtime::tool, and TOOLREF_FLAG_USE_BRUSHES.
Referenced by paint_brush_cursor_poll(), and paint_brush_tool_poll().
| BLI_INLINE bool blender::ed::sculpt_paint::brush_type_is_attribute_only | ( | const int | tool | ) |
Definition at line 842 of file sculpt_intern.hh.
References BLI_INLINE, brush_type_is_mask(), brush_type_is_paint(), ELEM, and SCULPT_BRUSH_TYPE_DRAW_FACE_SETS.
Referenced by sculpt_brush_stroke_invoke().
|
inline |
Definition at line 837 of file sculpt_intern.hh.
References ELEM, and SCULPT_BRUSH_TYPE_MASK.
Referenced by brush_type_is_attribute_only(), and sculpt_brush_stroke_invoke().
|
inline |
Definition at line 832 of file sculpt_intern.hh.
References ELEM, SCULPT_BRUSH_TYPE_PAINT, and SCULPT_BRUSH_TYPE_SMEAR.
Referenced by brush_stroke_init(), brush_type_is_attribute_only(), push_undo_nodes(), sculpt_brush_stroke_invoke(), sculpt_needs_connectivity_info(), SCULPT_stroke_modifiers_check(), stroke_test_start(), and stroke_update_step().
|
static |
Definition at line 3071 of file sculpt.cc.
References BRUSH_SNAKE_HOOK_DEFORM_ELASTIC, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_SNAKE_HOOK, and Brush::snake_hook_deform_type.
Referenced by calc_brush_node_mask().
|
static |
Definition at line 787 of file sculpt.cc.
References ELEM, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_DRAW_SHARP, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_LAYER, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SMOOTH, and SCULPT_BRUSH_TYPE_THUMB.
Referenced by calc_brush_node_mask(), do_brush_action(), and dynamic_topology_update().
|
static |
Definition at line 801 of file sculpt.cc.
References SculptSession::bm, blender::bke::brush::supports_topology_rake(), and Brush::topology_rake_factor.
Referenced by brush_delta_update(), do_brush_action(), and sculpt_brush_needs_normal().
|
inline |
Definition at line 848 of file sculpt_intern.hh.
References MTex::brush_map_mode, BRUSH_USE_COLOR_AS_DISPLACEMENT, Brush::flag2, Brush::mtex, MTEX_MAP_MODE_AREA, Brush::sculpt_brush_type, and SCULPT_BRUSH_TYPE_DRAW.
Referenced by do_brush_action().
|
static |
Definition at line 4273 of file sculpt.cc.
References BRUSH_PAINT_DENSITY_PRESSURE, BRUSH_PAINT_DENSITY_PRESSURE_INVERT, BRUSH_PAINT_FLOW_PRESSURE, BRUSH_PAINT_FLOW_PRESSURE_INVERT, BRUSH_PAINT_HARDNESS_PRESSURE, BRUSH_PAINT_HARDNESS_PRESSURE_INVERT, BRUSH_PAINT_WET_MIX_PRESSURE, BRUSH_PAINT_WET_MIX_PRESSURE_INVERT, BRUSH_PAINT_WET_PERSISTENCE_PRESSURE, BRUSH_PAINT_WET_PERSISTENCE_PRESSURE_INVERT, cache_paint_invariants_update(), blender::ed::sculpt_paint::StrokeCache::density, Brush::density, blender::ed::sculpt_paint::StrokeCache::flow, Brush::flow, blender::ed::sculpt_paint::StrokeCache::hardness, Brush::hardness, blender::ed::sculpt_paint::StrokeCache::paint_brush, Brush::paint_flags, pow2f(), blender::ed::sculpt_paint::StrokeCache::pressure, blender::ed::sculpt_paint::StrokeCache::wet_mix, Brush::wet_mix, blender::ed::sculpt_paint::StrokeCache::wet_persistence, and Brush::wet_persistence.
Referenced by cache_paint_invariants_update(), and sculpt_update_cache_variants().
| void blender::ed::sculpt_paint::calc_area_center | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | ob, | ||
| const IndexMask & | node_mask, | ||
| float | r_area_co[3] ) |
Definition at line 1712 of file sculpt.cc.
References SculptSession::bm, blender::bke::pbvh::BMesh, calc_area_normal_and_center_reduce(), Object::data, depsgraph, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, Object::sculpt, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), blender::bke::pbvh::Tree::type(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by calc_brush_plane().
| std::optional< float3float3 > blender::ed::sculpt_paint::calc_area_normal | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | ob, | ||
| const IndexMask & | node_mask ) |
Definition at line 1814 of file sculpt.cc.
References SculptSession::bm, blender::bke::pbvh::BMesh, calc_area_normal(), calc_area_normal_and_center_reduce(), Object::data, depsgraph, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, Object::sculpt, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), blender::bke::pbvh::Tree::type(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by blender::ed::sculpt_paint::filter::cache_init(), calc_area_normal(), calc_sculpt_normal(), cursor_geometry_info_update(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), and blender::ed::sculpt_paint::vwpaint::pbvh_gather_generic().
| void blender::ed::sculpt_paint::calc_area_normal_and_center | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | ob, | ||
| const IndexMask & | node_mask, | ||
| float | r_area_no[3], | ||
| float | r_area_co[3] ) |
This calculates flatten center and area normal together, amortizing the memory bandwidth and loop overhead to calculate both at the same time.
Definition at line 2010 of file sculpt.cc.
References SculptSession::bm, blender::bke::pbvh::BMesh, calc_area_normal_and_center(), calc_area_normal_and_center_reduce(), Object::data, depsgraph, blender::index_mask::IndexMask::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, Object::sculpt, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), blender::bke::pbvh::Tree::type(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by calc_area_normal_and_center(), and calc_brush_plane().
|
static |
Definition at line 1551 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, accumulate_area_center(), accumulate_area_normal(), area_normal_and_center_get_normal_radius(), area_normal_and_center_get_position_radius(), BKE_pbvh_bmesh_node_unique_verts(), BKE_pbvh_node_get_bm_orco_data(), BM_elem_flag_test, BM_ELEM_HIDDEN, SculptSession::bm_log, SculptSession::cache, calc_brush_distances_squared(), closest_on_tri_to_point_v3(), SculptSession::cursor_location, SculptSession::cursor_view_normal, distance(), blender::ed::sculpt_paint::SampleLocalData::distances, blender::math::dot(), Brush::falloff_shape, gather_bmesh_positions(), blender::ed::sculpt_paint::undo::has_bmesh_log_entry(), i, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::math::normal_tri(), normals, orig_position_data_gather_bmesh(), blender::ed::sculpt_paint::SampleLocalData::positions, blender::math::rcp(), Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), UNPACK3, verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
|
static |
Definition at line 1445 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, accumulate_area_center(), accumulate_area_normal(), area_normal_and_center_get_normal_radius(), area_normal_and_center_get_position_radius(), BKE_subdiv_ccg_key_top_level(), SculptSession::cache, calc_brush_distances_squared(), SculptSession::cursor_location, SculptSession::cursor_view_normal, distance(), blender::ed::sculpt_paint::SampleLocalData::distances, blender::math::dot(), Brush::falloff_shape, gather_grids_positions(), CCGKey::grid_area, SubdivCCG::grid_hidden, blender::bke::ccg::grid_range(), blender::bke::pbvh::GridsNode::grids(), i, blender::Span< T >::index_range(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, normals, SubdivCCG::normals, orig_position_data_lookup_grids(), blender::ed::sculpt_paint::SampleLocalData::positions, blender::math::rcp(), Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Span< T >::size(), SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
|
static |
Definition at line 1357 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, accumulate_area_center(), accumulate_area_normal(), area_normal_and_center_get_normal_radius(), area_normal_and_center_get_position_radius(), SculptSession::cache, calc_brush_distances_squared(), SculptSession::cursor_location, SculptSession::cursor_view_normal, distance(), blender::ed::sculpt_paint::SampleLocalData::distances, blender::math::dot(), Brush::falloff_shape, i, blender::Span< T >::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, orig_position_data_lookup_mesh(), blender::math::rcp(), Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::bke::pbvh::MeshNode::verts(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
|
static |
Definition at line 1694 of file sculpt.cc.
References blender::ed::sculpt_paint::AreaNormalCenterData::area_cos, blender::ed::sculpt_paint::AreaNormalCenterData::area_nos, b, blender::ed::sculpt_paint::AreaNormalCenterData::count_co, and blender::ed::sculpt_paint::AreaNormalCenterData::count_no.
Referenced by calc_area_center(), calc_area_normal(), and calc_area_normal_and_center().
| void blender::ed::sculpt_paint::calc_brush_cube_distances | ( | const Brush & | brush, |
| const Span< T > | positions, | ||
| const MutableSpan< float > | r_distances ) |
Calculate distances based on a "square" brush tip falloff and ignore vertices that are too far away.
Definition at line 7101 of file sculpt.cc.
References blender::math::abs(), BLI_assert, calc_brush_cube_distances(), blender::math::distance(), i, blender::Span< T >::index_range(), blender::math::reduce_max(), blender::math::safe_rcp(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), T, and Brush::tip_roundness.
Referenced by calc_brush_cube_distances(), calc_brush_cube_distances< float2 >(), calc_brush_cube_distances< float3 >(), and blender::ed::sculpt_paint::color::do_paint_brush_task().
| template void blender::ed::sculpt_paint::calc_brush_cube_distances< float2float2 > | ( | const Brush & | brush, |
| const Span< float2float2 > | positions, | ||
| MutableSpan< float > | r_distances ) |
References calc_brush_cube_distances().
| template void blender::ed::sculpt_paint::calc_brush_cube_distances< float3float3 > | ( | const Brush & | brush, |
| const Span< float3float3 > | positions, | ||
| MutableSpan< float > | r_distances ) |
References calc_brush_cube_distances().
| void blender::ed::sculpt_paint::calc_brush_distances | ( | const SculptSession & | ss, |
| Span< float3float3 > | positions, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Definition at line 7078 of file sculpt.cc.
References calc_brush_distances(), and calc_brush_distances_squared().
| void blender::ed::sculpt_paint::calc_brush_distances | ( | const SculptSession & | ss, |
| Span< float3float3 > | vert_positions, | ||
| Span< int > | vert, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Calculate distances based on the distance from the brush cursor and various other settings. Also ignore vertices that are too far from the cursor.
Definition at line 7039 of file sculpt.cc.
References calc_brush_distances(), calc_brush_distances_squared(), and verts.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_brush_distances(), calc_brush_distances(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and vpaint_do_draw().
| void blender::ed::sculpt_paint::calc_brush_distances_squared | ( | const SculptSession & | ss, |
| Span< float3float3 > | positions, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Definition at line 7051 of file sculpt.cc.
References BLI_assert, SculptSession::cache, calc_brush_distances_squared(), closest_to_plane_normalized_v3(), SculptSession::cursor_location, blender::math::distance_squared(), SculptSession::filter_cache, i, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::location_symm, PAINT_FALLOFF_SHAPE_TUBE, plane_from_point_normal_v3(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::ed::sculpt_paint::filter::Cache::view_normal, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
| void blender::ed::sculpt_paint::calc_brush_distances_squared | ( | const SculptSession & | ss, |
| Span< float3float3 > | positions, | ||
| Span< int > | verts, | ||
| eBrushFalloffShape | falloff_shape, | ||
| MutableSpan< float > | r_distances ) |
Definition at line 7011 of file sculpt.cc.
References BLI_assert, SculptSession::cache, calc_brush_distances_squared(), closest_to_plane_normalized_v3(), SculptSession::cursor_location, blender::math::distance_squared(), SculptSession::filter_cache, i, blender::ed::sculpt_paint::StrokeCache::location_symm, PAINT_FALLOFF_SHAPE_TUBE, plane_from_point_normal_v3(), blender::MutableSpan< T >::size(), verts, blender::ed::sculpt_paint::filter::Cache::view_normal, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_area_normal_and_center_node_bmesh(), calc_area_normal_and_center_node_grids(), calc_area_normal_and_center_node_mesh(), calc_brush_distances(), calc_brush_distances(), calc_brush_distances_squared(), and calc_brush_distances_squared().
|
static |
Definition at line 2605 of file sculpt.cc.
References angle(), SculptSession::cache, calc_local_from_screen(), copy_m4_m4(), copy_v3_v3(), cosf, cross_v3_v3v3(), invert_m4_m4(), blender::ed::sculpt_paint::StrokeCache::location_symm, mul_m4_m4m4(), normalize_m4(), normalize_v3_v3(), blender::ed::sculpt_paint::StrokeCache::radius, Object::runtime, scale_m4_fl(), Object::sculpt, blender::ed::sculpt_paint::StrokeCache::sculpt_normal, sinf, blender::ed::sculpt_paint::StrokeCache::special_rotation, v, and blender::ed::sculpt_paint::StrokeCache::vc.
Referenced by SCULPT_cube_tip_init(), and update_brush_local_mat().
|
static |
Calculates the nodes that a brush will influence.
Definition at line 3105 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, BKE_brush_has_cube_tip(), blender::ed::sculpt_paint::cloth::brush_affected_nodes_gather(), BRUSH_ORIGINAL_NORMAL, brush_type_needs_all_pbvh_nodes(), brush_type_needs_original(), SculptSession::cache, blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), depsgraph, Brush::flag, M_SQRT2, pbvh_gather_generic(), blender::bke::object::pbvh_get(), Sculpt, Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLAY_STRIPS, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_DRAW, SCULPT_BRUSH_TYPE_PLANE, and true.
Referenced by do_brush_action().
| void blender::ed::sculpt_paint::calc_brush_plane | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| Object & | ob, | ||
| const IndexMask & | node_mask, | ||
| float3float3 & | r_area_no, | ||
| float3float3 & | r_area_co ) |
Brushes may behave incorrectly if preserving original plane / normal when this method is not called.
Definition at line 2891 of file sculpt.cc.
References BLI_assert, BRUSH_ORIGINAL_NORMAL, BRUSH_ORIGINAL_PLANE, SculptSession::cache, calc_area_center(), calc_area_normal_and_center(), depsgraph, Brush::falloff_shape, Brush::flag, blender::math::is_zero(), blender::ed::sculpt_paint::StrokeCache::last_center, blender::MatBase< T, NumCol, NumRow, Alignment >::location(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::math::normalize(), PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::StrokeCache::plane_offset, project_plane_v3_v3v3(), Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_PLANE, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, blender::ed::sculpt_paint::StrokeCache::sculpt_normal, Brush::sculpt_plane, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SCULPT_stroke_is_main_symmetry_pass(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, symmetry_flip(), blender::math::transform_direction(), blender::math::transform_point(), blender::ed::sculpt_paint::StrokeCache::view_normal, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and blender::VecBase< T, Size >::xyz().
Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_forces(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), and blender::ed::sculpt_paint::brushes::do_pinch_brush().
| void blender::ed::sculpt_paint::calc_brush_strength_factors | ( | const StrokeCache & | cache, |
| const Brush & | brush, | ||
| Span< float > | distances, | ||
| MutableSpan< float > | factors ) |
Modify the factors based on distances to the brush cursor, using various brush settings.
Definition at line 7167 of file sculpt.cc.
References BKE_brush_calc_curve_factors(), calc_brush_strength_factors(), Brush::curve, Brush::curve_preset, and blender::ed::sculpt_paint::StrokeCache::radius.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_brush_strength_factors(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), and vpaint_do_draw().
| void blender::ed::sculpt_paint::calc_brush_texture_factors | ( | const SculptSession & | ss, |
| const Brush & | brush, | ||
| Span< float3float3 > | positions, | ||
| MutableSpan< float > | factors ) |
Definition at line 7204 of file sculpt.cc.
References BKE_brush_mask_texture_get(), BLI_assert, BLI_task_parallel_thread_id(), calc_brush_texture_factors(), i, blender::Span< T >::index_range(), OB_MODE_SCULPT, sculpt_apply_texture(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), and MTex::tex.
| void blender::ed::sculpt_paint::calc_brush_texture_factors | ( | const SculptSession & | ss, |
| const Brush & | brush, | ||
| Span< float3float3 > | vert_positions, | ||
| Span< int > | vert, | ||
| MutableSpan< float > | factors ) |
Modify brush influence factors to include sampled texture values.
Definition at line 7176 of file sculpt.cc.
References BKE_brush_mask_texture_get(), BLI_assert, BLI_task_parallel_thread_id(), calc_brush_texture_factors(), i, OB_MODE_SCULPT, sculpt_apply_texture(), blender::MutableSpan< T >::size(), MTex::tex, and verts.
Referenced by calc_brush_texture_factors(), calc_brush_texture_factors(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), and blender::ed::sculpt_paint::color::do_smear_brush_task().
| void blender::ed::sculpt_paint::calc_factors_common_bmesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3float3 > | positions, | ||
| bke::pbvh::BMeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6621 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, BKE_pbvh_bmesh_node_unique_verts(), SculptSession::bm, BRUSH_FRONTFACE, SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_bmesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, Brush::falloff_shape, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_bmesh().
| void blender::ed::sculpt_paint::calc_factors_common_from_orig_data_bmesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3float3 > | positions, | ||
| Span< float3float3 > | normals, | ||
| bke::pbvh::BMeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6725 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, BKE_pbvh_bmesh_node_unique_verts(), SculptSession::bm, BRUSH_FRONTFACE, SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_from_orig_data_bmesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, Brush::falloff_shape, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), Brush::flag, normals, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_from_orig_data_bmesh().
| void blender::ed::sculpt_paint::calc_factors_common_from_orig_data_grids | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3float3 > | positions, | ||
| Span< float3float3 > | normals, | ||
| const bke::pbvh::GridsNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6690 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, BRUSH_FRONTFACE, SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_from_orig_data_grids(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), depsgraph, Brush::falloff_shape, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), Brush::flag, blender::bke::pbvh::GridsNode::grids(), normals, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_from_orig_data_grids().
| void blender::ed::sculpt_paint::calc_factors_common_from_orig_data_mesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const MeshAttributeData & | attribute_data, | ||
| Span< float3float3 > | positions, | ||
| Span< float3float3 > | normals, | ||
| const bke::pbvh::MeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6654 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, BRUSH_FRONTFACE, SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_from_orig_data_mesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, Brush::falloff_shape, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, normals, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::bke::pbvh::MeshNode::verts(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_from_orig_data_mesh().
| void blender::ed::sculpt_paint::calc_factors_common_grids | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| Span< float3float3 > | positions, | ||
| const bke::pbvh::GridsNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6587 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, BRUSH_FRONTFACE, SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_grids(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), depsgraph, Brush::falloff_shape, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), Brush::flag, blender::bke::pbvh::GridsNode::grids(), blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_grids().
| void blender::ed::sculpt_paint::calc_factors_common_mesh | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const MeshAttributeData & | attribute_data, | ||
| Span< float3float3 > | positions, | ||
| Span< float3float3 > | vert_normals, | ||
| const bke::pbvh::MeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6552 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, BRUSH_FRONTFACE, SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_mesh(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, Brush::falloff_shape, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::bke::pbvh::MeshNode::verts(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_factors_common_mesh().
| void blender::ed::sculpt_paint::calc_factors_common_mesh_indexed | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const MeshAttributeData & | attribute_data, | ||
| Span< float3float3 > | vert_positions, | ||
| Span< float3float3 > | vert_normals, | ||
| const bke::pbvh::MeshNode & | node, | ||
| MutableSpan< float > | factors, | ||
| MutableSpan< float > | distances ) |
Definition at line 6520 of file sculpt.cc.
References apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, BRUSH_FRONTFACE, SculptSession::cache, calc_brush_distances(), calc_brush_strength_factors(), calc_brush_texture_factors(), calc_factors_common_mesh_indexed(), calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), depsgraph, Brush::falloff_shape, fill_factor_from_hide_and_mask(), filter_distances_with_radius(), filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, blender::ed::sculpt_paint::StrokeCache::radius, blender::bke::pbvh::MeshNode::verts(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
| void blender::ed::sculpt_paint::calc_factors_common_mesh_indexed | ( | const Depsgraph & | depsgraph, |
| const Brush & | brush, | ||
| const Object & | object, | ||
| const MeshAttributeData & | attribute_data, | ||
| Span< float3float3 > | vert_positions, | ||
| Span< float3float3 > | vert_normals, | ||
| const bke::pbvh::MeshNode & | node, | ||
| Vector< float > & | r_factors, | ||
| Vector< float > & | r_distances ) |
Definition at line 6496 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), calc_factors_common_mesh_indexed(), depsgraph, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::bke::pbvh::MeshNode::verts(), and verts.
Referenced by calc_factors_common_mesh_indexed(), and calc_factors_common_mesh_indexed().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3float3 & | view_normal, |
| const Set< BMFace *, 0 > & | faces, | ||
| MutableSpan< float > | factors ) |
Definition at line 6942 of file sculpt.cc.
References BLI_assert, calc_front_face(), blender::math::dot(), dot(), faces, i, and blender::MutableSpan< T >::size().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3float3 & | view_normal, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< float > | factors ) |
Definition at line 6928 of file sculpt.cc.
References BLI_assert, calc_front_face(), blender::math::dot(), dot(), i, blender::MutableSpan< T >::size(), and verts.
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3float3 & | view_normal, |
| const SubdivCCG & | subdiv_ccg, | ||
| Span< int > | grids, | ||
| MutableSpan< float > | factors ) |
Definition at line 6909 of file sculpt.cc.
References BKE_subdiv_ccg_key_top_level(), BLI_assert, calc_front_face(), blender::math::dot(), dot(), CCGKey::grid_area, blender::bke::ccg::grid_range(), i, blender::MutableSpan< T >::index_range(), blender::Span< T >::index_range(), normals, SubdivCCG::normals, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::MutableSpan< T >::slice().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3float3 & | view_normal, |
| Span< float3float3 > | normals, | ||
| MutableSpan< float > | factors ) |
Disable brush influence when vertex normals point away from the view.
Definition at line 6898 of file sculpt.cc.
References BLI_assert, calc_front_face(), blender::math::dot(), dot(), i, normals, and blender::MutableSpan< T >::size().
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), calc_front_face(), calc_front_face(), calc_front_face(), calc_front_face(), calc_front_face(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_mesh().
| void blender::ed::sculpt_paint::calc_front_face | ( | const float3float3 & | view_normal, |
| Span< float3float3 > | vert_normals, | ||
| Span< int > | verts, | ||
| MutableSpan< float > | factors ) |
Definition at line 6885 of file sculpt.cc.
References BLI_assert, calc_front_face(), blender::math::dot(), dot(), i, blender::MutableSpan< T >::size(), and verts.
|
static |
Definition at line 2587 of file sculpt.cc.
References add_v3_v3(), ED_view3d_calc_zfac(), ED_view3d_win_to_delta(), Object::loc, mul_m4_v3(), mul_v3_m4v3(), normalize_v3(), ViewContext::obact, ViewContext::region, and ViewContext::rv3d.
Referenced by calc_brush_local_mat().
|
static |
Definition at line 2527 of file sculpt.cc.
References BKE_paint_brush_for_read(), BLI_assert_unreachable, SculptSession::cache, calc_area_normal(), depsgraph, Sculpt::paint, Object::sculpt, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, Brush::sculpt_plane, and blender::ed::sculpt_paint::StrokeCache::view_normal.
Referenced by update_sculpt_normal().
| void blender::ed::sculpt_paint::calc_smooth_translations | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const IndexMask & | node_mask, | ||
| MutableSpan< float3float3 > | translations ) |
The brush uses translations calculated at the beginning of the stroke. They can't be calculated dynamically because changing positions will influence neighboring translations. However we can reduce the cost in some cases by skipping initializing values for vertices in hidden or masked nodes.
Definition at line 271 of file enhance_details.cc.
References blender::bke::pbvh::BMesh, depsgraph, faces, blender::index_mask::IndexMask::foreach_index(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::MeshAttributeData::hide_poly, i, blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), blender::bke::pbvh::vert_positions_eval(), and vert_random_access_ensure().
Referenced by blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), and blender::ed::sculpt_paint::filter::sculpt_filter_specific_init().
|
static |
Definition at line 1926 of file sculpt.cc.
References calc_stabilized_plane(), closest_to_plane_normalized_v3(), blender::math::dot(), i, blender::math::interpolate(), blender::math::normalize(), blender::ed::sculpt_paint::StrokeCache::plane_brush, plane_brush_max_rolling_average_num, plane_from_point_normal_v3(), Brush::stabilize_normal, and Brush::stabilize_plane.
Referenced by calc_stabilized_plane().
|
static |
Definition at line 162 of file sculpt_transform.cc.
References BLI_NOINLINE, i, blender::Span< T >::index_range(), SCULPT_get_vertex_symm_area(), and blender::math::transform_point().
Referenced by transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
|
static |
Definition at line 340 of file sculpt_transform.cc.
References BLI_NOINLINE, i, blender::Span< T >::index_range(), and blender::math::transform_point().
Referenced by elastic_transform_node_bmesh(), elastic_transform_node_grids(), and elastic_transform_node_mesh().
| void blender::ed::sculpt_paint::calc_translations_to_plane | ( | Span< float3float3 > | positions, |
| const float4 & | plane, | ||
| MutableSpan< float3float3 > | translations ) |
Definition at line 7833 of file sculpt.cc.
References calc_translations_to_plane(), closest(), closest_to_plane_normalized_v3(), i, and blender::Span< T >::index_range().
| void blender::ed::sculpt_paint::calc_translations_to_plane | ( | Span< float3float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4 & | plane, | ||
| MutableSpan< float3float3 > | translations ) |
Find the translation from each vertex position to the closest point on the plane.
Definition at line 7820 of file sculpt.cc.
References calc_translations_to_plane(), closest(), closest_to_plane_normalized_v3(), i, and verts.
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(), calc_translations_to_plane(), and calc_translations_to_plane().
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Definition at line 7615 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), calc_vert_neighbors(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), SubdivCCGNeighbors::coords, CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, i, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SubdivCCGCoord::to_index(), SubdivCCGCoord::x, x, SubdivCCGCoord::y, and y.
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| GroupedSpan< int > | vert_to_face, | ||
| Span< bool > | hide_poly, | ||
| Span< int > | verts, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Find vertices connected to the indexed vertices across faces. Neighbors connected across hidden faces are skipped.
See calc_vert_neighbors_interior for a version that does extra filtering for boundary vertices.
Definition at line 7596 of file sculpt.cc.
References append_neighbors_to_vector(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BLI_assert, calc_vert_neighbors(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), faces, i, blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and verts.
Referenced by blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), calc_vert_neighbors(), calc_vert_neighbors(), calc_vert_neighbors(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::pose::grow_factors_mesh(), blender::ed::sculpt_paint::mask::grow_mask_mesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::color::sculpt_color_presmooth_init(), blender::ed::sculpt_paint::mask::sharpen_mask_mesh(), blender::ed::sculpt_paint::mask::shrink_mask_mesh(), and blender::ed::sculpt_paint::mask::smooth_mask_mesh().
| GroupedSpan< BMVert * > blender::ed::sculpt_paint::calc_vert_neighbors | ( | Set< BMVert *, 0 > | verts, |
| Vector< int > & | r_offset_data, | ||
| Vector< BMVert * > & | r_data ) |
Definition at line 7647 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), calc_vert_neighbors(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), i, blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), vert_neighbors_get_bmesh(), and verts.
| void blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< Vector< BMVert * > > | result ) |
Definition at line 7806 of file sculpt.cc.
References BLI_assert, calc_vert_neighbors_interior(), i, result, vert_neighbors_get_interior_bmesh(), and verts.
| void blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| BitSpan | boundary_verts, | ||
| const SubdivCCG & | subdiv_ccg, | ||
| Span< int > | grids, | ||
| MutableSpan< Vector< SubdivCCGCoord > > | result ) |
Definition at line 7755 of file sculpt.cc.
References BKE_subdiv_ccg_coord_is_mesh_boundary(), BKE_subdiv_ccg_key_top_level(), BKE_subdiv_ccg_neighbor_coords_get(), BLI_assert, calc_vert_neighbors_interior(), CCG_grid_xy_to_index(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), SubdivCCGNeighbors::coords, faces, CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, i, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove_if(), result, blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SubdivCCGCoord::x, x, SubdivCCGCoord::y, and y.
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| GroupedSpan< int > | vert_to_face, | ||
| BitSpan | boundary_verts, | ||
| Span< bool > | hide_poly, | ||
| Span< int > | verts, | ||
| Span< float > | factors, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Definition at line 7714 of file sculpt.cc.
References calc_vert_neighbors_interior(), calc_vert_neighbors_interior_impl(), faces, and verts.
| GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors_interior | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| GroupedSpan< int > | vert_to_face, | ||
| BitSpan | boundary_verts, | ||
| Span< bool > | hide_poly, | ||
| Span< int > | verts, | ||
| Vector< int > & | r_offset_data, | ||
| Vector< int > & | r_data ) |
Find vertices connected to the indexed vertices across faces. Neighbors connected across hidden faces are skipped. For boundary vertices (stored in the boundary_verts argument), only include other boundary vertices. Corner vertices are skipped entirely and will not have neighbor information populated.
Definition at line 7735 of file sculpt.cc.
References calc_vert_neighbors_interior(), calc_vert_neighbors_interior_impl(), faces, and verts.
Referenced by blender::ed::sculpt_paint::filter::calc_smooth_filter(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), and blender::ed::sculpt_paint::tests::TEST_F().
|
static |
Definition at line 7666 of file sculpt.cc.
References append_neighbors_to_vector(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BLI_assert, calc_vert_neighbors_interior_impl(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), faces, i, blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove_and_reorder(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and verts.
Referenced by calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), and calc_vert_neighbors_interior_impl().
Definition at line 579 of file sculpt_transform.cc.
References C, CTX_data_depsgraph_pointer(), depsgraph, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::bke::pbvh::Tree::update_bounds(), and blender::bke::pbvh::update_normals().
Referenced by blender::ed::transform::recalcData_sculpt().
| void blender::ed::sculpt_paint::clip_and_lock_translations | ( | const Sculpt & | sd, |
| const SculptSession & | ss, | ||
| Span< float3float3 > | positions, | ||
| MutableSpan< float3float3 > | translations ) |
Definition at line 7358 of file sculpt.cc.
References blender::math::abs(), BLI_assert, SculptSession::cache, clip_and_lock_translations(), ClipX, blender::ed::sculpt_paint::StrokeCache::flag, Sculpt::flags, i, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::mat, blender::ed::sculpt_paint::StrokeCache::mat_inv, blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, SCULPT_LOCK_X, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::ed::sculpt_paint::StrokeCache::tolerance, and blender::math::transform_point().
| void blender::ed::sculpt_paint::clip_and_lock_translations | ( | const Sculpt & | sd, |
| const SculptSession & | ss, | ||
| Span< float3float3 > | positions, | ||
| Span< int > | verts, | ||
| MutableSpan< float3float3 > | translations ) |
Modify translations based on sculpt mode axis locking and mirroring clipping.
Definition at line 7316 of file sculpt.cc.
References blender::math::abs(), BLI_assert, SculptSession::cache, clip_and_lock_translations(), ClipX, blender::ed::sculpt_paint::StrokeCache::flag, Sculpt::flags, i, blender::ed::sculpt_paint::StrokeCache::mat, blender::ed::sculpt_paint::StrokeCache::mat_inv, blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, SCULPT_LOCK_X, blender::MutableSpan< T >::size(), blender::ed::sculpt_paint::StrokeCache::tolerance, blender::math::transform_point(), and verts.
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(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), clip_and_lock_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::face_set::edit_fairing(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
| bool blender::ed::sculpt_paint::color_supported_check | ( | const Scene & | scene, |
| Object & | object, | ||
| ReportList * | reports ) |
Returns true if the current Mesh type can handle color attributes. If false an error message will be shown to the user. Operators should return OPERATOR_CANCELLED in this case.
NOTE: Does not check if a color attribute actually exists. Calling code must handle this itself; in most cases a call to BKE_sculpt_color_layer_create_if_needed() is sufficient.
Definition at line 5457 of file sculpt.cc.
References BKE_report(), BKE_sculpt_multires_active(), SculptSession::bm, color_supported_check(), reports, and RPT_ERROR.
Referenced by color_supported_check(), blender::ed::sculpt_paint::mask::mask_by_color(), sample_color_invoke(), sculpt_brush_stroke_invoke(), and blender::ed::sculpt_paint::color::sculpt_color_filter_init().
|
static |
Definition at line 652 of file sculpt_transform.cc.
References b, blender::ed::sculpt_paint::AveragePositionAccumulation::position, and blender::ed::sculpt_paint::AveragePositionAccumulation::weight_total.
Referenced by average_mask_border_position(), and average_unmasked_position().
|
static |
Definition at line 7243 of file sculpt.cc.
References blender::Span< T >::begin(), contains_nan(), blender::Span< T >::end(), and v.
Referenced by apply_translations(), apply_translations(), apply_translations(), and contains_nan().
| OffsetIndices< int > blender::ed::sculpt_paint::create_node_vert_offsets | ( | const CCGKey & | key, |
| Span< bke::pbvh::GridsNode > | nodes, | ||
| const IndexMask & | node_mask, | ||
| Array< int > & | node_data ) |
Definition at line 7572 of file sculpt.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), create_node_vert_offsets(), blender::index_mask::IndexMask::foreach_index(), CCGKey::grid_area, i, pos, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::index_mask::IndexMask::size().
| OffsetIndices< int > blender::ed::sculpt_paint::create_node_vert_offsets | ( | Span< bke::pbvh::MeshNode > | nodes, |
| const IndexMask & | node_mask, | ||
| Array< int > & | node_data ) |
Creates OffsetIndices based on each node's unique vertex count, allowing for easy slicing of a new array.
Definition at line 7562 of file sculpt.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), create_node_vert_offsets(), blender::index_mask::IndexMask::foreach_index(), i, pos, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::index_mask::IndexMask::size().
Referenced by create_node_vert_offsets(), create_node_vert_offsets(), and blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec().
| OffsetIndices< int > blender::ed::sculpt_paint::create_node_vert_offsets_bmesh | ( | Span< bke::pbvh::BMeshNode > | nodes, |
| const IndexMask & | node_mask, | ||
| Array< int > & | node_data ) |
Definition at line 7584 of file sculpt.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), BKE_pbvh_bmesh_node_unique_verts(), create_node_vert_offsets_bmesh(), blender::index_mask::IndexMask::foreach_index(), i, pos, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::index_mask::IndexMask::size(), and Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
Referenced by create_node_vert_offsets_bmesh(), and blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec().
|
static |
Definition at line 1073 of file paint_cursor.cc.
References copy_v3_v3(), ED_view3d_project_v3(), imm_draw_circle_fill_3d(), mul_m4_v3(), and size().
Referenced by cursor_draw_point_with_symmetry(), cursor_draw_tiling_preview(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_pose_brush_origins_draw(), and paint_cursor_preview_boundary_data_pivot_draw().
|
static |
Definition at line 1139 of file paint_cursor.cc.
References angle(), cursor_draw_point_screen_space(), cursor_draw_tiling_preview(), i, is_symmetry_iteration_valid(), M_PI, mul_m4_v3(), Sculpt::radial_symm, rotate_m4(), SCULPT_mesh_symmetry_xyz_get(), symmetry_flip(), and unit_m4().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1090 of file paint_cursor.cc.
References BKE_object_get_evaluated_mesh_no_subsurf(), BLI_assert, copy_v3_v3(), copy_v3_v3_int(), cursor_draw_point_screen_space(), Object::data, OB_MESH, Sculpt::paint, PAINT_TILE_X, step, Paint::symmetry_flags, Paint::tile_offset, and Object::type.
Referenced by cursor_draw_point_with_symmetry().
| bool blender::ed::sculpt_paint::cursor_geometry_info_update | ( | bContext * | C, |
| CursorGeometryInfo * | out, | ||
| const float2float2 & | mval, | ||
| bool | use_sampled_normal ) |
Gets the normal, location and active vertex location of the geometry under the cursor. This also updates the active vertex and cursor related data of the SculptSession using the mouse position
TODO: This should be updated to return std::optional<CursorGeometryInfo>
Definition at line 4662 of file sculpt.cc.
References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, SculptSession::active_face_index, SculptSession::active_grid_index, SculptSession::active_vert_position(), blender::ed::sculpt_paint::RaycastData::active_vertex, BKE_base_is_visible(), BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), blender::bke::pbvh::BMesh, C, SculptSession::cache, calc_area_normal(), SculptSession::clear_active_elements(), blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, CTX_data_active_base(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_view3d(), cursor_geometry_info_update(), SculptSession::cursor_location, SculptSession::cursor_normal, SculptSession::cursor_radius, SculptSession::cursor_sampled_normal, SculptSession::cursor_view_normal, Object::data, depsgraph, blender::ed::sculpt_paint::RaycastData::depth, ED_view3d_viewcontext_init(), blender::bke::Face, blender::ed::sculpt_paint::RaycastData::face_normal, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::RaycastData::hit, blender::math::invert(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::math::normalize(), ViewContext::obact, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), out, pbvh_gather_cursor_update(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), Object::runtime, SculptSession::rv3d, ViewContext::rv3d, Object::sculpt, sculpt_raycast_cb(), SCULPT_stroke_modifiers_check(), SculptSession::set_active_vert(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, SculptSession::subdiv_ccg, blender::math::transform_direction(), blender::bke::pbvh::Tree::type(), blender::bke::pbvh::update_normals(), blender::ed::sculpt_paint::RaycastData::use_original, SculptSession::v3d, ViewContext::v3d, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), and RegionView3D::viewinv.
Referenced by blender::ed::sculpt_paint::face_set::active_update_and_get(), blender::ed::sculpt_paint::face_set::change_visibility_invoke(), cursor_geometry_info_update(), blender::ed::sculpt_paint::face_set::edit_op_invoke(), blender::ed::sculpt_paint::trim::initialize_cursor_info(), blender::ed::sculpt_paint::mask::mask_by_color(), paint_cursor_sculpt_session_update_and_init(), blender::ed::sculpt_paint::dyntopo::sample_detail_voxel(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), set_pivot_position_exec(), stroke_test_start(), and blender::ed::sculpt_paint::expand::target_vert_update_and_get().
|
static |
Definition at line 140 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::curve_mask, CurveMaskCache::curve_mask_size, diameter_to_curve_mask_size(), and MEM_mallocN().
Referenced by paint_curve_mask_cache_update().
|
static |
Definition at line 134 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::curve_mask, CurveMaskCache::curve_mask_size, and MEM_SAFE_FREE.
Referenced by paint_curve_mask_cache_free_data(), and paint_curve_mask_cache_update().
|
static |
Definition at line 354 of file curves_sculpt_ops.cc.
References blender::ed::curves::curves_poll(), curves_sculptmode_toggle_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 1037 of file paint_stroke.cc.
References CURVES_SCULPT_BRUSH_TYPE_ADD, CURVES_SCULPT_BRUSH_TYPE_DENSITY, and ELEM.
Referenced by paint_space_stroke_enabled().
| bool blender::ed::sculpt_paint::curves_sculpt_poll | ( | bContext * | C | ) |
Definition at line 66 of file curves_sculpt_ops.cc.
References C, CTX_data_active_object(), Object::mode, and OB_MODE_SCULPT_CURVES.
Referenced by curves_sculpt_poll_view3d(), and ED_keymap_paint().
| bool blender::ed::sculpt_paint::curves_sculpt_poll_view3d | ( | bContext * | C | ) |
Definition at line 72 of file curves_sculpt_ops.cc.
References C, CTX_wm_region_view3d(), and curves_sculpt_poll().
Referenced by curves_sculptmode_enter().
|
static |
Definition at line 291 of file curves_sculpt_ops.cc.
References BKE_paint_brushes_ensure(), BKE_paint_ensure(), BKE_paint_get_active_from_paintmode(), C, copy_v3_v3_uchar(), CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), CTX_wm_message_bus(), ToolSettings::curves_sculpt, curves_sculpt_poll_view3d(), DEG_id_tag_update(), ED_paint_cursor_start(), Object::id, ID_RECALC_SYNC_TO_EVAL, Object::mode, NC_SCENE, ND_MODE, OB_MODE_SCULPT_CURVES, CurvesSculpt::paint, PAINT_CURSOR_SCULPT_CURVES, paint_init_pivot(), SculptCurves, Scene::toolsettings, WM_event_add_notifier(), and WM_msg_publish_rna_prop.
Referenced by curves_sculptmode_toggle_exec().
|
static |
Definition at line 319 of file curves_sculpt_ops.cc.
References C, CTX_data_active_object(), Object::mode, and OB_MODE_OBJECT.
Referenced by curves_sculptmode_toggle_exec().
|
static |
Definition at line 325 of file curves_sculpt_ops.cc.
References C, CTX_data_active_object(), CTX_wm_message_bus(), curves_sculptmode_enter(), curves_sculptmode_exit(), DEG_id_tag_update(), Object::id, ID_RECALC_SYNC_TO_EVAL, Object::mode, blender::ed::object::mode_compat_set(), NC_SCENE, ND_MODE, OB_MODE_SCULPT_CURVES, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, WM_event_add_notifier(), WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by CURVES_OT_sculptmode_toggle().
|
static |
Definition at line 124 of file paint_image_2d_curve_mask.cc.
Referenced by curve_mask_allocate(), and is_curve_mask_size_valid().
|
static |
Definition at line 3179 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, add_v3_v3(), blender::ed::sculpt_paint::StrokeCache::alt_smooth, Brush::autosmooth_factor, UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, BLI_assert, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_DEFORM_TARGET_CLOTH_SIM, BRUSH_DIR_IN, BRUSH_INVERSE_SMOOTH_PRESSURE, BRUSH_MASK_DRAW, BRUSH_MASK_SMOOTH, blender::ed::sculpt_paint::cloth::brush_simulation_create(), BRUSH_SMOOTH_DEFORM_LAPLACIAN, BRUSH_SMOOTH_DEFORM_SURFACE, blender::ed::sculpt_paint::cloth::brush_store_simulation_state(), brush_type_needs_original(), brush_uses_topology_rake(), brush_uses_vector_displacement(), blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, calc_brush_node_mask(), blender::ed::sculpt_paint::auto_mask::Cache::calc_cavity_factor(), blender::ed::sculpt_paint::StrokeCache::cloth_sim, Brush::deform_target, depsgraph, blender::ed::sculpt_paint::brushes::do_blob_brush(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_clay_strips_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::cloth::do_cloth_brush(), blender::ed::sculpt_paint::brushes::do_crease_brush(), blender::ed::sculpt_paint::brushes::do_displacement_eraser_brush(), blender::ed::sculpt_paint::brushes::do_displacement_smear_brush(), blender::ed::sculpt_paint::brushes::do_draw_brush(), blender::ed::sculpt_paint::brushes::do_draw_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_draw_sharp_brush(), blender::ed::sculpt_paint::brushes::do_draw_vector_displacement_brush(), blender::ed::sculpt_paint::brushes::do_elastic_deform_brush(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::brushes::do_grab_brush(), blender::ed::sculpt_paint::brushes::do_gravity_brush(), blender::ed::sculpt_paint::brushes::do_inflate_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_mask_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::brushes::do_nudge_brush(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::ed::sculpt_paint::pose::do_pose_brush(), blender::ed::sculpt_paint::brushes::do_relax_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_rotate_brush(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush(), blender::ed::sculpt_paint::brushes::do_smooth_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), blender::ed::sculpt_paint::brushes::do_snake_hook_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::brushes::do_thumb_brush(), blender::ed::sculpt_paint::brushes::do_topology_relax_brush(), blender::ed::sculpt_paint::brushes::do_topology_slide_brush(), ELEM, blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), Brush::flag, blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::ed::sculpt_paint::StrokeCache::invert, invert(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::auto_mask::is_enabled(), UnifiedPaintSettings::last_stroke_valid, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::location_symm, Brush::mask_tool, blender::ed::sculpt_paint::brushes::CursorSampleResult::node_mask, pbvh_gather_texpaint(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::StrokeCache::pen_flip, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_center, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_normal, blender::ed::sculpt_paint::StrokeCache::pressure, blender::math::project_point(), push_undo_nodes(), SculptSession::rv3d, Object::sculpt, sculpt_brush_needs_normal(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BLOB, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLAY, SCULPT_BRUSH_TYPE_CLAY_STRIPS, SCULPT_BRUSH_TYPE_CLAY_THUMB, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_CREASE, SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, SCULPT_BRUSH_TYPE_DRAW, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_BRUSH_TYPE_DRAW_SHARP, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_INFLATE, SCULPT_BRUSH_TYPE_LAYER, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, SCULPT_BRUSH_TYPE_NUDGE, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_PINCH, SCULPT_BRUSH_TYPE_PLANE, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SLIDE_RELAX, SCULPT_BRUSH_TYPE_SMEAR, SCULPT_BRUSH_TYPE_SMOOTH, SCULPT_BRUSH_TYPE_SNAKE_HOOK, SCULPT_BRUSH_TYPE_THUMB, sculpt_needs_pbvh_pixels(), sculpt_pbvh_update_pixels(), SCULPT_stroke_is_main_symmetry_pass(), blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::cloth::sim_activate_nodes(), Brush::smooth_deform_type, blender::ed::sculpt_paint::auto_mask::stroke_cache_ensure(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, Brush::topology_rake_factor, true, update_brush_local_mat(), blender::bke::pbvh::update_normals(), update_sculpt_normal(), and RegionView3D::view_render.
Referenced by stroke_update_step().
|
static |
Definition at line 3581 of file sculpt.cc.
References angle(), SculptSession::cache, depsgraph, do_tiled(), i, M_PI, Sculpt::radial_symm, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, Object::sculpt, and SCULPT_cache_calc_brushdata_symm().
Referenced by do_symmetrical_brush_actions().
|
static |
Definition at line 3618 of file sculpt.cc.
References BKE_paint_brush_for_read(), brush_strength(), blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, calc_symmetry_feather(), depsgraph, do_radial_symmetry(), do_tiled(), i, is_symmetry_iteration_valid(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, Sculpt::paint, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), SCULPT_mesh_symmetry_xyz_get(), and blender::ed::sculpt_paint::StrokeCache::symmetry.
Referenced by stroke_update_step().
|
static |
Definition at line 3514 of file sculpt.cc.
References BKE_object_boundbox_get(), SculptSession::cache, copy_v3_v3(), copy_v3_v3_int(), depsgraph, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::Bounds< T >::max, blender::Bounds< T >::min, Sculpt::paint, PAINT_TILE_X, blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::ed::sculpt_paint::StrokeCache::radius, Object::sculpt, step, Paint::symmetry_flags, Paint::tile_offset, and blender::ed::sculpt_paint::StrokeCache::tile_pass.
Referenced by do_radial_symmetry(), and do_symmetrical_brush_actions().
| BLI_INLINE void blender::ed::sculpt_paint::draw_bezier_handle_lines | ( | uint | pos, |
| const float | sel_col[4], | ||
| BezTriple * | bez ) |
Definition at line 921 of file paint_cursor.cc.
References BLI_INLINE, BezTriple::f1, BezTriple::f2, BezTriple::f3, GPU_line_width(), GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, immBegin(), immEnd(), immUniformColor4f(), immUniformColor4fv(), immVertex2fv(), pos, and BezTriple::vec.
Referenced by paint_draw_curve_cursor().
| BLI_INLINE void blender::ed::sculpt_paint::draw_rect_point | ( | uint | pos, |
| const float | sel_col[4], | ||
| const float | handle_col[4], | ||
| const float * | co, | ||
| float | width, | ||
| bool | selected ) |
Definition at line 896 of file paint_cursor.cc.
References BLI_INLINE, GPU_line_width(), imm_draw_box_wire_2d(), immUniformColor4f(), immUniformColor4fv(), pos, and w().
Referenced by paint_draw_curve_cursor().
| BLI_INLINE void blender::ed::sculpt_paint::draw_tri_point | ( | uint | pos, |
| const float | sel_col[4], | ||
| const float | pivot_col[4], | ||
| float * | co, | ||
| float | width, | ||
| bool | selected ) |
Definition at line 862 of file paint_cursor.cc.
References BLI_INLINE, GPU_line_width(), GPU_PRIM_LINE_LOOP, immBegin(), immEnd(), immUniformColor4f(), immUniformColor4fv(), immVertex2fv(), pos, and w().
Referenced by paint_draw_curve_cursor().
|
static |
Definition at line 2990 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, BKE_pbvh_bmesh_node_save_orig(), BKE_pbvh_node_mark_topology_update(), SculptSession::bm, SculptSession::bm_log, blender::bke::pbvh::bmesh_update_topology(), SculptVertexInfo::boundary, BRUSH_FRONTFACE, blender::ed::sculpt_paint::dyntopo::detail_size::brush_to_detail_size(), brush_type_needs_original(), SculptSession::cache, blender::bits::BitVector< InlineBufferCapacity, Allocator >::clear(), Sculpt::constant_detail, blender::ed::sculpt_paint::dyntopo::detail_size::constant_to_detail_size(), depsgraph, Sculpt::detail_percent, Sculpt::detail_size, blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::ed::sculpt_paint::dyntopo::detail_size::EDGE_LENGTH_MIN_FACTOR, Brush::falloff_shape, Brush::flag, Sculpt::flags, blender::index_mask::IndexMask::foreach_index(), i, blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::undo::Mask, blender::bke::pbvh::Tree::nodes(), PAINT_FALLOFF_SHAPE_SPHERE, PBVH_Collapse, pbvh_gather_generic(), blender::bke::object::pbvh_get(), PBVH_Subdivide, blender::ed::sculpt_paint::undo::Position, blender::ed::sculpt_paint::undo::push_nodes(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::dyntopo::detail_size::relative_to_detail_size(), Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_SIMPLIFY, SCULPT_DYNTOPO_COLLAPSE, SCULPT_DYNTOPO_DETAIL_BRUSH, SCULPT_DYNTOPO_DETAIL_CONSTANT, SCULPT_DYNTOPO_DETAIL_MANUAL, SCULPT_DYNTOPO_SUBDIVIDE, blender::bke::pbvh::Tree::tag_positions_changed(), blender::bke::pbvh::Tree::tag_topology_changed(), true, U, SculptSession::vertex_info, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by stroke_update_step().
|
static |
Definition at line 424 of file sculpt_transform.cc.
References apply_kelvinet_to_translations(), apply_translations(), BKE_pbvh_bmesh_node_unique_verts(), SculptSession::bm, calc_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), gather_bmesh_positions(), params, blender::ed::sculpt_paint::TransformLocalData::positions, Vector< T, InlineBufferCapacity, Allocator >::resize(), scale_factors(), scale_translations(), blender::ed::sculpt_paint::TransformLocalData::translations, and verts.
Referenced by transform_radius_elastic().
|
static |
Definition at line 393 of file sculpt_transform.cc.
References apply_kelvinet_to_translations(), apply_translations(), calc_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), gather_grids_positions(), blender::bke::pbvh::GridsNode::grids(), params, blender::ed::sculpt_paint::TransformLocalData::positions, Vector< T, InlineBufferCapacity, Allocator >::resize(), scale_factors(), scale_translations(), blender::MutableSpan< T >::size(), SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by transform_radius_elastic().
|
static |
Definition at line 361 of file sculpt_transform.cc.
References apply_kelvinet_to_translations(), calc_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::PositionDeformData::deform(), blender::ed::sculpt_paint::PositionDeformData::eval, blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), gather_data_mesh(), blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, params, blender::ed::sculpt_paint::TransformLocalData::positions, Vector< T, InlineBufferCapacity, Allocator >::resize(), scale_factors(), scale_translations(), blender::ed::sculpt_paint::TransformLocalData::translations, blender::bke::pbvh::MeshNode::verts(), and verts.
Referenced by transform_radius_elastic().
Definition at line 592 of file sculpt_transform.cc.
References C, SculptSession::filter_cache, flush_update_done(), Position, blender::ed::sculpt_paint::undo::push_end(), and Object::sculpt.
Referenced by blender::ed::transform::special_aftertrans_update__sculpt().
|
static |
Definition at line 1234 of file grease_pencil_draw_ops.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), RenderData::cfra, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::bke::greasepencil::Layer::frames(), GP_TOOL_FLAG_RETAIN_LAST, GP_USE_MULTI_FRAME_EDITING, ToolSettings::gpencil_flags, blender::animrig::is_autokey_on(), Scene::r, blender::bke::greasepencil::Layer::start_frame_at(), and Scene::toolsettings.
Referenced by grease_pencil_apply_fill().
Definition at line 361 of file sculpt_ops.cc.
References UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, blender::bke::pbvh::bounds_get(), copy_v3_v3(), UnifiedPaintSettings::last_stroke_valid, blender::math::midpoint(), blender::bke::object::pbvh_get(), Scene::toolsettings, blender::math::transform_point(), and ToolSettings::unified_paint_settings.
Referenced by blender::ed::sculpt_paint::vwpaint::init_session(), and object_sculpt_mode_enter().
|
static |
Definition at line 5791 of file sculpt.cc.
References SculptFakeNeighbors::current_max_distance, SculptFakeNeighbors::fake_neighbor_index, fake_neighbor_init(), FAKE_NEIGHBOR_NONE, SculptSession::fake_neighbors, and SCULPT_vertex_count_get().
Referenced by fake_neighbor_init(), and SCULPT_fake_neighbors_ensure().
|
static |
Definition at line 5907 of file sculpt.cc.
References BKE_subdiv_ccg_key_top_level(), bm, SculptSession::bm, BM_vert_at_index(), blender::bke::pbvh::BMesh, BMVert::co, Object::data, depsgraph, FAKE_NEIGHBOR_NONE, fake_neighbor_search(), fake_neighbor_search_bmesh(), fake_neighbor_search_grids(), fake_neighbor_search_mesh(), blender::index_mask::IndexMask::foreach_index(), SubdivCCG::grid_hidden, blender::bke::pbvh::Grids, i, blender::index_mask::IndexMask::index_range(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::NearestVertData::join(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node_in_sphere(), blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::bke::Point, SubdivCCG::positions, Object::sculpt, blender::bke::pbvh::search_nodes(), blender::index_mask::IndexMask::slice(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), blender::ed::sculpt_paint::islands::vert_id_get(), and blender::bke::pbvh::vert_positions_eval().
Referenced by fake_neighbor_search(), and SCULPT_fake_neighbors_ensure().
|
static |
Definition at line 5879 of file sculpt.cc.
References BKE_pbvh_bmesh_node_unique_verts(), BM_elem_flag_test, BM_ELEM_HIDDEN, BM_elem_index_get, blender::ed::sculpt_paint::NearestVertData::distance_sq, blender::math::distance_squared(), SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, fake_neighbor_search_bmesh(), SculptSession::fake_neighbors, blender::ed::sculpt_paint::NearestVertData::vert, and blender::ed::sculpt_paint::islands::vert_id_get().
Referenced by fake_neighbor_search(), and fake_neighbor_search_bmesh().
|
static |
Definition at line 5850 of file sculpt.cc.
References BKE_subdiv_ccg_foreach_visible_grid_vert(), blender::ed::sculpt_paint::NearestVertData::distance_sq, blender::math::distance_squared(), SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, fake_neighbor_search_grids(), SculptSession::fake_neighbors, blender::bke::ccg::grid_range(), blender::bke::pbvh::GridsNode::grids(), blender::ed::sculpt_paint::NearestVertData::vert, and blender::ed::sculpt_paint::islands::vert_id_get().
Referenced by fake_neighbor_search(), and fake_neighbor_search_grids().
|
static |
Definition at line 5823 of file sculpt.cc.
References blender::ed::sculpt_paint::NearestVertData::distance_sq, blender::math::distance_squared(), SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, fake_neighbor_search_mesh(), SculptSession::fake_neighbors, blender::Span< T >::is_empty(), blender::ed::sculpt_paint::NearestVertData::vert, blender::ed::sculpt_paint::islands::vert_id_get(), and blender::bke::pbvh::MeshNode::verts().
Referenced by fake_neighbor_search(), and fake_neighbor_search_mesh().
|
static |
Definition at line 2317 of file paint_vertex.cc.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_from_object(), DEG_id_tag_update(), fill_mesh_color(), ID_RECALC_SYNC_TO_EVAL, ME_EDIT_PAINT_FACE_SEL, and ME_EDIT_PAINT_VERT_SEL.
Referenced by object_active_color_fill(), and vertex_color_set_exec().
|
static |
Definition at line 2202 of file paint_vertex.cc.
References bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, blender::bke::Corner, l, BMFace::l_first, and blender::bke::Point.
Referenced by fill_mesh_color().
| void blender::ed::sculpt_paint::fill_factor_from_hide | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< float > | r_factors ) |
Definition at line 6796 of file sculpt.cc.
References BLI_assert, BM_elem_flag_test_bool, BM_ELEM_HIDDEN, fill_factor_from_hide(), i, blender::MutableSpan< T >::size(), and verts.
| void blender::ed::sculpt_paint::fill_factor_from_hide | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| MutableSpan< float > | r_factors ) |
Definition at line 6775 of file sculpt.cc.
References BKE_subdiv_ccg_key_top_level(), BLI_assert, blender::MutableSpan< T >::fill(), fill_factor_from_hide(), CCGKey::grid_area, SubdivCCG::grid_hidden, i, blender::Span< T >::index_range(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::fill_factor_from_hide | ( | Span< bool > | hide_vert, |
| Span< int > | verts, | ||
| MutableSpan< float > | r_factors ) |
Calculate initial influence factors based on vertex visibility.
Definition at line 6759 of file sculpt.cc.
References BLI_assert, blender::MutableSpan< T >::fill(), fill_factor_from_hide(), i, blender::Span< T >::is_empty(), blender::MutableSpan< T >::size(), and verts.
Referenced by blender::ed::sculpt_paint::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), calculate_average_color(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), fill_factor_from_hide(), fill_factor_from_hide(), fill_factor_from_hide(), and vpaint_do_draw().
| void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask | ( | const BMesh & | bm, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< float > | r_factors ) |
Definition at line 6832 of file sculpt.cc.
References BLI_assert, bm, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_test, BM_ELEM_HIDDEN, CD_PROP_FLOAT, CustomData_get_offset_named(), fill_factor_from_hide_and_mask(), i, blender::MutableSpan< T >::size(), and verts.
| void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| MutableSpan< float > | r_factors ) |
Definition at line 6850 of file sculpt.cc.
References BKE_subdiv_ccg_key_top_level(), BLI_assert, blender::MutableSpan< T >::fill(), fill_factor_from_hide_and_mask(), CCGKey::grid_area, SubdivCCG::grid_hidden, blender::bke::ccg::grid_range(), i, blender::MutableSpan< T >::index_range(), blender::Span< T >::index_range(), Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty(), SubdivCCG::masks, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
| void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask | ( | Span< bool > | hide_vert, |
| Span< float > | mask, | ||
| Span< int > | verts, | ||
| MutableSpan< float > | r_factors ) |
Calculate initial influence factors based on vertex visibility and masking.
Definition at line 6807 of file sculpt.cc.
References BLI_assert, blender::MutableSpan< T >::fill(), fill_factor_from_hide_and_mask(), i, blender::Span< T >::is_empty(), blender::MutableSpan< T >::size(), and verts.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush_task(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), fill_factor_from_hide_and_mask(), fill_factor_from_hide_and_mask(), fill_factor_from_hide_and_mask(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
|
static |
Definition at line 2269 of file paint_vertex.cc.
References BKE_attribute_domain(), BKE_id_attributes_color_find(), bm, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, blender::bke::GSpanAttributeWriter::domain, fill_bm_face_or_corner_attribute(), fill_mesh_face_or_corner_attribute(), blender::bke::GSpanAttributeWriter::finish(), AttributeOwner::from_id(), blender::CPPType::is(), CustomDataLayer::offset, blender::bke::GSpanAttributeWriter::span, blender::GMutableSpan::type(), CustomDataLayer::type, and blender::GMutableSpan::typed().
Referenced by fill_active_color().
|
static |
Definition at line 2226 of file paint_vertex.cc.
References BKE_mesh_tessface_clear(), blender::bke::Corner, data, blender::bke::Face, faces, i, blender::Span< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), and blender::bke::Point.
Referenced by fill_mesh_color().
| void blender::ed::sculpt_paint::filter_above_plane_factors | ( | Span< float3float3 > | positions, |
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Definition at line 7910 of file sculpt.cc.
References filter_above_plane_factors(), i, blender::Span< T >::index_range(), and plane_point_side_v3().
| void blender::ed::sculpt_paint::filter_above_plane_factors | ( | Span< float3float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Definition at line 7898 of file sculpt.cc.
References filter_above_plane_factors(), i, plane_point_side_v3(), and verts.
Referenced by filter_above_plane_factors(), and filter_above_plane_factors().
| void blender::ed::sculpt_paint::filter_below_plane_factors | ( | Span< float3float3 > | positions, |
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Definition at line 7887 of file sculpt.cc.
References filter_below_plane_factors(), i, blender::Span< T >::index_range(), and plane_point_side_v3().
| void blender::ed::sculpt_paint::filter_below_plane_factors | ( | Span< float3float3 > | vert_positions, |
| Span< int > | verts, | ||
| const float4 & | plane, | ||
| MutableSpan< float > | factors ) |
Ignore points below the plane.
Definition at line 7875 of file sculpt.cc.
References filter_below_plane_factors(), i, plane_point_side_v3(), and verts.
Referenced by filter_below_plane_factors(), and filter_below_plane_factors().
| void blender::ed::sculpt_paint::filter_distances_with_radius | ( | float | radius, |
| Span< float > | distances, | ||
| MutableSpan< float > | factors ) |
Set the factor to zero for all distances greater than the radius.
Definition at line 7089 of file sculpt.cc.
References filter_distances_with_radius(), i, and blender::Span< T >::index_range().
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), filter_distances_with_radius(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and vpaint_do_draw().
| void blender::ed::sculpt_paint::filter_plane_trim_limit_factors | ( | const Brush & | brush, |
| const StrokeCache & | cache, | ||
| Span< float3float3 > | translations, | ||
| MutableSpan< float > | factors ) |
Ignore points that fall below the "plane trim" threshold for the brush.
Definition at line 7859 of file sculpt.cc.
References BRUSH_PLANE_TRIM, filter_plane_trim_limit_factors(), Brush::flag, i, blender::Span< T >::index_range(), blender::math::length_squared(), blender::ed::sculpt_paint::StrokeCache::plane_trim_squared, and blender::ed::sculpt_paint::StrokeCache::radius_squared.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::brushes::calc_grids(), and filter_plane_trim_limit_factors().
| void blender::ed::sculpt_paint::filter_region_clip_factors | ( | const SculptSession & | ss, |
| Span< float3float3 > | positions, | ||
| MutableSpan< float > | factors ) |
Definition at line 6984 of file sculpt.cc.
References BLI_assert, SculptSession::cache, ED_view3d_clipping_test(), filter_region_clip_factors(), i, blender::MatBase< float, 4, 4 >::identity(), blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, SculptSession::rv3d, ViewContext::rv3d, RV3D_CLIPPING_ENABLED, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::math::transform_point(), SculptSession::v3d, ViewContext::v3d, and blender::ed::sculpt_paint::StrokeCache::vc.
| void blender::ed::sculpt_paint::filter_region_clip_factors | ( | const SculptSession & | ss, |
| Span< float3float3 > | vert_positions, | ||
| Span< int > | verts, | ||
| MutableSpan< float > | factors ) |
When the 3D view's clipping planes are enabled, brushes shouldn't have any effect on vertices outside of the planes, because they're not visible. This function disables the factors for those vertices.
Definition at line 6956 of file sculpt.cc.
References BLI_assert, SculptSession::cache, ED_view3d_clipping_test(), filter_region_clip_factors(), i, blender::MatBase< float, 4, 4 >::identity(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, SculptSession::rv3d, ViewContext::rv3d, RV3D_CLIPPING_ENABLED, blender::MutableSpan< T >::size(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::math::transform_point(), SculptSession::v3d, ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, and verts.
Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), filter_region_clip_factors(), filter_region_clip_factors(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and vpaint_do_draw().
|
static |
Definition at line 174 of file sculpt_transform.cc.
References BLI_NOINLINE, i, blender::Span< T >::index_range(), PAINT_SYMM_X, PAINT_SYMM_Y, PAINT_SYMM_Z, transform_mirror_max_distance_eps, x, y, and z().
Referenced by transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
| void blender::ed::sculpt_paint::filter_verts_outside_symmetry_area | ( | Span< float3float3 > | positions, |
| const float3float3 & | pivot, | ||
| ePaintSymmetryFlags | symm, | ||
| MutableSpan< float > | factors ) |
Ignores verts outside of a symmetric area defined by a pivot point.
Definition at line 7845 of file sculpt.cc.
References BLI_assert, filter_verts_outside_symmetry_area(), i, blender::Span< T >::index_range(), SCULPT_check_vertex_pivot_symmetry(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), and filter_verts_outside_symmetry_area().
|
static |
Determine the 3D position of a brush based on curve segments under a screen position.
Definition at line 52 of file curves_sculpt_brush.cc.
References b, closest_to_line_segment_v2(), closest_to_line_segment_v3(), blender::ed::sculpt_paint::BrushPositionCandidate::depth_sq_cu, blender::ed::sculpt_paint::BrushPositionCandidate::distance_sq_re, blender::math::distance_squared(), blender::IndexRange::drop_back(), ED_view3d_ob_project_mat_get(), ED_view3d_project_float_v2_m4(), blender::IndexRange::first(), FLT_MAX, init(), blender::math::interpolate(), blender::threading::parallel_reduce(), blender::ed::sculpt_paint::BrushPositionCandidate::position_cu, pow2f(), blender::IndexRange::size(), and UI_UNIT_X.
Referenced by sample_curves_3d_brush().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 658 of file sculpt_expand.cc.
References BLI_assert_unreachable, blender::bke::pbvh::BMesh, depsgraph, find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), and blender::bke::pbvh::Tree::type().
Referenced by blender::ed::sculpt_paint::expand::boundary_topology_falloff_create(), blender::ed::sculpt_paint::expand::diagonals_falloff_create(), blender::ed::sculpt_paint::expand::find_active_connected_components_from_vert(), blender::ed::sculpt_paint::expand::geodesic_falloff_create(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ed::sculpt_paint::expand::spherical_falloff_create(), and blender::ed::sculpt_paint::expand::topology_falloff_create().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts_bmesh | ( | const Object & | object, |
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 626 of file sculpt_expand.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), bm, SculptSession::bm, BM_elem_index_get, BM_vert_at_index(), BMVert::co, blender::Vector< T, InlineBufferCapacity, Allocator >::end(), is_symmetry_iteration_valid(), nearest_vert_calc_bmesh(), blender::bke::object::pbvh_get(), SCULPT_mesh_symmetry_xyz_get(), and symmetry_flip().
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_bmesh(), find_symm_verts(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), and blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts_grids | ( | const Object & | object, |
| const int | original_vert, | ||
| const float | max_distance ) |
Definition at line 593 of file sculpt_expand.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), BKE_subdiv_ccg_key_top_level(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), is_symmetry_iteration_valid(), nearest_vert_calc_grids(), blender::bke::object::pbvh_get(), SubdivCCG::positions, SCULPT_mesh_symmetry_xyz_get(), SculptSession::subdiv_ccg, and symmetry_flip().
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), find_symm_verts(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), and blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids().
| Vector< int > blender::ed::sculpt_paint::find_symm_verts_mesh | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| int | original_vert, | ||
| float | max_distance = std::numeric_limits< float >::max() ) |
Utility functions to get the closest vertices after flipping an original vertex position for all symmetry passes. The returned vector is sorted.
Definition at line 558 of file sculpt_expand.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), depsgraph, blender::Vector< T, InlineBufferCapacity, Allocator >::end(), is_symmetry_iteration_valid(), blender::bke::AttributeAccessor::lookup(), nearest_vert_calc_mesh(), blender::bke::object::pbvh_get(), blender::bke::Point, SCULPT_mesh_symmetry_xyz_get(), symmetry_flip(), and blender::bke::pbvh::vert_positions_eval().
Referenced by blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_mesh(), find_symm_verts(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), and blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh().
| bke::SpanAttributeWriter< float > blender::ed::sculpt_paint::float_selection_ensure | ( | Curves & | curves_id | ) |
Definition at line 11 of file curves_sculpt_selection.cc.
References blender::bke::MutableAttributeAccessor::add(), CD_PROP_BOOL, CD_PROP_FLOAT, blender::bke::AttributeAccessor::domain_size(), blender::VArray< T >::ForSingle(), Curves::geometry, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_meta_data(), blender::VArrayCommon< T >::materialize(), MEM_malloc_arrayN(), blender::bke::MutableAttributeAccessor::remove(), Curves::selection_domain, blender::VArrayCommon< T >::size(), and size().
Referenced by blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::select_grow::select_grow_update(), and blender::ed::sculpt_paint::select_random::select_random_exec().
| void blender::ed::sculpt_paint::flush_update_done | ( | const bContext * | C, |
| Object & | ob, | ||
| UpdateType | update_type ) |
Triggers redraws, updates, and dependency graph tags as necessary when a brush stroke finishes.
Definition at line 5129 of file sculpt.cc.
References bScreen::areabase, BKE_pbvh_bmesh_after_stroke(), BKE_sculptsession_use_pbvh_draw(), SculptSession::bm, blender::bke::pbvh::BMesh, C, CTX_wm_manager(), CTX_wm_region_view3d(), Object::data, DEG_id_tag_update(), ED_area_tag_redraw_regiontype(), ED_region_tag_redraw(), flush_update_done(), Object::id, ID_REAL_USERS, ID_RECALC_GEOMETRY, Image, LISTBASE_FOREACH, blender::bke::object::pbvh_get(), Position, RegionView3D::rflag, RGN_TYPE_WINDOW, RV3D_PAINTING, Object::sculpt, SCULPT_fake_neighbors_free(), SPACE_IMAGE, SPACE_VIEW3D, SpaceLink::spacetype, blender::bke::pbvh::store_bounds_orig(), blender::bke::pbvh::Tree::type(), and WM_window_get_active_screen().
Referenced by blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), end_transform(), blender::ed::sculpt_paint::expand::finish(), flush_update_done(), blender::ed::sculpt_paint::project::gesture_end(), blender::ed::sculpt_paint::mask::mask_by_color(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::expand::restore_original_state(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_end(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_end(), and stroke_done().
| void blender::ed::sculpt_paint::flush_update_step | ( | const bContext * | C, |
| UpdateType | update_type ) |
Triggers redraws, updates, and dependency graph tags as necessary after each brush calculation.
Definition at line 5081 of file sculpt.cc.
References BKE_sculptsession_use_pbvh_draw(), C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_wm_region(), CTX_wm_region_view3d(), DEG_id_tag_update(), depsgraph, ED_region_tag_redraw(), flush_update_step(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SHADING, Image, blender::bke::pbvh::Mesh, SculptSession::modifier, SculptSession::multires, MULTIRES_COORDS_MODIFIED, multires_mark_as_modified(), blender::bke::object::pbvh_get(), Position, RegionView3D::rflag, RV3D_PAINTING, Object::sculpt, SculptSession::shapekey_active, tag_mesh_positions_changed(), and blender::bke::pbvh::Tree::type().
Referenced by blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), flush_update_step(), blender::ed::sculpt_paint::project::gesture_end(), blender::ed::sculpt_paint::expand::restore_original_state(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_apply(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_apply(), stroke_update_step(), blender::ed::sculpt_paint::expand::update_for_vert(), and update_modal_transform().
| void blender::ed::sculpt_paint::gather_bmesh_normals | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< float3float3 > | normals ) |
Definition at line 6369 of file sculpt.cc.
References gather_bmesh_normals(), i, normals, and verts.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), gather_bmesh_normals(), and blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh().
| void blender::ed::sculpt_paint::gather_bmesh_positions | ( | const Set< BMVert *, 0 > & | verts, |
| MutableSpan< float3float3 > | positions ) |
Definition at line 6351 of file sculpt.cc.
References BLI_assert, gather_bmesh_positions(), i, blender::MutableSpan< T >::size(), and verts.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), elastic_transform_node_bmesh(), gather_bmesh_positions(), gather_bmesh_positions(), and blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh().
|
inline |
Definition at line 145 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), gather_bmesh_positions(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and verts.
| MutableSpan< T > blender::ed::sculpt_paint::gather_data_bmesh | ( | const Span< T > | src, |
| const Set< BMVert *, 0 > & | verts, | ||
| Vector< T > & | dst ) |
Definition at line 117 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), gather_data_bmesh(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and verts.
| void blender::ed::sculpt_paint::gather_data_bmesh | ( | Span< T > | src, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< T > | node_data ) |
Definition at line 6405 of file sculpt.cc.
References BLI_assert, BM_elem_index_get, gather_data_bmesh(), i, blender::MutableSpan< T >::size(), and verts.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), gather_data_bmesh(), gather_data_bmesh(), gather_data_bmesh< float >(), gather_data_bmesh< float3 >(), and gather_data_bmesh< int >().
| template void blender::ed::sculpt_paint::gather_data_bmesh< float > | ( | Span< float > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float > | ) |
References gather_data_bmesh().
| template void blender::ed::sculpt_paint::gather_data_bmesh< float3float3 > | ( | Span< float3float3 > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float3float3 > | ) |
References gather_data_bmesh().
| template void blender::ed::sculpt_paint::gather_data_bmesh< int > | ( | Span< int > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< int > | ) |
References gather_data_bmesh().
| MutableSpan< T > blender::ed::sculpt_paint::gather_data_grids | ( | const SubdivCCG & | subdiv_ccg, |
| const Span< T > | src, | ||
| const Span< int > | grids, | ||
| Vector< T > & | dst ) |
Definition at line 103 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), BKE_subdiv_ccg_key_top_level(), gather_data_grids(), CCGKey::grid_area, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::gather_data_grids | ( | const SubdivCCG & | subdiv_ccg, |
| Span< T > | src, | ||
| Span< int > | grids, | ||
| MutableSpan< T > | node_data ) |
Definition at line 6389 of file sculpt.cc.
References BKE_subdiv_ccg_key_top_level(), BLI_assert, blender::MutableSpan< T >::copy_from(), gather_data_grids(), CCGKey::grid_area, blender::bke::ccg::grid_range(), i, blender::Span< T >::index_range(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), gather_data_grids(), gather_data_grids(), gather_data_grids< float >(), gather_data_grids< float3 >(), gather_data_grids< int >(), gather_grids_normals(), gather_grids_positions(), blender::ed::sculpt_paint::mask::gather_mask_grids(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::mask::sharpen_mask_grids(), blender::ed::sculpt_paint::mask::smooth_mask_grids(), blender::ed::sculpt_paint::undo::store_mask_grids(), and blender::ed::sculpt_paint::undo::store_positions_grids().
| template void blender::ed::sculpt_paint::gather_data_grids< float > | ( | const SubdivCCG & | , |
| Span< float > | , | ||
| Span< int > | , | ||
| MutableSpan< float > | ) |
References gather_data_grids().
| template void blender::ed::sculpt_paint::gather_data_grids< float3float3 > | ( | const SubdivCCG & | , |
| Span< float3float3 > | , | ||
| Span< int > | , | ||
| MutableSpan< float3float3 > | ) |
References gather_data_grids().
| template void blender::ed::sculpt_paint::gather_data_grids< int > | ( | const SubdivCCG & | , |
| Span< int > | , | ||
| Span< int > | , | ||
| MutableSpan< int > | ) |
References gather_data_grids().
| MutableSpan< T > blender::ed::sculpt_paint::gather_data_mesh | ( | const Span< T > | src, |
| const Span< int > | indices, | ||
| Vector< T > & | dst ) |
Definition at line 91 of file mesh_brush_common.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), gather_data_mesh(), indices, and blender::Vector< T, InlineBufferCapacity, Allocator >::resize().
| void blender::ed::sculpt_paint::gather_data_mesh | ( | Span< T > | src, |
| Span< int > | indices, | ||
| MutableSpan< T > | dst ) |
Gather data from an array aligned with all geometry vertices.
Definition at line 6379 of file sculpt.cc.
References BLI_assert, gather_data_mesh(), i, indices, and blender::MutableSpan< T >::size().
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::cloth::apply_scale_filter(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_mesh(), blender::ed::sculpt_paint::color::do_paint_brush_task(), elastic_transform_node_mesh(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), gather_data_mesh(), gather_data_mesh(), gather_data_mesh< bool >(), gather_data_mesh< float >(), gather_data_mesh< float3 >(), gather_data_mesh< float4 >(), gather_data_mesh< int >(), blender::ed::sculpt_paint::mask::increase_contrast_mask_mesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), blender::ed::sculpt_paint::mask::sharpen_mask_mesh(), blender::ed::sculpt_paint::mask::smooth_mask_mesh(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), blender::ed::sculpt_paint::undo::store_face_sets(), blender::ed::sculpt_paint::undo::store_mask_mesh(), blender::ed::sculpt_paint::undo::store_positions_mesh(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().
| template void blender::ed::sculpt_paint::gather_data_mesh< bool > | ( | Span< bool > | , |
| Span< int > | , | ||
| MutableSpan< bool > | ) |
References gather_data_mesh().
| template void blender::ed::sculpt_paint::gather_data_mesh< float > | ( | Span< float > | , |
| Span< int > | , | ||
| MutableSpan< float > | ) |
References gather_data_mesh().
| template void blender::ed::sculpt_paint::gather_data_mesh< float3float3 > | ( | Span< float3float3 > | , |
| Span< int > | , | ||
| MutableSpan< float3float3 > | ) |
References gather_data_mesh().
| template void blender::ed::sculpt_paint::gather_data_mesh< float4 > | ( | Span< float4 > | , |
| Span< int > | , | ||
| MutableSpan< float4 > | ) |
References gather_data_mesh().
| template void blender::ed::sculpt_paint::gather_data_mesh< int > | ( | Span< int > | , |
| Span< int > | , | ||
| MutableSpan< int > | ) |
References gather_data_mesh().
| void blender::ed::sculpt_paint::gather_grids_normals | ( | const SubdivCCG & | subdiv_ccg, |
| Span< int > | grids, | ||
| MutableSpan< float3float3 > | normals ) |
Fill the output array with all normals in the grids referenced by the indices.
Definition at line 6362 of file sculpt.cc.
References gather_data_grids(), gather_grids_normals(), normals, and SubdivCCG::normals.
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), gather_grids_normals(), and blender::ed::sculpt_paint::brushes::sample_node_surface_grids().
|
inline |
Fill the output array with all positions in the geometry referenced by the indices.
Definition at line 135 of file mesh_brush_common.hh.
References BKE_subdiv_ccg_key_top_level(), gather_data_grids(), CCGKey::grid_area, SubdivCCG::positions, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::project::apply_projection_grids(), calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), elastic_transform_node_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_grids().
| IndexMask blender::ed::sculpt_paint::gather_nodes | ( | const bke::pbvh::Tree & | pbvh, |
| const eBrushFalloffShape | falloff_shape, | ||
| const bool | use_original, | ||
| const float3float3 & | location, | ||
| const float | radius_sq, | ||
| const std::optional< float3float3 > & | ray_direction, | ||
| IndexMaskMemory & | memory ) |
Definition at line 2483 of file sculpt.cc.
References BLI_assert, BLI_assert_unreachable, dist_squared_ray_to_aabb_v3_precalc(), node_fully_masked_or_hidden(), node_in_cylinder(), node_in_sphere(), PAINT_FALLOFF_SHAPE_SPHERE, PAINT_FALLOFF_SHAPE_TUBE, and blender::bke::pbvh::search_nodes().
Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), and blender::ed::sculpt_paint::brushes::plane::calc_node_mask().
| void blender::ed::sculpt_paint::geometry_preview_lines_update | ( | Depsgraph & | depsgraph, |
| Object & | object, | ||
| SculptSession & | ss, | ||
| float | radius ) |
Definition at line 231 of file grab.cc.
References SculptSession::active_vert(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BKE_sculpt_update_object_for_edit(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), SculptSession::deform_modifiers_active, depsgraph, blender::math::distance_squared(), blender::bke::Face, faces, blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), SculptSession::preview_verts, SculptSession::shapekey_active, blender::Span< T >::size(), blender::bke::pbvh::Tree::type(), vert_neighbors_get_mesh(), and blender::bke::pbvh::vert_positions_eval().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 655 of file brush_asset_ops.cc.
References BLI_assert_unreachable, C, CTX_wm_reports(), blender::ed::asset::find_asset_from_weak_ref(), Brush::id, and ID_IS_ASSET.
Referenced by brush_asset_revert_poll(), and brush_asset_save_poll().
|
static |
Definition at line 1795 of file grease_pencil_draw_ops.cc.
References RenderData::cfra, blender::bke::greasepencil::Layer::has_drawing_at(), blender::animrig::is_autokey_on(), Scene::r, and blender::bke::greasepencil::Layer::start_frame_at().
Referenced by remove_points_and_split_from_drawings().
|
static |
Definition at line 1191 of file grease_pencil_draw_ops.cc.
References BLI_assert, blender::VArray< T >::ForFunc(), GP_FILL_GPLMODE_ABOVE, GP_FILL_GPLMODE_ACTIVE, GP_FILL_GPLMODE_ALL_ABOVE, GP_FILL_GPLMODE_ALL_BELOW, GP_FILL_GPLMODE_BELOW, GP_FILL_GPLMODE_VISIBLE, and blender::IndexRange::size().
Referenced by grease_pencil_apply_fill().
|
static |
Definition at line 91 of file grease_pencil_draw_ops.cc.
References BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), BLI_assert_unreachable, BRUSH_STROKE_ERASE, BRUSH_STROKE_SMOOTH, C, GPAINT_BRUSH_TYPE_DRAW, GPAINT_BRUSH_TYPE_ERASE, GPAINT_BRUSH_TYPE_FILL, GPAINT_BRUSH_TYPE_TINT, GPencil, Brush::gpencil_brush_type, Brush::gpencil_sculpt_brush_type, Brush::gpencil_vertex_brush_type, Brush::gpencil_weight_brush_type, GPSCULPT_BRUSH_TYPE_CLONE, GPSCULPT_BRUSH_TYPE_GRAB, GPSCULPT_BRUSH_TYPE_PINCH, GPSCULPT_BRUSH_TYPE_PUSH, GPSCULPT_BRUSH_TYPE_RANDOMIZE, GPSCULPT_BRUSH_TYPE_SMOOTH, GPSCULPT_BRUSH_TYPE_STRENGTH, GPSCULPT_BRUSH_TYPE_THICKNESS, GPSCULPT_BRUSH_TYPE_TWIST, GPVERTEX_BRUSH_TYPE_AVERAGE, GPVERTEX_BRUSH_TYPE_BLUR, GPVERTEX_BRUSH_TYPE_DRAW, GPVERTEX_BRUSH_TYPE_REPLACE, GPVERTEX_BRUSH_TYPE_SMEAR, GPVERTEX_BRUSH_TYPE_TINT, GPWEIGHT_BRUSH_TYPE_AVERAGE, GPWEIGHT_BRUSH_TYPE_BLUR, GPWEIGHT_BRUSH_TYPE_DRAW, GPWEIGHT_BRUSH_TYPE_SMEAR, blender::ed::sculpt_paint::greasepencil::new_clone_operation(), blender::ed::sculpt_paint::greasepencil::new_erase_operation(), blender::ed::sculpt_paint::greasepencil::new_grab_operation(), blender::ed::sculpt_paint::greasepencil::new_paint_operation(), blender::ed::sculpt_paint::greasepencil::new_pinch_operation(), blender::ed::sculpt_paint::greasepencil::new_push_operation(), blender::ed::sculpt_paint::greasepencil::new_randomize_operation(), blender::ed::sculpt_paint::greasepencil::new_smooth_operation(), blender::ed::sculpt_paint::greasepencil::new_strength_operation(), blender::ed::sculpt_paint::greasepencil::new_thickness_operation(), blender::ed::sculpt_paint::greasepencil::new_tint_operation(), blender::ed::sculpt_paint::greasepencil::new_twist_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_average_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_blur_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_paint_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_replace_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_smear_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_average_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_blur_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_draw_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_smear_operation(), wmOperator::ptr, RNA_enum_get(), SculptGPencil, VertexGPencil, and WeightGPencil.
Referenced by stroke_update_step().
| Vector< float4x4 > blender::ed::sculpt_paint::get_symmetry_brush_transforms | ( | const eCurvesSymmetryType | symmetry | ) |
Definition at line 320 of file curves_sculpt_brush.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CURVES_SYMMETRY_X, CURVES_SYMMETRY_Y, CURVES_SYMMETRY_Z, blender::MatBase< float, 4, 4 >::identity(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), x, y, and z().
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::comb_projected_with_symmetry(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical_with_symmetry(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected_with_symmetry(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected_with_symmetry(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical_with_symmetry(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook_with_symmetry().
|
static |
Definition at line 5266 of file sculpt.cc.
References CD_MDEFORMVERT, CustomData_get_layer_index(), and get_vertex_group_sharing_info().
Referenced by get_vertex_group_sharing_info(), and store_mesh_from_eval().
|
static |
Definition at line 1351 of file grease_pencil_draw_ops.cc.
References blender::IndexRange::after(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), BKE_brush_tag_unsaved_changes(), BKE_paint_brush(), BKE_reportf(), BLI_rcti_isect_pt_v(), C, blender::ed::greasepencil::calculate_texture_space(), blender::bke::AttributeAccessor::contains(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_region(), CTX_wm_window(), blender::bke::Curve, blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), wmOperator::customdata, ED_view3d_viewcontext_init(), ensure_editable_drawings(), BrushGpencilSettings::fill_extend_fac, BrushGpencilSettings::fill_layer_mode, BrushGpencilSettings::fill_simplylvl, BrushGpencilSettings::fill_threshold, blender::bke::SpanAttributeWriter< T >::finish(), blender::ed::greasepencil::FitToView, BrushGpencilSettings::flag, blender::VArray< T >::ForSingle(), blender::bke::GeometrySet::from_curves(), Curves::geometry, blender::bke::GeometrySet::get_curves_for_write(), get_fill_boundary_layers(), GP_BRUSH_FILL_AUTO_REMOVE_FILL_GUIDES, GP_BRUSH_FILL_HIDE, ToolSettings::gp_paint, GP_TOOL_FLAG_PAINT_ONBACK, ToolSettings::gpencil_flags, Brush::gpencil_settings, grease_pencil_fill_get_extension_data(), blender::bke::GeometrySet::has_curves(), blender::bke::CurvesGeometry::is_empty(), blender::geometry::join_geometries(), blender::bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), wmEvent::mval, GpPaint::paint, blender::ed::greasepencil::remove_fill_guides(), wmOperator::reports, RPT_ERROR, simplify_fixed(), smooth_fill_strokes(), blender::bke::CurvesGeometry::tag_topology_changed(), ViewContext::v3d, ARegion::winrct, WM_cursor_modal_restore(), and wmEvent::xy.
Referenced by grease_pencil_fill_event_modal_map(), and grease_pencil_fill_modal().
|
static |
Definition at line 1547 of file paint_cursor.cc.
References BKE_brush_color_get(), BKE_brush_size_get(), BKE_grease_pencil_object_material_from_brush_get(), BLI_rcti_isect_pt(), blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_LOCK_SIZE, BRUSH_SMOOTH_STROKE, blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), blender::ed::sculpt_paint::PaintCursorContext::C, CTX_data_active_object(), ELEM, Brush::flag, ToolSettings::gp_paint, GPAINT_BRUSH_TYPE_DRAW, GPAINT_BRUSH_TYPE_ERASE, GPAINT_BRUSH_TYPE_FILL, GPAINT_BRUSH_TYPE_TINT, GPencil, Brush::gpencil_brush_type, Brush::gpencil_settings, GPPAINT_MODE_BOTH, GPPAINT_MODE_STROKE, GPU_line_width(), grease_pencil_eraser_draw(), imm_draw_circle_wire_2d(), immUniformColor4f(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, OB_GREASE_PENCIL, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, blender::ed::sculpt_paint::PaintCursorContext::pos, pos, blender::ed::greasepencil::DrawingPlacement::project(), project_brush_radius_grease_pencil(), blender::ed::sculpt_paint::PaintCursorContext::region, Brush::rgb, GreasePencil::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene, ViewContext::scene, Brush::size, MaterialGPencilStyle::stroke_rgba, blender::ed::greasepencil::DrawingPlacement::to_world_space(), Scene::toolsettings, blender::math::transform_point(), Brush::unprojected_radius, ViewContext::v3d, blender::ed::sculpt_paint::PaintCursorContext::vc, BrushGpencilSettings::vertex_mode, VertexGPencil, ARegion::winrct, rcti::xmin, blender::VecBase< T, Size >::xyz(), and rcti::ymin.
Referenced by paint_draw_2D_view_brush_cursor().
|
static |
Definition at line 304 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_cancel().
Referenced by GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 239 of file grease_pencil_draw_ops.cc.
References wmTabletData::active, BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), BRUSH_STROKE_ERASE, C, wmOperator::customdata, ELEM, EVT_TABLET_ERASER, GPAINT_BRUSH_TYPE_DRAW, GPAINT_BRUSH_TYPE_ERASE, GPAINT_BRUSH_TYPE_TINT, GPencil, Brush::gpencil_brush_type, blender::ed::greasepencil::grease_pencil_draw_operator_invoke(), wmOperatorType::modal, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, paint_stroke_new(), wmOperator::ptr, RNA_enum_get(), RNA_enum_set(), stroke_done(), stroke_get_location(), stroke_redraw(), stroke_test_start(), stroke_update_step(), wmEvent::tablet, wmEvent::type, wmOperator::type, and WM_event_add_modal_handler().
Referenced by GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 297 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_modal().
Referenced by GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 228 of file grease_pencil_draw_ops.cc.
References C, blender::ed::greasepencil::grease_pencil_painting_poll(), and WM_toolsystem_active_tool_is_brush().
Referenced by GREASE_PENCIL_OT_brush_stroke().
|
static |
Definition at line 1976 of file grease_pencil_draw_ops.cc.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_region(), DEG_get_evaluated(), depsgraph, grease_pencil_erase_box_exec(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Bounds< T >::is_empty(), OPERATOR_FINISHED, blender::threading::parallel_for(), blender::ed::greasepencil::retrieve_editable_drawings(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and WM_operator_properties_border_to_bounds().
Referenced by grease_pencil_erase_box_exec(), and GREASE_PENCIL_OT_erase_box().
|
static |
Definition at line 1865 of file grease_pencil_draw_ops.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_region(), DEG_get_evaluated(), depsgraph, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Bounds< T >::max, blender::Bounds< T >::min, blender::bounds::min_max(), OPERATOR_FINISHED, blender::threading::parallel_for(), blender::ed::greasepencil::retrieve_editable_drawings(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and WM_gesture_lasso_path_to_array().
Referenced by GREASE_PENCIL_OT_erase_lasso().
|
static |
Definition at line 1520 of file paint_cursor.cc.
References GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_viewport_size_get_f(), imm_draw_circle_fill_2d(), imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformColor4f(), immUniformColor4ub(), max_ii(), blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, and blender::ed::sculpt_paint::PaintCursorContext::pos.
Referenced by grease_pencil_brush_cursor_draw().
|
static |
Definition at line 1766 of file grease_pencil_draw_ops.cc.
References C, and grease_pencil_fill_exit().
Referenced by GREASE_PENCIL_OT_fill().
|
static |
Definition at line 1613 of file grease_pencil_draw_ops.cc.
References BLI_assert_unreachable, C, Cancel, Confirm, CTX_wm_window(), wmOperator::customdata, blender::math::distance(), ExtensionCollide, ExtensionDrag, ExtensionLengthen, ExtensionModeToggle, ExtensionShorten, GP_FILL_EMODE_EXTEND, GP_FILL_EMODE_RADIUS, grease_pencil_apply_fill(), grease_pencil_update_extend(), Invert, KM_PRESS, KM_RELEASE, wmEvent::mval, NA_EDITED, NC_GEOM, NC_GPENCIL, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, Precision, wmEvent::val, WM_CURSOR_EW_ARROW, WM_cursor_modal_set(), WM_CURSOR_PAINT_BRUSH, WM_cursor_set(), WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by grease_pencil_fill_modal().
|
static |
Definition at line 1532 of file grease_pencil_draw_ops.cc.
References C, CTX_data_active_object(), CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, Object::data, DEG_id_tag_update(), ED_region_draw_cb_exit(), ED_workspace_status_text(), GreasePencil::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, NA_EDITED, NC_GEOM, NC_GPENCIL, ND_DATA, ARegion::runtime, WM_cursor_modal_restore(), WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by grease_pencil_fill_cancel(), grease_pencil_fill_invoke(), and grease_pencil_fill_modal().
|
static |
Definition at line 704 of file grease_pencil_draw_ops.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), BLI_bvhtree_balance(), BLI_bvhtree_free(), BLI_bvhtree_insert(), BLI_bvhtree_new(), BLI_bvhtree_ray_cast(), BLI_SCOPED_DEFER, C, CTX_data_active_object(), CTX_data_scene(), CTX_wm_region_view3d(), blender::offset_indices::OffsetIndices< T >::data(), BVHTreeRayHit::dist, blender::math::distance(), blender::ed::greasepencil::DrawingInfo::drawing, blender::IndexRange::drop_back(), ELEM, blender::ed::greasepencil::ExtensionData::ends, blender::IndexRange::first(), FLT_MAX, i, BVHTreeRayHit::index, blender::IndexRange::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::math::interpolate(), is_cyclic(), blender::math::isect_seg_seg(), blender::IndexRange::last(), blender::ed::greasepencil::DrawingInfo::layer_index, length(), blender::ed::greasepencil::ExtensionData::lines, BVHTreeRayHit::no, blender::math::normalize_and_get_length(), result, blender::ed::greasepencil::retrieve_visible_drawings(), blender::IndexRange::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::ed::greasepencil::ExtensionData::starts, blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Layer::to_world_space(), blender::math::transform_point(), tree, RegionView3D::viewmat, and blender::VecBase< T, Size >::xy().
Referenced by grease_pencil_fill_get_extension_data().
|
static |
Definition at line 865 of file grease_pencil_draw_ops.cc.
References blender::IndexRange::after(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::math::average(), BLI_assert_unreachable, C, blender::ed::greasepencil::ExtensionData::centers, blender::ed::greasepencil::ExtensionData::circles, blender::IndexRange::contains(), CTX_data_active_object(), CTX_data_scene(), CTX_wm_region_view3d(), blender::ed::greasepencil::ExtensionData::ends, blender::array_utils::gather(), blender::IndexRange::index_range(), blender::ed::greasepencil::ExtensionData::lines, blender::ed::greasepencil::ExtensionData::radii, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::greasepencil::retrieve_visible_drawings(), blender::IndexRange::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::ed::greasepencil::ExtensionData::starts, blender::math::to_scale(), blender::math::transform_point(), UNUSED_VARS, RegionView3D::viewmat, and blender::VecBase< T, Size >::xy().
Referenced by grease_pencil_fill_get_extension_data().
|
static |
Definition at line 976 of file grease_pencil_draw_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), Vector< T, InlineBufferCapacity, Allocator >::append(), C, blender::ed::greasepencil::ExtensionData::centers, blender::ed::greasepencil::ExtensionData::circles, CTX_data_active_object(), CTX_data_scene(), blender::ed::greasepencil::DrawingInfo::drawing, blender::ed::greasepencil::ExtensionData::ends, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_cut, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_length, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_mode, blender::IndexRange::first(), GP_FILL_EMODE_EXTEND, GP_FILL_EMODE_RADIUS, grease_pencil_fill_extension_cut(), grease_pencil_fill_extension_lines_from_circles(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::last(), blender::ed::greasepencil::DrawingInfo::layer_index, length(), blender::ed::greasepencil::ExtensionData::lines, blender::math::normalize(), blender::ed::greasepencil::ExtensionData::radii, blender::ed::greasepencil::retrieve_visible_drawings(), blender::IndexRange::size(), blender::ed::greasepencil::ExtensionData::starts, blender::bke::greasepencil::Drawing::strokes(), and blender::math::transform_point().
Referenced by grease_pencil_apply_fill(), and grease_pencil_fill_overlay_cb().
|
static |
Definition at line 1487 of file grease_pencil_draw_ops.cc.
References BKE_brush_init_gpencil_settings(), BKE_curvemapping_init(), BKE_grease_pencil_object_material_ensure_from_brush(), BKE_object_material_index_get(), BKE_paint_brush(), C, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), BrushGpencilSettings::curve_jitter, Brush::curve_rand_hue, BrushGpencilSettings::curve_rand_pressure, Brush::curve_rand_saturation, BrushGpencilSettings::curve_rand_strength, BrushGpencilSettings::curve_rand_uv, Brush::curve_rand_value, BrushGpencilSettings::curve_sensitivity, BrushGpencilSettings::curve_strength, wmOperator::customdata, Object::data, blender::ed::sculpt_paint::GreasePencilFillOpData::from_context(), ToolSettings::gp_paint, Brush::gpencil_settings, invert(), GpPaint::paint, wmOperator::ptr, RNA_boolean_get(), and Scene::toolsettings.
Referenced by grease_pencil_fill_invoke().
|
static |
Definition at line 1561 of file grease_pencil_draw_ops.cc.
References Object::actcol, BKE_object_material_get(), BKE_paint_brush(), BKE_report(), C, CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, Object::data, DEG_id_tag_update(), BrushGpencilSettings::flag, GP_BRUSH_MATERIAL_PINNED, ToolSettings::gp_paint, Brush::gpencil_settings, grease_pencil_fill_exit(), grease_pencil_fill_init(), grease_pencil_fill_status_indicators(), grease_pencil_fill_update_overlay(), GreasePencil::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, BrushGpencilSettings::material, NA_EDITED, NC_GPENCIL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, GpPaint::paint, wmOperator::reports, RPT_ERROR, WM_cursor_modal_set(), WM_CURSOR_PAINT_BRUSH, WM_event_add_modal_handler(), and WM_event_add_notifier().
Referenced by GREASE_PENCIL_OT_fill().
|
static |
Definition at line 1703 of file grease_pencil_draw_ops.cc.
References C, CTX_data_active_object(), CTX_wm_region_view3d(), wmOperator::customdata, blender::math::distance(), ED_view3d_pixel_size(), EVT_MODAL_MAP, grease_pencil_apply_fill(), grease_pencil_fill_event_modal_map(), grease_pencil_fill_exit(), grease_pencil_update_extend(), Object::loc, MOUSEMOVE, wmEvent::mval, NA_EDITED, NC_GEOM, NC_GPENCIL, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::type, WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by GREASE_PENCIL_OT_fill().
|
static |
Definition at line 1084 of file grease_pencil_draw_ops.cc.
References C, blender::ed::greasepencil::ExtensionData::centers, blender::ed::greasepencil::ExtensionData::circles, blender::ed::greasepencil::image_render::clear_view_matrix(), CTX_data_active_object(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), blender::ed::greasepencil::image_render::draw_circles(), blender::ed::greasepencil::image_render::draw_grease_pencil_strokes(), blender::ed::greasepencil::image_render::draw_lines(), blender::ed::greasepencil::ExtensionData::ends, blender::VArray< T >::ForSingle(), blender::VArray< T >::ForSpan(), grease_pencil_fill_get_extension_data(), blender::IndexRange::is_empty(), blender::ed::greasepencil::ExtensionData::lines, blender::ed::greasepencil::ExtensionData::radii, blender::ed::greasepencil::retrieve_visible_drawings(), blender::IndexRange::size(), blender::ed::greasepencil::ExtensionData::starts, RegionView3D::viewmat, ARegion::winx, and ARegion::winy.
Referenced by grease_pencil_fill_update_overlay().
|
static |
Definition at line 1063 of file grease_pencil_draw_ops.cc.
References C, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_cut, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_length, blender::ed::sculpt_paint::GreasePencilFillOpData::extension_mode, GP_FILL_EMODE_EXTEND, IFACE_, WorkspaceStatus::item(), and WorkspaceStatus::item_bool().
Referenced by grease_pencil_fill_invoke(), and grease_pencil_update_extend().
|
static |
Definition at line 1164 of file grease_pencil_draw_ops.cc.
References ED_region_draw_cb_activate(), ED_region_draw_cb_exit(), grease_pencil_fill_overlay_cb(), blender::ed::sculpt_paint::GreasePencilFillOpData::overlay_cb_handle, REGION_DRAW_POST_VIEW, ARegion::runtime, blender::ed::sculpt_paint::GreasePencilFillOpData::show_boundaries, and blender::ed::sculpt_paint::GreasePencilFillOpData::show_extension.
Referenced by grease_pencil_fill_invoke(), and grease_pencil_update_extend().
|
static |
Definition at line 309 of file grease_pencil_draw_ops.cc.
References grease_pencil_brush_stroke_cancel(), grease_pencil_brush_stroke_invoke(), grease_pencil_brush_stroke_modal(), grease_pencil_brush_stroke_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and paint_stroke_operator_properties().
Referenced by ED_operatortypes_grease_pencil_draw().
|
static |
Definition at line 2036 of file grease_pencil_draw_ops.cc.
References grease_pencil_erase_box_exec(), GREASE_PENCIL_OT_erase_box(), blender::ed::greasepencil::grease_pencil_painting_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, WM_gesture_box_cancel(), WM_gesture_box_invoke(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_erase_box().
|
static |
Definition at line 1959 of file grease_pencil_draw_ops.cc.
References grease_pencil_erase_lasso_exec(), GREASE_PENCIL_OT_erase_lasso(), blender::ed::greasepencil::grease_pencil_painting_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, WM_gesture_lasso_cancel(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by ED_operatortypes_grease_pencil_draw(), and GREASE_PENCIL_OT_erase_lasso().
|
static |
Definition at line 1771 of file grease_pencil_draw_ops.cc.
References grease_pencil_fill_cancel(), grease_pencil_fill_invoke(), grease_pencil_fill_modal(), blender::ed::greasepencil::grease_pencil_painting_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_boolean(), and RNA_def_property_flag().
Referenced by ED_operatortypes_grease_pencil_draw().
|
static |
Definition at line 415 of file grease_pencil_draw_ops.cc.
References grease_pencil_sculpt_paint_cancel(), grease_pencil_sculpt_paint_invoke(), grease_pencil_sculpt_paint_modal(), grease_pencil_sculpt_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and paint_stroke_operator_properties().
Referenced by ED_operatortypes_grease_pencil_draw().
|
static |
Definition at line 616 of file grease_pencil_draw_ops.cc.
References grease_pencil_vertex_brush_stroke_cancel(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_vertex_brush_stroke_modal(), grease_pencil_vertex_brush_stroke_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and paint_stroke_operator_properties().
Referenced by ED_operatortypes_grease_pencil_draw().
|
static |
Definition at line 510 of file grease_pencil_draw_ops.cc.
References grease_pencil_weight_brush_stroke_cancel(), grease_pencil_weight_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_modal(), grease_pencil_weight_brush_stroke_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and paint_stroke_operator_properties().
Referenced by ED_operatortypes_grease_pencil_draw().
|
static |
Definition at line 410 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_cancel().
Referenced by GREASE_PENCIL_OT_sculpt_paint().
|
static |
Definition at line 342 of file grease_pencil_draw_ops.cc.
References BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_report(), C, CTX_data_active_object(), CTX_data_scene(), wmOperator::customdata, blender::ed::greasepencil::ensure_active_keyframe(), blender::ed::greasepencil::has_editable_layer(), wmOperatorType::modal, NA_EDITED, NC_GPENCIL, OB_GREASE_PENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, paint_stroke_new(), wmOperator::reports, RPT_ERROR, stroke_done(), stroke_get_location(), stroke_redraw(), stroke_test_start(), stroke_update_step(), wmEvent::type, wmOperator::type, WM_event_add_modal_handler(), and WM_event_add_notifier().
Referenced by GREASE_PENCIL_OT_sculpt_paint().
|
static |
Definition at line 403 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_modal().
Referenced by GREASE_PENCIL_OT_sculpt_paint().
|
static |
Definition at line 331 of file grease_pencil_draw_ops.cc.
References C, blender::ed::greasepencil::grease_pencil_sculpting_poll(), and WM_toolsystem_active_tool_is_brush().
Referenced by GREASE_PENCIL_OT_sculpt_paint().
|
static |
Definition at line 1183 of file grease_pencil_draw_ops.cc.
References C, CTX_wm_region(), grease_pencil_fill_status_indicators(), grease_pencil_fill_update_overlay(), NA_EDITED, NC_GPENCIL, and WM_event_add_notifier().
Referenced by grease_pencil_fill_event_modal_map(), and grease_pencil_fill_modal().
|
static |
Definition at line 611 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_cancel().
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke().
|
static |
Definition at line 543 of file grease_pencil_draw_ops.cc.
References BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_report(), C, CTX_data_active_object(), CTX_data_scene(), wmOperator::customdata, blender::ed::greasepencil::ensure_active_keyframe(), blender::ed::greasepencil::has_editable_layer(), wmOperatorType::modal, NA_EDITED, NC_GPENCIL, OB_GREASE_PENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, paint_stroke_new(), wmOperator::reports, RPT_ERROR, stroke_done(), stroke_get_location(), stroke_redraw(), stroke_test_start(), stroke_update_step(), wmEvent::type, wmOperator::type, WM_event_add_modal_handler(), and WM_event_add_notifier().
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke().
|
static |
Definition at line 604 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_modal().
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke().
|
static |
Definition at line 532 of file grease_pencil_draw_ops.cc.
References C, blender::ed::greasepencil::grease_pencil_vertex_painting_poll(), and WM_toolsystem_active_tool_is_brush().
Referenced by GREASE_PENCIL_OT_vertex_brush_stroke().
|
static |
Definition at line 505 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_cancel().
Referenced by GREASE_PENCIL_OT_weight_brush_stroke().
|
static |
Definition at line 448 of file grease_pencil_draw_ops.cc.
References BKE_object_defgroup_active_index_get(), BKE_object_defgroup_active_is_locked(), BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_report(), C, CTX_data_active_object(), CTX_data_scene(), wmOperator::customdata, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), wmOperatorType::modal, OB_GREASE_PENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, paint_stroke_new(), wmOperator::reports, blender::ed::greasepencil::retrieve_editable_drawings(), RPT_ERROR, RPT_WARNING, stroke_done(), stroke_get_location(), stroke_redraw(), stroke_test_start(), stroke_update_step(), wmEvent::type, wmOperator::type, and WM_event_add_modal_handler().
Referenced by GREASE_PENCIL_OT_weight_brush_stroke().
|
static |
Definition at line 498 of file grease_pencil_draw_ops.cc.
References C, wmOperator::customdata, and paint_stroke_modal().
Referenced by GREASE_PENCIL_OT_weight_brush_stroke().
|
static |
Definition at line 437 of file grease_pencil_draw_ops.cc.
References C, blender::ed::greasepencil::grease_pencil_weight_painting_poll(), and WM_toolsystem_active_tool_is_brush().
Referenced by GREASE_PENCIL_OT_weight_brush_stroke().
|
static |
Definition at line 271 of file paint_stroke.cc.
References BRUSH_ANCHORED, BRUSH_DRAG_DOT, and Brush::flag.
Referenced by paint_stroke_new().
|
static |
Definition at line 276 of file paint_stroke.cc.
References BRUSH_ANCHORED, ELEM, Brush::flag, Sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SNAKE_HOOK, and SCULPT_BRUSH_TYPE_THUMB.
Referenced by paint_stroke_modal().
|
static |
Definition at line 232 of file paint_stroke.cc.
References ELEM, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), Sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SNAKE_HOOK, and SCULPT_BRUSH_TYPE_THUMB.
Referenced by paint_brush_update().
|
static |
Definition at line 321 of file sculpt_ops.cc.
References BKE_scene_graph_evaluated_ensure(), BKE_sculpt_toolsettings_data_ensure(), BKE_sculpt_update_object_for_edit(), BKE_sculptsession_free(), Object::data, DEG_id_tag_update(), depsgraph, blender::ed::sculpt_paint::face_set::find_next_available_id(), Object::id, ID_RECALC_GEOMETRY, blender::ed::sculpt_paint::face_set::initialize_none_to_id(), SculptSession::mode_type, OB_MODE_SCULPT, and Object::sculpt.
Referenced by object_sculpt_mode_enter().
| void blender::ed::sculpt_paint::init_transform | ( | bContext * | C, |
| Object & | ob, | ||
| const float | mval_fl[2], | ||
| const char * | undo_name ) |
Definition at line 55 of file sculpt_transform.cc.
References BKE_sculpt_update_object_for_edit(), C, blender::ed::sculpt_paint::filter::cache_init(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), depsgraph, SculptSession::filter_cache, Incremental, SculptSession::init_pivot_pos, SculptSession::init_pivot_rot, SculptSession::init_pivot_scale, Original, SculptSession::pivot_pos, SculptSession::pivot_rot, SculptSession::pivot_scale, blender::ed::sculpt_paint::undo::Position, SculptSession::prev_pivot_pos, SculptSession::prev_pivot_rot, SculptSession::prev_pivot_scale, blender::ed::sculpt_paint::undo::push_begin_ex(), Object::sculpt, ToolSettings::sculpt, SCULPT_TRANSFORM_MODE_RADIUS_ELASTIC, blender::ed::sculpt_paint::filter::Cache::transform_displacement_mode, Sculpt::transform_mode, and vert_random_access_ensure().
Referenced by blender::ed::transform::createTransSculpt().
|
static |
Definition at line 129 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::curve_mask_size, and diameter_to_curve_mask_size().
Referenced by paint_curve_mask_cache_update().
|
inlinestatic |
Definition at line 1842 of file grease_pencil_draw_ops.cc.
|
inlinestatic |
Definition at line 1859 of file grease_pencil_draw_ops.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::data(), isect_point_poly_v2_int(), and blender::Array< T, InlineBufferCapacity, Allocator >::size().
|
static |
Definition at line 96 of file paint_image_2d_curve_mask.cc.
References CurveMapping::changed_timestamp, Brush::curve, CurveMaskCache::last_curve_timestamp, and CurveMaskCache::sampled_curve.
Referenced by paint_curve_mask_cache_update().
|
inline |
Determines whether a given symmetry pass is valid.
Uses the ePaintSymmetryFlags enum.
symm is a bit combination of XYZ. 1 is X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ
Definition at line 506 of file paint_intern.hh.
Referenced by blender::ed::sculpt_paint::gesture::apply(), calc_symmetry_feather(), cursor_draw_point_with_symmetry(), do_symmetrical_brush_actions(), blender::ed::sculpt_paint::expand::find_active_connected_components_from_vert(), find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), SCULPT_is_vertex_inside_brush_radius_symm(), transform_radius_elastic(), blender::ed::sculpt_paint::pose::vert_inside_brush_radius(), vpaint_do_symmetrical_brush_actions(), and wpaint_do_symmetrical_brush_actions().
| void blender::ed::sculpt_paint::keymap_sculpt | ( | wmKeyConfig * | keyconf | ) |
Definition at line 1590 of file sculpt_ops.cc.
References blender::ed::sculpt_paint::filter::modal_keymap().
Referenced by ED_spacetypes_keymap().
|
static |
Definition at line 258 of file brush_asset_ops.cc.
References ASSET_LIBRARY_ESSENTIALS, and AssetLibraryReference::type.
Referenced by brush_asset_edit_metadata_poll(), and brush_asset_save_as_invoke().
|
static |
Definition at line 264 of file paint_cursor.cc.
References BKE_brush_size_get(), BKE_image_pool_free(), BKE_image_pool_new(), BKE_paint_get_overlay_flags(), BKE_paint_reset_overlay_invalid(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), MTex::brush_map_mode, col, data, GPU_DATA_UBYTE, GPU_R8, GPU_RGBA8, GPU_texture_create_2d(), GPU_texture_free(), GPU_texture_swizzle_set(), GPU_texture_update(), GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, init(), load_tex_task_cb_ex(), make_tex_snap(), Brush::mask_mtex, MEM_freeN(), MEM_malloc_arrayN(), Brush::mtex, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_VIEW, Tex::nodetree, ntreeTexBeginExecTree(), ntreeTexEndExecTree(), TexSnapshot::old_col, TexSnapshot::old_size, overlay_flags, TexSnapshot::overlay_texture, PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY, PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY, primary_snap, MTex::rot, bNodeTree::runtime, same_tex_snap(), ViewContext::scene, secondary_snap, size(), and MTex::tex.
Referenced by paint_draw_tex_overlay().
|
static |
Definition at line 418 of file paint_cursor.cc.
References BKE_brush_size_get(), BKE_curvemapping_init(), BKE_paint_get_overlay_flags(), BKE_paint_reset_overlay_invalid(), BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), cursor_snap, Brush::curve, Brush::curve_preset, data, GPU_DATA_UBYTE, GPU_R8, GPU_texture_create_2d(), GPU_texture_free(), GPU_texture_swizzle_set(), GPU_texture_update(), GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, init(), load_tex_cursor_task_cb(), MEM_freeN(), MEM_malloc_arrayN(), overlay_flags, PAINT_OVERLAY_INVALID_CURVE, ViewContext::scene, and size().
Referenced by paint_draw_cursor_overlay().
|
static |
Definition at line 386 of file paint_cursor.cc.
References BKE_brush_curve_strength_clamped(), data, i, len, size(), sqrtf, x, and y.
Referenced by load_tex_cursor().
|
static |
Definition at line 162 of file paint_cursor.cc.
References angle(), atan2f, BKE_image_pool_acquire_ibuf(), BKE_image_pool_release_ibuf(), BLI_task_parallel_thread_id(), MTex::brush_map_mode, ImBuf::byte_buffer, CLAMP, clamp_v4(), col, ImBufByteBuffer::colorspace, cosf, data, ImBufFloatBuffer::data, ELEM, ImBuf::float_buffer, i, Tex::ima, IMB_colormanagement_colorspace_to_scene_linear_v3(), Tex::iuser, len, linearrgb_to_srgb_v3_v3(), MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, paint_get_tex_pixel(), ViewContext::region, sinf, size(), sqrtf, MTex::tex, TEX_IMAGE, Brush::texture_sample_bias, Tex::type, ARegion::winx, ARegion::winy, x, and y.
Referenced by load_tex().
|
static |
Definition at line 141 of file paint_cursor.cc.
References ViewContext::region, snap(), ARegion::winx, and ARegion::winy.
Referenced by load_tex().
|
static |
Definition at line 780 of file sculpt_transform.cc.
References BLI_NOINLINE, i, blender::Span< T >::index_range(), and mask_border_weight_calc().
Referenced by mask_border_weight_calc().
| void blender::ed::sculpt_paint::move_last_point_and_resample | ( | MoveAndResampleBuffers & | buffer, |
| MutableSpan< float3float3 > | positions, | ||
| const float3float3 & | new_last_position ) |
| buffer | Reused memory to avoid reallocations when the function is called many times. |
Definition at line 366 of file curves_sculpt_brush.cc.
References blender::length_parameterize::accumulate_lengths(), blender::MutableSpan< T >::copy_from(), blender::math::distance(), blender::MutableSpan< T >::drop_back(), blender::IndexRange::drop_front(), Vector< T, InlineBufferCapacity, Allocator >::first(), i, Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::length_parameterize::interpolate(), blender::MutableSpan< T >::last(), Vector< T, InlineBufferCapacity, Allocator >::last(), blender::ed::sculpt_paint::MoveAndResampleBuffers::new_lengths, blender::ed::sculpt_paint::MoveAndResampleBuffers::new_positions, blender::ed::sculpt_paint::MoveAndResampleBuffers::orig_lengths, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::math::safe_divide(), blender::length_parameterize::sample_at_lengths(), blender::ed::sculpt_paint::MoveAndResampleBuffers::sample_factors, blender::ed::sculpt_paint::MoveAndResampleBuffers::sample_indices, blender::length_parameterize::segments_num(), and blender::MutableSpan< T >::size().
Referenced by blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook().
| std::optional< BMVert * > blender::ed::sculpt_paint::nearest_vert_calc_bmesh | ( | const bke::pbvh::Tree & | pbvh, |
| const float3float3 & | location, | ||
| const float | max_distance, | ||
| const bool | use_original ) |
Definition at line 694 of file sculpt.cc.
References b, BKE_pbvh_bmesh_node_unique_verts(), BM_elem_flag_test, BM_ELEM_HIDDEN, blender::math::distance_squared(), blender::index_mask::IndexMask::foreach_index(), i, blender::index_mask::IndexMask::index_range(), blender::index_mask::IndexMask::is_empty(), node_in_sphere(), blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::pbvh::search_nodes(), and blender::index_mask::IndexMask::slice().
Referenced by find_symm_verts_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), and blender::ed::sculpt_paint::boundary::init_boundary_bmesh().
| std::optional< SubdivCCGCoord > blender::ed::sculpt_paint::nearest_vert_calc_grids | ( | const bke::pbvh::Tree & | pbvh, |
| const SubdivCCG & | subdiv_ccg, | ||
| const float3float3 & | location, | ||
| const float | max_distance, | ||
| const bool | use_original ) |
Definition at line 640 of file sculpt.cc.
References b, BKE_subdiv_ccg_foreach_visible_grid_vert(), BKE_subdiv_ccg_key_top_level(), blender::math::distance_squared(), blender::index_mask::IndexMask::foreach_index(), SubdivCCG::grid_hidden, SubdivCCGCoord::grid_index, blender::bke::ccg::grid_range(), CCGKey::grid_size, i, blender::index_mask::IndexMask::index_range(), blender::index_mask::IndexMask::is_empty(), node_in_sphere(), blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), SubdivCCG::positions, blender::bke::pbvh::search_nodes(), blender::index_mask::IndexMask::slice(), SubdivCCGCoord::x, and SubdivCCGCoord::y.
Referenced by find_symm_verts_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), and blender::ed::sculpt_paint::boundary::init_boundary_grids().
| std::optional< int > blender::ed::sculpt_paint::nearest_vert_calc_mesh | ( | const bke::pbvh::Tree & | pbvh, |
| const Span< float3float3 > | vert_positions, | ||
| const Span< bool > | hide_vert, | ||
| const float3float3 & | location, | ||
| const float | max_distance, | ||
| const bool | use_original ) |
Definition at line 593 of file sculpt.cc.
References b, blender::math::distance_squared(), blender::index_mask::IndexMask::foreach_index(), i, blender::index_mask::IndexMask::index_range(), blender::index_mask::IndexMask::is_empty(), blender::Span< T >::is_empty(), node_in_sphere(), blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::pbvh::search_nodes(), blender::index_mask::IndexMask::slice(), and verts.
Referenced by find_symm_verts_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), and blender::ed::sculpt_paint::boundary::init_boundary_mesh().
|
static |
Definition at line 4112 of file sculpt.cc.
References BRUSH_CLOTH_DEFORM_GRAB, Brush::cloth_deform_type, ELEM, need_delta_for_tip_orientation(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLAY_STRIPS, SCULPT_BRUSH_TYPE_CLAY_THUMB, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, SCULPT_BRUSH_TYPE_NUDGE, SCULPT_BRUSH_TYPE_PINCH, and SCULPT_BRUSH_TYPE_SNAKE_HOOK.
Referenced by brush_delta_update(), and need_delta_for_tip_orientation().
|
static |
Definition at line 4087 of file sculpt.cc.
References BRUSH_ANCHORED, BRUSH_CLOTH_DEFORM_GRAB, Brush::cloth_deform_type, ELEM, Brush::flag, need_delta_from_anchored_origin(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_SMEAR, and SCULPT_BRUSH_TYPE_THUMB.
Referenced by brush_delta_update(), and need_delta_from_anchored_origin().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_add_operation | ( | ) |
Definition at line 517 of file curves_sculpt_add.cc.
References new_add_operation().
Referenced by new_add_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_comb_operation | ( | ) |
Definition at line 405 of file curves_sculpt_comb.cc.
Referenced by start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_delete_operation | ( | ) |
Definition at line 271 of file curves_sculpt_delete.cc.
Referenced by start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_density_operation | ( | const BrushStrokeMode | brush_mode, |
| const bContext & | C, | ||
| const StrokeExtension & | stroke_start ) |
Definition at line 909 of file curves_sculpt_density.cc.
References C, new_density_operation(), and use_add_density_mode().
Referenced by new_density_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_grow_shrink_operation | ( | const BrushStrokeMode | brush_mode, |
| const bContext & | C ) |
Definition at line 498 of file curves_sculpt_grow_shrink.cc.
References BKE_paint_brush_for_read(), BRUSH_CURVES_SCULPT_FLAG_SCALE_UNIFORM, BRUSH_DIR_IN, BRUSH_STROKE_INVERT, C, CTX_data_scene(), ToolSettings::curves_sculpt, Brush::curves_sculpt_settings, Brush::flag, BrushCurvesSculptSettings::flag, CurvesSculpt::paint, and Scene::toolsettings.
Referenced by start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_pinch_operation | ( | const BrushStrokeMode | brush_mode, |
| const bContext & | C ) |
Definition at line 285 of file curves_sculpt_pinch.cc.
References BKE_paint_brush_for_read(), BRUSH_DIR_IN, BRUSH_STROKE_INVERT, C, CTX_data_scene(), ToolSettings::curves_sculpt, Brush::flag, CurvesSculpt::paint, and Scene::toolsettings.
Referenced by start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_puff_operation | ( | ) |
Definition at line 347 of file curves_sculpt_puff.cc.
Referenced by start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_selection_paint_operation | ( | const BrushStrokeMode | brush_mode, |
| const bContext & | C ) |
Definition at line 392 of file curves_sculpt_selection_paint.cc.
References BKE_paint_brush(), BRUSH_DIR_IN, BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, C, CTX_data_scene(), ToolSettings::curves_sculpt, ELEM, Brush::flag, new_selection_paint_operation(), CurvesSculpt::paint, and Scene::toolsettings.
Referenced by new_selection_paint_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_slide_operation | ( | ) |
Definition at line 480 of file curves_sculpt_slide.cc.
References new_slide_operation().
Referenced by new_slide_operation(), and start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_smooth_operation | ( | ) |
Definition at line 258 of file curves_sculpt_smooth.cc.
Referenced by start_brush_operation().
| std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_snake_hook_operation | ( | ) |
Definition at line 300 of file curves_sculpt_snake_hook.cc.
Referenced by start_brush_operation().
|
static |
Definition at line 199 of file sculpt_ops.cc.
References C, CTX_data_active_object(), blender::bke::pbvh::Grids, OB_MESH, blender::bke::object::pbvh_get(), Object::sculpt, SCULPT_mode_poll(), blender::bke::pbvh::Tree::type(), and Object::type.
Referenced by SCULPT_OT_symmetrize().
| bool blender::ed::sculpt_paint::node_fully_masked_or_hidden | ( | const bke::pbvh::Node & | node | ) |
Definition at line 2399 of file sculpt.cc.
References BKE_pbvh_node_fully_hidden_get(), and BKE_pbvh_node_fully_masked_get().
Referenced by average_mask_border_position(), average_unmasked_position(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), gather_nodes(), and pbvh_gather_generic().
| bool blender::ed::sculpt_paint::node_in_cylinder | ( | const DistRayAABB_Precalc & | ray_dist_precalc, |
| const bke::pbvh::Node & | node, | ||
| const float | radius_sq, | ||
| const bool | original ) |
Definition at line 2420 of file sculpt.cc.
References blender::bke::pbvh::Node::bounds(), blender::bke::pbvh::Node::bounds_orig(), and dist_squared_ray_to_aabb_v3().
Referenced by gather_nodes(), pbvh_gather_generic(), and blender::ed::sculpt_paint::vwpaint::pbvh_gather_generic().
| bool blender::ed::sculpt_paint::node_in_sphere | ( | const bke::pbvh::Node & | node, |
| const float3float3 & | location, | ||
| const float | radius_sq, | ||
| const bool | original ) |
Definition at line 2410 of file sculpt.cc.
References blender::bke::pbvh::Node::bounds(), blender::bke::pbvh::Node::bounds_orig(), blender::math::clamp(), and blender::math::distance_squared().
Referenced by blender::ed::sculpt_paint::cloth::brush_affected_nodes_gather(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), fake_neighbor_search(), gather_nodes(), nearest_vert_calc_bmesh(), nearest_vert_calc_grids(), nearest_vert_calc_mesh(), pbvh_gather_cursor_update(), pbvh_gather_generic(), and blender::ed::sculpt_paint::vwpaint::pbvh_gather_generic().
| bool blender::ed::sculpt_paint::object_active_color_fill | ( | Object & | ob, |
| const float | fill_color[4], | ||
| bool | only_selected ) |
Fills the object's active color attribute layer with the fill color.
| only_selected | Limit the fill to selected faces or vertices. |
Definition at line 2340 of file paint_vertex.cc.
References fill_active_color().
Referenced by blender::ed::geometry::geometry_color_attribute_add_exec(), and proj_paint_color_attribute_create().
| void blender::ed::sculpt_paint::object_sculpt_mode_enter | ( | bContext * | C, |
| Depsgraph & | depsgraph, | ||
| ReportList * | reports ) |
Definition at line 478 of file sculpt_ops.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), depsgraph, object_sculpt_mode_enter(), and reports.
| void blender::ed::sculpt_paint::object_sculpt_mode_enter | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Scene & | scene, | ||
| Object & | ob, | ||
| bool | force_dyntopo, | ||
| ReportList * | reports ) |
Definition at line 385 of file sculpt_ops.cc.
References BKE_mesh_from_object(), BKE_paint_get_active_from_paintmode(), BKE_paint_init(), BKE_report(), BKE_reportf(), BKE_sculpt_multires_active(), BLI_assert_unreachable, blender::ed::sculpt_paint::dyntopo::check_attribute_warning(), DEG_id_tag_update(), depsgraph, blender::ed::sculpt_paint::undo::DyntopoBegin, ED_paint_cursor_start(), blender::ed::sculpt_paint::dyntopo::EDATA, blender::ed::sculpt_paint::dyntopo::enable_ex(), ensure_valid_pivot(), fabsf, ListBase::first, flag, Object::id, ID_RECALC_SYNC_TO_EVAL, init_sculpt_mode_session(), is_negative_m4(), blender::ed::sculpt_paint::dyntopo::LDATA, ME_SCULPT_DYNAMIC_TOPOLOGY, Object::mode, blender::ed::sculpt_paint::dyntopo::MODIFIER, OB_MODE_SCULPT, PAINT_CURSOR_SCULPT, blender::ed::sculpt_paint::undo::push_begin_ex(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_node(), reports, RPT_, RPT_WARNING, Object::scale, Sculpt, SCULPT_brush_cursor_poll(), blender::ed::sculpt_paint::dyntopo::VDATA, and Main::wm.
Referenced by ED_editors_init(), object_sculpt_mode_enter(), sculpt_mode_toggle_exec(), and blender::ed::sculpt_paint::undo::step_decode().
| void blender::ed::sculpt_paint::object_sculpt_mode_exit | ( | bContext * | C, |
| Depsgraph & | depsgraph ) |
Definition at line 533 of file sculpt_ops.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), depsgraph, and object_sculpt_mode_exit().
| void blender::ed::sculpt_paint::object_sculpt_mode_exit | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Scene & | scene, | ||
| Object & | ob ) |
Definition at line 488 of file sculpt_ops.cc.
References BKE_mesh_from_object(), BKE_object_free_derived_caches(), BKE_sculpt_multires_active(), BKE_sculptsession_free(), SculptSession::bm, DEG_id_tag_update(), depsgraph, blender::ed::sculpt_paint::dyntopo::disable_with_undo(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, ME_SCULPT_DYNAMIC_TOPOLOGY, Object::mode, multires_flush_sculpt_updates(), OB_MODE_SCULPT, paint_cursor_delete_textures(), and Object::sculpt.
Referenced by blender::ed::object::ed_object_mode_generic_exit_ex(), geometry_extract_apply(), object_sculpt_mode_exit(), and sculpt_mode_toggle_exec().
| float blender::ed::sculpt_paint::object_space_radius_get | ( | const ViewContext & | vc, |
| const Scene & | scene, | ||
| const Brush & | brush, | ||
| const float3float3 & | location, | ||
| float | scale_factor = 1.0 ) |
Retrieve or calculate the object space radius depending on brush settings.
Definition at line 115 of file sculpt.cc.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_use_locked_size(), and paint_calc_object_space_radius().
Referenced by blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::trim::calculate_depth(), cursor_geometry_info_update(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), paint_cursor_update_object_space_radius(), paint_space_stroke_spacing(), sculpt_update_cache_variants(), and stroke_get_location_bvh_ex().
| void blender::ed::sculpt_paint::operatortypes_sculpt | ( | ) |
Definition at line 1550 of file sculpt_ops.cc.
References SCULPT_OT_brush_stroke(), blender::ed::sculpt_paint::cloth::SCULPT_OT_cloth_filter(), blender::ed::sculpt_paint::color::SCULPT_OT_color_filter(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_detail_flood_fill(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dynamic_topology_toggle(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dyntopo_detail_size_edit(), blender::ed::sculpt_paint::expand::SCULPT_OT_expand(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_lasso_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_line_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_polyline_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_create(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_edit(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_init(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_randomize_colors(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_by_color(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_filter(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_boundary(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_cavity(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_init(), blender::ed::sculpt_paint::filter::SCULPT_OT_mesh_filter(), SCULPT_OT_optimize(), blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture(), SCULPT_OT_sample_color(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size(), SCULPT_OT_sculptmode_toggle(), SCULPT_OT_set_persistent_base(), SCULPT_OT_set_pivot_position(), SCULPT_OT_symmetrize(), 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(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
|
static |
Definition at line 165 of file sculpt_ops.cc.
References BKE_sculptsession_free_pbvh(), C, CTX_data_active_object(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, NC_OBJECT, ND_DRAW, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by SCULPT_OT_optimize().
|
inline |
Definition at line 815 of file sculpt_intern.hh.
References orig_color_data_lookup_mesh().
Referenced by blender::ed::sculpt_paint::color::color_filter_task(), and blender::ed::sculpt_paint::color::do_paint_brush_task().
| std::optional< Span< float4 > > blender::ed::sculpt_paint::orig_color_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2269 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::Node::col, blender::ed::sculpt_paint::undo::Color, and blender::ed::sculpt_paint::undo::get_node().
Referenced by orig_color_data_get_mesh(), and blender::ed::sculpt_paint::undo::restore_color_from_undo_step().
| std::optional< Span< int > > blender::ed::sculpt_paint::orig_face_set_data_lookup_grids | ( | const Object & | object, |
| const bke::pbvh::GridsNode & | node ) |
Definition at line 2289 of file sculpt_undo.cc.
References Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::Node::face_sets, blender::ed::sculpt_paint::undo::FaceSet, and blender::ed::sculpt_paint::undo::get_node().
Referenced by blender::ed::sculpt_paint::undo::restore_face_set_from_undo_step().
| std::optional< Span< int > > blender::ed::sculpt_paint::orig_face_set_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2279 of file sculpt_undo.cc.
References Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::Node::face_sets, blender::ed::sculpt_paint::undo::FaceSet, and blender::ed::sculpt_paint::undo::get_node().
Referenced by blender::ed::sculpt_paint::undo::restore_face_set_from_undo_step().
| std::optional< Span< float > > blender::ed::sculpt_paint::orig_mask_data_lookup_grids | ( | const Object & | object, |
| const bke::pbvh::GridsNode & | node ) |
Definition at line 2309 of file sculpt_undo.cc.
References Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::get_node(), blender::ed::sculpt_paint::undo::Mask, and blender::ed::sculpt_paint::undo::Node::mask.
Referenced by blender::ed::sculpt_paint::undo::restore_mask_from_undo_step().
| std::optional< Span< float > > blender::ed::sculpt_paint::orig_mask_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2299 of file sculpt_undo.cc.
References Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::sculpt_paint::undo::get_node(), blender::ed::sculpt_paint::undo::Mask, and blender::ed::sculpt_paint::undo::Node::mask.
Referenced by blender::ed::sculpt_paint::undo::restore_mask_from_undo_step().
| void blender::ed::sculpt_paint::orig_position_data_gather_bmesh | ( | const BMLog & | bm_log, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< float3float3 > | positions, | ||
| MutableSpan< float3float3 > | normals ) |
Definition at line 2249 of file sculpt_undo.cc.
References BM_log_original_vert_data(), i, blender::MutableSpan< T >::is_empty(), normals, and verts.
Referenced by calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), and transform_node_bmesh().
|
inline |
Definition at line 800 of file sculpt_intern.hh.
References BLI_assert, orig_position_data_lookup_grids(), and result.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), and transform_node_grids().
|
inline |
Definition at line 790 of file sculpt_intern.hh.
References BLI_assert, orig_position_data_lookup_mesh(), and result.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), and transform_node_mesh().
| std::optional< OrigPositionData > blender::ed::sculpt_paint::orig_position_data_lookup_grids | ( | const Object & | object, |
| const bke::pbvh::GridsNode & | node ) |
Definition at line 2239 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::get_node(), blender::ed::sculpt_paint::undo::Node::normal, blender::ed::sculpt_paint::undo::Position, and blender::ed::sculpt_paint::undo::Node::position.
Referenced by calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), orig_position_data_get_grids(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), sculpt_find_nearest_to_ray_cb(), and sculpt_raycast_cb().
| std::optional< OrigPositionData > blender::ed::sculpt_paint::orig_position_data_lookup_mesh | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Definition at line 2227 of file sculpt_undo.cc.
References orig_position_data_lookup_mesh_all_verts(), result, Span< T >::size(), and blender::bke::pbvh::MeshNode::verts().
Referenced by calc_area_normal_and_center_node_mesh(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), orig_position_data_get_mesh(), and blender::ed::sculpt_paint::undo::restore_position_from_undo_step().
| std::optional< OrigPositionData > blender::ed::sculpt_paint::orig_position_data_lookup_mesh_all_verts | ( | const Object & | object, |
| const bke::pbvh::MeshNode & | node ) |
Retrieve positions from the latest undo state. This is often used for modal actions that depend on the initial state of the geometry from before the start of the action.
Definition at line 2217 of file sculpt_undo.cc.
References blender::ed::sculpt_paint::undo::get_node(), blender::ed::sculpt_paint::undo::Node::normal, blender::ed::sculpt_paint::undo::Position, and blender::ed::sculpt_paint::undo::Node::position.
Referenced by orig_position_data_lookup_mesh(), sculpt_find_nearest_to_ray_cb(), and sculpt_raycast_cb().
| bool blender::ed::sculpt_paint::paint_brush_cursor_poll | ( | bContext * | C | ) |
Returns true if the brush cursor should be activated.
Definition at line 1794 of file paint_stroke.cc.
References brush_tool_get(), C, bToolRef_Runtime::cursor, bToolRef::runtime, and WM_CURSOR_DEFAULT.
Referenced by paint_stroke_modal(), and SCULPT_brush_cursor_poll().
|
static |
Definition at line 551 of file paint_stroke.cc.
References BKE_brush_use_alpha_pressure(), BKE_brush_use_size_pressure(), BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), BRUSH_SPACING_PRESSURE, C, copy_v3_v3(), CTX_data_scene(), Brush::dash_ratio, Brush::dash_samples, UnifiedPaintSettings::last_hit, UnifiedPaintSettings::last_location, blender::ed::sculpt_paint::PaintStroke::last_mouse_position, blender::ed::sculpt_paint::PaintStroke::last_pressure, blender::ed::sculpt_paint::PaintStroke::last_scene_spacing_delta, blender::ed::sculpt_paint::PaintStroke::last_world_space_position, ViewContext::obact, blender::ed::sculpt_paint::PaintStroke::original, paint_brush_update(), paint_stroke_jitter_pos(), paint_stroke_use_dash(), paint_stroke_use_scene_spacing(), UnifiedPaintSettings::pixel_radius, wmOperator::ptr, RNA_collection_add(), RNA_collection_clear(), RNA_float_set(), RNA_float_set_array(), stroke_get_location_bvh(), blender::ed::sculpt_paint::PaintStroke::tilt, blender::ed::sculpt_paint::PaintStroke::tot_samples, blender::math::transform_point(), blender::ed::sculpt_paint::PaintStroke::update_step, blender::ed::sculpt_paint::PaintStroke::ups, and blender::ed::sculpt_paint::PaintStroke::vc.
Referenced by paint_line_strokes_spacing(), paint_space_stroke(), paint_stroke_curve_end(), paint_stroke_line_end(), and paint_stroke_modal().
| bool blender::ed::sculpt_paint::paint_brush_tool_poll | ( | bContext * | C | ) |
Returns true if the active tool uses brushes.
Definition at line 1788 of file paint_stroke.cc.
References brush_tool_get(), and C.
Referenced by paint_cursor_context_init(), paint_cursor_draw_3d_view_brush_cursor_inactive(), and SCULPT_poll().
| bool blender::ed::sculpt_paint::paint_brush_update | ( | bContext * | C, |
| const Brush & | brush, | ||
| PaintMode | mode, | ||
| PaintStroke * | stroke, | ||
| const float | mouse_init[2], | ||
| float | mouse[2], | ||
| float | pressure, | ||
| float | r_location[3], | ||
| bool * | r_location_is_set ) |
Initialize the stroke cache variants from operator properties.
Definition at line 307 of file paint_stroke.cc.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, atan2f, BKE_brush_randomize_texture_coords(), BKE_brush_size_get(), BKE_brush_use_size_pressure(), BRUSH_ANCHORED, MTex::brush_angle_mode, BRUSH_CURVE, BRUSH_EDGE_TO_EDGE, blender::ed::sculpt_paint::PaintStroke::brush_init, MTex::brush_map_mode, UnifiedPaintSettings::brush_rotation, UnifiedPaintSettings::brush_rotation_sec, C, blender::ed::sculpt_paint::PaintStroke::cached_size_pressure, copy_v2_v2(), CTX_data_scene(), UnifiedPaintSettings::draw_anchored, ELEM, Brush::flag, blender::RandomNumberGenerator::from_random_seed(), blender::ed::sculpt_paint::PaintStroke::get_location, image_paint_brush_type_require_location(), blender::ed::sculpt_paint::PaintStroke::initial_mouse, UnifiedPaintSettings::initial_pixel_radius, UnifiedPaintSettings::last_rake, M_PI, Brush::mask_mtex, UnifiedPaintSettings::mask_tex_mouse, Brush::mtex, MTEX_ANGLE_RANDOM, MTEX_MAP_MODE_AREA, MTEX_MAP_MODE_RANDOM, MTEX_MAP_MODE_VIEW, blender::ed::sculpt_paint::PaintStroke::original, paint_calculate_rake_rotation(), paint_supports_dynamic_size(), paint_supports_dynamic_tex_coords(), UnifiedPaintSettings::pixel_radius, blender::ed::sculpt_paint::PaintStroke::rake_started, MTex::random_angle, blender::ed::sculpt_paint::PaintStroke::rng, UnifiedPaintSettings::size_pressure_value, sqrtf, UnifiedPaintSettings::stroke_active, blender::ed::sculpt_paint::PaintStroke::stroke_distance, MTex::tex, UnifiedPaintSettings::tex_mouse, blender::ed::sculpt_paint::PaintStroke::ups, zero_v3(), and blender::ed::sculpt_paint::PaintStroke::zoom_2d.
Referenced by paint_brush_stroke_add_step(), and blender::ed::sculpt_paint::image::ops::paint::paint_exec().
|
static |
Definition at line 2127 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::alpha_overlay_drawn, blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, paint_draw_alpha_overlay(), blender::ed::sculpt_paint::PaintCursorContext::ups, blender::ed::sculpt_paint::PaintCursorContext::vc, and blender::ed::sculpt_paint::PaintCursorContext::zoomx.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1322 of file paint_cursor.cc.
References Brush::add_col, BKE_brush_size_get(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_CURVE, BRUSH_DIR_IN, blender::ed::sculpt_paint::PaintCursorContext::C, C, CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_screen(), CTX_wm_window(), Cursor2D, Cursor3D, blender::ed::sculpt_paint::PaintCursorContext::cursor_type, Curve, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, SculptSession::draw_faded_cursor, UnifiedPaintSettings::draw_inverted, ED_view3d_viewcontext_init(), blender::ed::sculpt_paint::PaintCursorContext::final_radius, Brush::flag, get_imapaint_zoom(), blender::ed::sculpt_paint::PaintCursorContext::is_stroke_active, max_ff(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_brush_tool_poll(), paint_use_2d_cursor(), blender::ed::sculpt_paint::PaintCursorContext::region, ARegion::regiontype, RGN_TYPE_WINDOW, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::ed::sculpt_paint::PaintCursorContext::screen, Object::sculpt, blender::ed::sculpt_paint::PaintCursorContext::ss, UnifiedPaintSettings::stroke_active, Brush::sub_col, blender::bke::brush::supports_secondary_cursor_color(), blender::ed::sculpt_paint::PaintCursorContext::tilt, Scene::toolsettings, blender::ed::sculpt_paint::PaintCursorContext::translation, ToolSettings::unified_paint_settings, blender::ed::sculpt_paint::PaintCursorContext::ups, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, blender::ed::sculpt_paint::PaintCursorContext::wm, xy, and blender::ed::sculpt_paint::PaintCursorContext::zoomx.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1997 of file paint_cursor.cc.
References BLI_assert, blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_CLOTH_FORCE_FALLOFF_PLANE, BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, BRUSH_CLOTH_SIMULATION_AREA_LOCAL, blender::ed::sculpt_paint::PaintCursorContext::C, SculptSession::cache, Brush::cloth_force_falloff_type, Brush::cloth_sim_limit, Brush::cloth_simulation_area_type, CTX_wm_view3d(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), ED_view3d_draw_setup_view(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::brushes::multiplane_scrape_preview_draw(), ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::cloth::plane_falloff_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, Sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, sculpt_geometry_preview_lines_draw(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), blender::ed::sculpt_paint::cloth::simulation_limits_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, ARegion::winrct, blender::ed::sculpt_paint::PaintCursorContext::wm, wmViewport(), and wmWindowViewport().
Referenced by paint_cursor_draw_3D_view_brush_cursor().
|
static |
Definition at line 2077 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::is_stroke_active, blender::ed::sculpt_paint::PaintCursorContext::mode, paint_cursor_cursor_draw_3d_view_brush_cursor_active(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_sculpt_session_update_and_init(), paint_draw_legacy_3D_view_brush_cursor(), Sculpt, and blender::ed::sculpt_paint::PaintCursorContext::ss.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1809 of file paint_cursor.cc.
References SculptSession::active_vert(), SculptSession::active_vert_index(), SculptSession::active_vert_position(), blender::ed::sculpt_paint::PaintCursorContext::alpha_overlay_drawn, BKE_sculpt_update_object_for_edit(), BLI_assert, bm, SculptSession::bm, BM_vert_at_index(), blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, BRUSH_GRAB_ACTIVE_VERTEX, blender::ed::sculpt_paint::PaintCursorContext::C, Brush::cloth_simulation_area_type, BMVert::co, CTX_wm_view3d(), cursor_draw_point_screen_space(), cursor_draw_point_with_symmetry(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), ED_view3d_draw_setup_view(), blender::ed::sculpt_paint::boundary::edges_preview_draw(), SculptSession::expand_cache, Brush::falloff_shape, Brush::flag, geometry_preview_lines_update(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), blender::bke::pbvh::Grids, immUniformColor3fvAlpha(), blender::ed::sculpt_paint::expand::Cache::initial_active_vert, blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, blender::ed::sculpt_paint::PaintCursorContext::location, blender::bke::pbvh::Mesh, ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, paint_brush_tool_poll(), paint_cursor_draw_main_inactive_cursor(), paint_cursor_drawing_setup_cursor_space(), paint_cursor_pose_brush_origins_draw(), paint_cursor_pose_brush_segments_draw(), paint_cursor_preview_boundary_data_pivot_draw(), paint_cursor_preview_boundary_data_update(), paint_cursor_update_object_space_radius(), paint_draw_3D_view_inactive_brush_cursor(), paint_draw_legacy_3D_view_brush_cursor(), PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::boundary::pivot_line_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, SculptSession::pose_ik_chain_preview, SubdivCCG::positions, blender::ed::sculpt_paint::PaintCursorContext::prev_active_vert_index, blender::ed::sculpt_paint::pose::preview_ik_chain_init(), blender::ed::sculpt_paint::PaintCursorContext::radius, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_LAYER, SCULPT_BRUSH_TYPE_POSE, sculpt_geometry_preview_lines_draw(), SCULPT_layer_brush_height_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::cloth::simulation_limits_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, SculptSession::subdiv_ccg, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::bke::pbvh::vert_positions_eval(), vert_positions_for_grab_active_get(), vert_random_access_ensure(), blender::ed::sculpt_paint::PaintCursorContext::win, ARegion::winrct, blender::ed::sculpt_paint::PaintCursorContext::wm, wmViewport(), and wmWindowViewport().
Referenced by paint_cursor_draw_3D_view_brush_cursor().
|
static |
Definition at line 1735 of file paint_cursor.cc.
References BKE_brush_alpha_get(), blender::ed::sculpt_paint::PaintCursorContext::brush, clamp_f(), GPU_line_width(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::PaintCursorContext::radius, and blender::ed::sculpt_paint::PaintCursorContext::scene.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1713 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, blender::math::from_rotation(), GPU_matrix_mul, blender::ed::sculpt_paint::PaintCursorContext::location, blender::ed::sculpt_paint::PaintCursorContext::normal, ViewContext::obact, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), ViewContext::rv3d, blender::bke::brush::supports_tilt(), blender::ed::sculpt_paint::PaintCursorContext::tilt, tilt_apply_to_normal(), Brush::tilt_strength_factor, blender::math::translate(), blender::ed::sculpt_paint::PaintCursorContext::vc, and RegionView3D::viewinv.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 2097 of file paint_cursor.cc.
References RegionView3D::rflag, ViewContext::rv3d, RV3D_NAVIGATING, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by paint_draw_cursor().
|
static |
Definition at line 2103 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, ELEM, Paint::flags, Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_FILL, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::paint, PAINT_SHOW_BRUSH, Texture2D, and Texture3D.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1769 of file paint_cursor.cc.
References cursor_draw_point_screen_space(), i, immUniformColor4f(), ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::pos, SculptSession::pose_ik_chain_preview, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::ss, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1751 of file paint_cursor.cc.
References BLI_assert, GPU_line_width(), GPU_PRIM_LINES, i, immBegin(), immEnd(), immUniformColor4f(), immVertex3fv(), blender::ed::sculpt_paint::PaintCursorContext::pos, SculptSession::pose_ik_chain_preview, and blender::ed::sculpt_paint::PaintCursorContext::ss.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1783 of file paint_cursor.cc.
References SculptSession::boundary_preview, cursor_draw_point_screen_space(), immUniformColor4f(), ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::ss, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1798 of file paint_cursor.cc.
References BKE_sculpt_update_object_for_edit(), SculptSession::boundary_preview, blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, ViewContext::obact, blender::ed::sculpt_paint::boundary::preview_data_init(), blender::ed::sculpt_paint::PaintCursorContext::radius, blender::ed::sculpt_paint::PaintCursorContext::ss, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 2168 of file paint_cursor.cc.
References GPU_blend(), GPU_BLEND_NONE, GPU_line_smooth(), and immUnbindProgram().
Referenced by paint_draw_cursor().
|
static |
Definition at line 1425 of file paint_cursor.cc.
References SculptSession::active_vert_index(), BKE_brush_size_set(), BKE_brush_use_locked_size(), BLI_assert, blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::C, C, CTX_data_tool_settings(), cursor_geometry_info_update(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, Brush::falloff_shape, blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, UnifiedPaintSettings::last_hit, UnifiedPaintSettings::last_location, blender::ed::sculpt_paint::CursorGeometryInfo::location, blender::ed::sculpt_paint::PaintCursorContext::location, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ed::sculpt_paint::CursorGeometryInfo::normal, blender::ed::sculpt_paint::PaintCursorContext::normal, ViewContext::obact, paint_cursor_update_pixel_radius(), paint_cursor_update_unprojected_radius(), PAINT_FALLOFF_SHAPE_SPHERE, blender::bke::object::pbvh_ensure(), blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, blender::ed::sculpt_paint::PaintCursorContext::prev_active_vert_index, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::ed::sculpt_paint::PaintCursorContext::scene_space_location, Sculpt, ToolSettings::sculpt, blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::PaintCursorContext::ss, UnifiedPaintSettings::stroke_active, blender::ed::sculpt_paint::PaintCursorContext::ups, blender::ed::sculpt_paint::PaintCursorContext::vc, vert_random_access_ensure(), ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by paint_cursor_draw_3D_view_brush_cursor().
|
static |
Definition at line 2148 of file paint_cursor.cc.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immVertexFormat(), and blender::ed::sculpt_paint::PaintCursorContext::pos.
Referenced by paint_draw_cursor().
|
static |
Definition at line 2158 of file paint_cursor.cc.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immVertexFormat(), and blender::ed::sculpt_paint::PaintCursorContext::pos.
Referenced by paint_draw_cursor().
|
static |
Definition at line 2138 of file paint_cursor.cc.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, UnifiedPaintSettings::draw_anchored, blender::ed::sculpt_paint::PaintCursorContext::final_radius, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::translation, blender::ed::sculpt_paint::PaintCursorContext::ups, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1707 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::location, object_space_radius_get(), blender::ed::sculpt_paint::PaintCursorContext::radius, blender::ed::sculpt_paint::PaintCursorContext::scene, and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 1403 of file paint_cursor.cc.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_paint_brush(), blender::ed::sculpt_paint::PaintCursorContext::C, CTX_data_tool_settings(), blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, blender::ed::sculpt_paint::PaintCursorContext::location, ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::paint, Sculpt::paint, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, project_brush_radius(), blender::ed::sculpt_paint::PaintCursorContext::scene, blender::ed::sculpt_paint::PaintCursorContext::scene_space_location, ToolSettings::sculpt, blender::math::transform_point(), and blender::ed::sculpt_paint::PaintCursorContext::vc.
Referenced by paint_cursor_sculpt_session_update_and_init().
|
static |
Definition at line 2116 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::mode, paint_calculate_rake_rotation(), UnifiedPaintSettings::stroke_active, blender::ed::sculpt_paint::PaintCursorContext::translation, and blender::ed::sculpt_paint::PaintCursorContext::ups.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1038 of file paint_cursor.cc.
References UnifiedPaintSettings::anchored_size, BKE_brush_size_get(), BKE_brush_unprojected_radius_set(), BKE_brush_use_locked_size(), BKE_brush_use_size_pressure(), BRUSH_ANCHORED, UnifiedPaintSettings::draw_anchored, Brush::flag, paint_calc_object_space_radius(), ViewContext::scene, UnifiedPaintSettings::size_pressure_value, and UnifiedPaintSettings::stroke_active.
Referenced by paint_cursor_sculpt_session_update_and_init().
|
static |
Definition at line 1670 of file paint_cursor.cc.
References GPencil, grease_pencil_brush_cursor_draw(), blender::ed::sculpt_paint::PaintCursorContext::mode, paint_draw_2D_view_brush_cursor_default(), and VertexGPencil.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1500 of file paint_cursor.cc.
References BKE_brush_use_size_pressure(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::final_radius, GPU_line_width(), imm_draw_circle_wire_2d(), immUniformColor3fvAlpha(), blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::pos, UnifiedPaintSettings::size_pressure_value, UnifiedPaintSettings::stroke_active, blender::ed::sculpt_paint::PaintCursorContext::translation, and blender::ed::sculpt_paint::PaintCursorContext::ups.
Referenced by paint_draw_2D_view_brush_cursor().
|
static |
Definition at line 1690 of file paint_cursor.cc.
References BKE_brush_alpha_get(), blender::ed::sculpt_paint::PaintCursorContext::brush, clamp_f(), blender::ed::sculpt_paint::PaintCursorContext::final_radius, GPU_line_width(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::PaintCursorContext::scene, and blender::ed::sculpt_paint::PaintCursorContext::translation.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 809 of file paint_cursor.cc.
References BKE_paint_get_overlay_flags(), col, ELEM, GPU_blend(), GPU_blend_get(), GPU_depth_test(), GPU_depth_test_get(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), paint_draw_cursor_overlay(), paint_draw_tex_overlay(), PAINT_OVERLAY_OVERRIDE_CURSOR, PAINT_OVERLAY_OVERRIDE_PRIMARY, PAINT_OVERLAY_OVERRIDE_SECONDARY, ViewContext::region, Texture2D, Texture3D, Vertex, Weight, ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Referenced by paint_cursor_check_and_draw_alpha_overlays().
|
static |
Definition at line 2175 of file paint_cursor.cc.
References BLI_assert_unreachable, blender::ed::sculpt_paint::PaintCursorContext::brush, C, Cursor2D, Cursor3D, blender::ed::sculpt_paint::PaintCursorContext::cursor_type, Curve, GPencil, wmWindow::modalcursor, blender::ed::sculpt_paint::PaintCursorContext::mode, paint_cursor_check_and_draw_alpha_overlays(), paint_cursor_context_init(), paint_cursor_draw_3D_view_brush_cursor(), paint_cursor_is_3d_view_navigating(), paint_cursor_is_brush_cursor_enabled(), paint_cursor_restore_drawing_state(), paint_cursor_setup_2D_drawing(), paint_cursor_setup_3D_drawing(), paint_cursor_update_anchored_location(), paint_cursor_update_rake_rotation(), paint_draw_2D_view_brush_cursor(), paint_draw_curve_cursor(), paint_update_mouse_cursor(), blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, WM_CURSOR_DOT, WM_cursor_set(), and xy.
Referenced by ED_paint_cursor_start().
|
static |
Definition at line 724 of file paint_cursor.cc.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, BKE_brush_size_get(), BKE_brush_use_size_pressure(), BRUSH_OVERLAY_CURSOR, copy_v2_v2(), Brush::cursor_overlay_alpha, cursor_snap, UnifiedPaintSettings::draw_anchored, GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_color_mask(), GPU_COMP_F32, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_1f(), GPU_matrix_translate_2f(), GPU_matrix_translate_2fv(), GPU_PRIM_TRI_FAN, GPU_SHADER_3D_IMAGE_COLOR, GPU_texture_unbind(), GPU_vertformat_attr_add(), immAttr2f(), immBegin(), immBindBuiltinProgram(), immBindTextureSampler(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), load_tex_cursor(), mul_v4_fl(), Brush::overlay_flags, pos, quad, ViewContext::scene, UnifiedPaintSettings::size_pressure_value, UnifiedPaintSettings::stroke_active, U, UNPACK3, x, and y.
Referenced by paint_draw_alpha_overlay().
|
static |
Definition at line 957 of file paint_cursor.cc.
References PaintCurvePoint::bez, BKE_curve_forward_diff_bezier(), data, draw_bezier_handle_lines(), draw_rect_point(), draw_tri_point(), BezTriple::f1, BezTriple::f2, BezTriple::f3, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), GPU_PRIM_LINE_STRIP, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), i, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4f(), immVertex2fv(), immVertexFormat(), Brush::paint_curve, PAINT_CURVE_NUM_SEGMENTS, PaintCurve::points, pos, ViewContext::region, SPACE_VIEW3D, TH_PAINT_CURVE_HANDLE, TH_PAINT_CURVE_PIVOT, TH_VERTEX_SELECT, PaintCurve::tot_points, UI_GetThemeColorType4fv(), v, BezTriple::vec, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by paint_draw_cursor().
|
static |
Definition at line 1682 of file paint_cursor.cc.
References blender::ed::sculpt_paint::PaintCursorContext::final_radius, GPU_line_width(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::pos, and blender::ed::sculpt_paint::PaintCursorContext::translation.
Referenced by paint_cursor_draw_3D_view_brush_cursor(), and paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 178 of file paint_stroke.cc.
References BKE_paint_get_active_from_context(), C, blender::ed::sculpt_paint::PaintStroke::constrain_line, blender::ed::sculpt_paint::PaintStroke::constrained_pos, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immVertex2f(), immVertex2fv(), immVertexFormat(), blender::ed::sculpt_paint::PaintStroke::last_mouse_position, ViewContext::region, blender::ed::sculpt_paint::PaintStroke::vc, ARegion::winrct, rcti::xmin, xy, and rcti::ymin.
Referenced by paint_stroke_modal().
|
static |
Definition at line 138 of file paint_stroke.cc.
References BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), C, GPencil, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4ubv(), immVertex2f(), immVertex2fv(), immVertexFormat(), blender::ed::sculpt_paint::PaintStroke::last_mouse_position, PAINT_SHOW_BRUSH, pos, ViewContext::region, blender::ed::sculpt_paint::PaintStroke::vc, ARegion::winrct, rcti::xmin, xy, and rcti::ymin.
Referenced by paint_stroke_modal().
|
static |
Definition at line 568 of file paint_cursor.cc.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, BKE_brush_size_get(), BKE_brush_use_size_pressure(), BLI_rcti_size_x(), BLI_rcti_size_y(), MTex::brush_map_mode, BRUSH_OVERLAY_PRIMARY, BRUSH_OVERLAY_SECONDARY, UnifiedPaintSettings::brush_rotation, UnifiedPaintSettings::brush_rotation_sec, ViewContext::C, col, copy_v3_v3(), UnifiedPaintSettings::draw_anchored, ELEM, GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_color_mask(), GPU_COMP_F32, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_rotate_2d(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_matrix_translate_2fv(), GPU_PRIM_TRI_FAN, GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER, GPU_SAMPLER_EXTEND_MODE_REPEAT, GPU_SAMPLER_FILTERING_LINEAR, GPU_SHADER_3D_IMAGE_COLOR, GPU_texture_unbind(), GPU_vertformat_attr_add(), Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_DRAW, immAttr2f(), immBegin(), immBindBuiltinProgram(), immBindTextureSampler(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), load_tex(), Brush::mask_mtex, Brush::mask_overlay_alpha, Brush::mask_stencil_dimension, Brush::mask_stencil_pos, Brush::mtex, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, MTEX_MAP_MODE_VIEW, mul_v4_fl(), Brush::overlay_flags, pos, primary_snap, quad, RAD2DEGF, ViewContext::region, MTex::rot, ViewContext::scene, secondary_snap, UnifiedPaintSettings::size_pressure_value, Brush::stencil_dimension, Brush::stencil_pos, UnifiedPaintSettings::stroke_active, MTex::tex, texture(), Texture3D, Brush::texture_overlay_alpha, U, ARegion::winrct, WM_toolsystem_active_tool_is_brush(), x, and y.
Referenced by paint_draw_alpha_overlay().
|
static |
Slightly different version of spacing for line/curve strokes, makes sure the dabs stay on the line path.
Definition at line 1229 of file paint_stroke.cc.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), BLI_assert, blender::ed::sculpt_paint::PaintStroke::brush, C, CTX_wm_region(), ED_view3d_project_v2(), blender::ed::sculpt_paint::PaintStroke::last_mouse_position, blender::ed::sculpt_paint::PaintStroke::last_world_space_position, blender::math::length(), length(), blender::math::normalize(), blender::math::normalize_and_get_length(), ViewContext::obact, blender::ed::sculpt_paint::PaintStroke::original, UnifiedPaintSettings::overlap_factor, paint_brush_stroke_add_step(), paint_stroke_integrate_overlap(), paint_stroke_use_scene_spacing(), blender::ed::sculpt_paint::PaintStroke::stroke_distance, stroke_get_location_bvh(), blender::ed::sculpt_paint::PaintStroke::stroke_over_mesh, blender::math::transform_point(), blender::ed::sculpt_paint::PaintStroke::ups, blender::ed::sculpt_paint::PaintStroke::vc, and blender::ed::sculpt_paint::PaintStroke::zoom_2d.
Referenced by paint_stroke_curve_end().
|
static |
Definition at line 656 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::brush, blender::math::distance_squared(), blender::math::interpolate(), blender::ed::sculpt_paint::PaintStroke::last_mouse_position, blender::ed::sculpt_paint::PaintStroke::last_pressure, paint_supports_smooth_stroke(), sample, Brush::smooth_stroke_factor, Brush::smooth_stroke_radius, square_f(), and blender::ed::sculpt_paint::PaintStroke::zoom_2d.
Referenced by paint_stroke_modal().
|
static |
Definition at line 813 of file paint_stroke.cc.
References BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), BLI_assert, blender::ed::sculpt_paint::PaintStroke::brush, C, count, CTX_data_scene(), CTX_wm_region(), ED_view3d_project_v2(), blender::ed::sculpt_paint::PaintStroke::last_mouse_position, blender::ed::sculpt_paint::PaintStroke::last_pressure, blender::ed::sculpt_paint::PaintStroke::last_scene_spacing_delta, blender::ed::sculpt_paint::PaintStroke::last_world_space_position, blender::math::length(), length(), blender::math::normalize(), normalize_v2(), ViewContext::obact, blender::ed::sculpt_paint::PaintStroke::original, UnifiedPaintSettings::overlap_factor, paint_brush_stroke_add_step(), paint_space_stroke_spacing(), paint_space_stroke_spacing_variable(), paint_stroke_integrate_overlap(), paint_stroke_use_scene_spacing(), blender::ed::sculpt_paint::PaintStroke::stroke_distance, stroke_get_location_bvh(), blender::ed::sculpt_paint::PaintStroke::stroke_over_mesh, blender::math::transform_point(), blender::ed::sculpt_paint::PaintStroke::ups, blender::ed::sculpt_paint::PaintStroke::vc, and blender::ed::sculpt_paint::PaintStroke::zoom_2d.
Referenced by paint_stroke_line_end(), and paint_stroke_modal().
Returns zero if the stroke dots should not be spaced, non-zero otherwise.
Definition at line 1042 of file paint_stroke.cc.
References BRUSH_SPACE, Brush::curves_sculpt_brush_type, curves_sculpt_brush_uses_spacing(), ELEM, Brush::flag, GPencil, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), paint_supports_dynamic_size(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLOTH, SculptCurves, and SculptGPencil.
Referenced by paint_stroke_modal().
|
static |
Definition at line 683 of file paint_stroke.cc.
References BKE_brush_size_get(), BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, BRUSH_SPACING_PRESSURE, C, Brush::flag, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), blender::ed::sculpt_paint::PaintStroke::last_world_space_position, max_ff(), ViewContext::obact, object_space_radius_get(), paint_stroke_use_scene_spacing(), Brush::spacing, blender::math::transform_point(), blender::ed::sculpt_paint::PaintStroke::vc, and blender::ed::sculpt_paint::PaintStroke::zoom_2d.
Referenced by paint_space_stroke(), paint_space_stroke_spacing_variable(), and paint_stroke_curve_end().
|
static |
Definition at line 780 of file paint_stroke.cc.
References BKE_brush_use_size_pressure(), blender::ed::sculpt_paint::PaintStroke::brush, C, blender::ed::sculpt_paint::PaintStroke::last_pressure, length(), and paint_space_stroke_spacing().
Referenced by paint_space_stroke().
|
static |
Definition at line 1186 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::cur_sample, blender::ed::sculpt_paint::PaintStroke::num_samples, PAINT_MAX_INPUT_SAMPLES, sample, blender::ed::sculpt_paint::PaintStroke::samples, x, and y.
Referenced by paint_stroke_modal().
| void blender::ed::sculpt_paint::paint_stroke_cancel | ( | bContext * | C, |
| wmOperator * | op, | ||
| PaintStroke * | stroke ) |
Definition at line 1728 of file paint_stroke.cc.
References C, and stroke_done().
Referenced by grease_pencil_brush_stroke_cancel(), grease_pencil_sculpt_paint_cancel(), grease_pencil_vertex_brush_stroke_cancel(), grease_pencil_weight_brush_stroke_cancel(), blender::ed::sculpt_paint::image::ops::paint::paint_cancel(), paint_stroke_modal(), sculpt_brush_stroke_cancel(), sculpt_curves_stroke_cancel(), vpaint_cancel(), and wpaint_cancel().
|
static |
Definition at line 1336 of file paint_stroke.cc.
References atan2f, PaintCurvePoint::bez, BKE_curve_forward_diff_bezier(), BKE_curve_forward_diff_tangent_bezier(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, MTex::brush_angle_mode, BRUSH_CURVE, C, copy_v2_v2(), CTX_data_scene(), CTX_data_tool_settings(), data, Brush::flag, i, blender::ed::sculpt_paint::PaintStroke::last_mouse_position, blender::ed::sculpt_paint::PaintStroke::last_pressure, blender::ed::sculpt_paint::PaintStroke::last_world_space_position, M_PI, Brush::mask_mtex, Brush::mtex, MTEX_ANGLE_RAKE, mul_m4_v3(), ViewContext::obact, blender::ed::sculpt_paint::PaintStroke::original, UnifiedPaintSettings::overlap_factor, paint_brush_stroke_add_step(), Brush::paint_curve, PAINT_CURVE_NUM_SEGMENTS, paint_line_strokes_spacing(), paint_space_stroke_spacing(), paint_stroke_integrate_overlap(), paint_stroke_use_scene_spacing(), paint_update_brush_rake_rotation(), PaintCurve::points, stroke_done(), stroke_get_location_bvh(), blender::ed::sculpt_paint::PaintStroke::stroke_over_mesh, blender::ed::sculpt_paint::PaintStroke::stroke_started, blender::ed::sculpt_paint::PaintStroke::test_start, TIMEIT_END_AVERAGED, TIMEIT_START_AVERAGED, PaintCurve::tot_points, ToolSettings::unified_paint_settings, blender::ed::sculpt_paint::PaintStroke::ups, blender::ed::sculpt_paint::PaintStroke::vc, and BezTriple::vec.
Referenced by paint_stroke_modal().
| float blender::ed::sculpt_paint::paint_stroke_distance_get | ( | PaintStroke * | stroke | ) |
Definition at line 1753 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::stroke_distance.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), stroke_update_step(), and vpaint_stroke_update_step().
| wmOperatorStatus blender::ed::sculpt_paint::paint_stroke_exec | ( | bContext * | C, |
| wmOperator * | op, | ||
| PaintStroke * | stroke ) |
Definition at line 1685 of file paint_stroke.cc.
References C, blender::ed::sculpt_paint::PaintStroke::get_location, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_BEGIN, RNA_END, RNA_float_get_array(), RNA_float_set_array(), RNA_property_boolean_get(), RNA_property_collection_lookup_int(), RNA_struct_find_property(), stroke_done(), blender::ed::sculpt_paint::PaintStroke::stroke_started, blender::ed::sculpt_paint::PaintStroke::test_start, and blender::ed::sculpt_paint::PaintStroke::update_step.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_exec(), sculpt_brush_stroke_exec(), vpaint_exec(), and wpaint_exec().
| bool blender::ed::sculpt_paint::paint_stroke_flipped | ( | PaintStroke * | stroke | ) |
Definition at line 1743 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::pen_flip.
| void blender::ed::sculpt_paint::paint_stroke_free | ( | bContext * | C, |
| wmOperator * | op, | ||
| PaintStroke * | stroke ) |
Definition at line 984 of file paint_stroke.cc.
References BKE_paint_set_overlay_override(), C, CTX_wm_manager(), CTX_wm_region_view3d(), CTX_wm_window(), UnifiedPaintSettings::draw_anchored, RV3D_PAINTING, UnifiedPaintSettings::stroke_active, blender::ed::sculpt_paint::PaintStroke::stroke_cursor, blender::ed::sculpt_paint::PaintStroke::timer, blender::ed::sculpt_paint::PaintStroke::ups, WM_event_timer_remove(), and WM_paint_cursor_end().
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), sculpt_brush_stroke_invoke(), sculpt_curves_stroke_invoke(), stroke_done(), vpaint_invoke(), and wpaint_invoke().
|
static |
Definition at line 757 of file paint_stroke.cc.
References BRUSH_SPACE_ATTEN, fabs(), Brush::flag, i, max, paint_stroke_overlapped_curve(), and Brush::spacing.
Referenced by paint_line_strokes_spacing(), paint_space_stroke(), paint_stroke_curve_end(), paint_stroke_line_end(), and paint_stroke_modal().
| bool blender::ed::sculpt_paint::paint_stroke_inverted | ( | PaintStroke * | stroke | ) |
Definition at line 1748 of file paint_stroke.cc.
References BRUSH_STROKE_INVERT, and blender::ed::sculpt_paint::PaintStroke::stroke_mode.
Referenced by blender::ed::sculpt_paint::image::ops::paint::ImagePaintMode::paint_bucket_fill().
| void blender::ed::sculpt_paint::paint_stroke_jitter_pos | ( | Scene & | scene, |
| const PaintStroke & | stroke, | ||
| const PaintMode | mode, | ||
| const Brush & | brush, | ||
| const float | pressure, | ||
| const float | mval[2], | ||
| float | r_mouse_out[2] ) |
Definition at line 518 of file paint_stroke.cc.
References add_v2_v2v2(), BKE_brush_jitter_pos(), BRUSH_JITTER_PRESSURE, BRUSH_STROKE_INVERT, copy_v2_v2(), Brush::flag, mul_v2_fl(), paint_stroke_use_jitter(), blender::ed::sculpt_paint::PaintStroke::stroke_mode, sub_v2_v2v2(), and blender::ed::sculpt_paint::PaintStroke::zoom_2d.
Referenced by paint_brush_stroke_add_step(), and blender::ed::sculpt_paint::image::ops::paint::paint_exec().
|
static |
Definition at line 1431 of file paint_stroke.cc.
References angle(), atan2f, blender::ed::sculpt_paint::PaintStroke::constrain_line, blender::ed::sculpt_paint::PaintStroke::constrained_pos, cosf, floorf, blender::ed::sculpt_paint::PaintStroke::last_mouse_position, len, blender::math::length(), M_PI, M_PI_4, and sinf.
Referenced by paint_stroke_modal().
|
static |
Definition at line 1322 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::brush, BRUSH_LINE, C, Brush::flag, blender::ed::sculpt_paint::PaintStroke::last_mouse_position, UnifiedPaintSettings::overlap_factor, paint_brush_stroke_add_step(), paint_space_stroke(), paint_stroke_integrate_overlap(), blender::ed::sculpt_paint::PaintStroke::stroke_started, and blender::ed::sculpt_paint::PaintStroke::ups.
Referenced by paint_stroke_modal().
| wmOperatorStatus blender::ed::sculpt_paint::paint_stroke_modal | ( | bContext * | C, |
| wmOperator * | op, | ||
| const wmEvent * | event, | ||
| PaintStroke ** | stroke_p ) |
The main modal callback shared by any custom operator that implements a form of painting.
At a high level, this function performs the following steps for interactive stroke types:
Definition at line 1457 of file paint_stroke.cc.
References BKE_brush_input_samples_get(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, BRUSH_AIRBRUSH, BRUSH_ANCHORED, MTex::brush_angle_mode, BRUSH_DRAG_DOT, BRUSH_LINE, BRUSH_SMOOTH_STROKE, BRUSH_STROKE_NORMAL, BRUSH_STROKE_SMOOTH, C, wmOperatorType::cancel, blender::ed::sculpt_paint::PaintStroke::constrain_line, copy_v2_v2(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), wmEvent::customdata, ELEM, blender::ed::sculpt_paint::PaintStroke::event_type, EVT_MODAL_MAP, EVT_RETKEY, EVT_SPACEKEY, Brush::flag, GPencil, image_paint_brush_type_require_inbetween_mouse_events(), INBETWEEN_MOUSEMOVE, ISMOUSE_MOTION, KM_ALT, KM_RELEASE, KM_SHIFT, blender::ed::sculpt_paint::PaintStroke::last_mouse_position, blender::ed::sculpt_paint::PaintStroke::last_pressure, UnifiedPaintSettings::last_rake, blender::ed::sculpt_paint::PaintStroke::last_tablet_event_pressure, blender::ed::sculpt_paint::PaintStroke::last_world_space_position, blender::math::length(), Brush::mask_mtex, wmEvent::modifier, blender::ed::sculpt_paint::PaintSample::mouse, Brush::mtex, MTEX_ANGLE_RAKE, wmEvent::mval, NDOF_MOTION, ViewContext::obact, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, blender::ed::sculpt_paint::PaintStroke::original, UnifiedPaintSettings::overlap_factor, paint_brush_cursor_poll(), paint_brush_stroke_add_step(), paint_calculate_rake_rotation(), paint_draw_line_cursor(), paint_draw_smooth_cursor(), PAINT_SHOW_BRUSH, paint_smooth_stroke(), paint_space_stroke(), paint_space_stroke_enabled(), paint_stroke_add_sample(), paint_stroke_cancel(), paint_stroke_curve_end(), paint_stroke_integrate_overlap(), paint_stroke_line_constrain(), paint_stroke_line_end(), PAINT_STROKE_MODAL_CANCEL, paint_stroke_sample_average(), paint_stroke_use_scene_spacing(), paint_supports_smooth_stroke(), blender::ed::sculpt_paint::PaintStroke::pen_flip, blender::ed::sculpt_paint::PaintSample::pressure, wmOperator::ptr, Brush::rate, blender::ed::sculpt_paint::PaintStroke::redraw, RGN_TYPE_ANY, RNA_boolean_set(), SPACE_TYPE_ANY, blender::ed::sculpt_paint::PaintStroke::stroke_cursor, blender::ed::sculpt_paint::PaintStroke::stroke_distance, stroke_done(), stroke_get_location_bvh(), blender::ed::sculpt_paint::PaintStroke::stroke_init, blender::ed::sculpt_paint::PaintStroke::stroke_mode, blender::ed::sculpt_paint::PaintStroke::stroke_over_mesh, blender::ed::sculpt_paint::PaintStroke::stroke_started, blender::ed::sculpt_paint::PaintStroke::test_start, blender::ed::sculpt_paint::PaintStroke::tilt, TIMER, blender::ed::sculpt_paint::PaintStroke::timer, blender::math::transform_point(), wmEvent::type, wmOperator::type, blender::ed::sculpt_paint::PaintStroke::ups, wmEvent::val, blender::ed::sculpt_paint::PaintStroke::vc, WM_event_is_tablet(), WM_event_tablet_data(), WM_event_timer_add(), WM_paint_cursor_activate(), WM_paint_cursor_end(), and WM_paint_cursor_tag_redraw().
Referenced by brush_stroke_modal(), grease_pencil_brush_stroke_modal(), grease_pencil_sculpt_paint_modal(), grease_pencil_vertex_brush_stroke_modal(), grease_pencil_weight_brush_stroke_modal(), blender::ed::sculpt_paint::image::ops::paint::paint_modal(), sculpt_curves_stroke_modal(), vpaint_modal(), and wpaint_modal().
| wmKeyMap * blender::ed::sculpt_paint::paint_stroke_modal_keymap | ( | wmKeyConfig * | keyconf | ) |
Called in paint_ops.cc, on each regeneration of key-maps.
Definition at line 1168 of file paint_stroke.cc.
References PAINT_STROKE_MODAL_CANCEL, WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by ED_keymap_paint().
| void * blender::ed::sculpt_paint::paint_stroke_mode_data | ( | PaintStroke * | stroke | ) |
Definition at line 1738 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::mode_data.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_done(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_redraw(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), stroke_done(), stroke_update_step(), vpaint_stroke_done(), vpaint_stroke_update_step(), and wpaint_stroke_update_step().
| PaintStroke * blender::ed::sculpt_paint::paint_stroke_new | ( | bContext * | C, |
| wmOperator * | op, | ||
| StrokeGetLocation | get_location, | ||
| StrokeTestStart | test_start, | ||
| StrokeUpdateStep | update_step, | ||
| StrokeRedraw | redraw, | ||
| StrokeDone | done, | ||
| int | event_type ) |
Definition at line 899 of file paint_stroke.cc.
References UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, BKE_brush_size_get(), BKE_curvemapping_init(), BKE_image_pool_acquire_ibuf(), BKE_image_pool_release_ibuf(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paint_set_overlay_override(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, BRUSH_CURVE, BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, ImBuf::byte_buffer, C, ImBufByteBuffer::colorspace, UnifiedPaintSettings::colorspace, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_region_view3d(), Brush::curve, ImBufFloatBuffer::data, depsgraph, UnifiedPaintSettings::do_linear_conversion, blender::ed::sculpt_paint::PaintStroke::done, ED_view3d_viewcontext_init(), blender::ed::sculpt_paint::PaintStroke::event_type, Brush::flag, ImBuf::float_buffer, get_imapaint_zoom(), blender::ed::sculpt_paint::PaintStroke::get_location, Tex::ima, image_paint_brush_type_raycast_original(), Tex::iuser, Brush::mtex, mul_v3_fl(), blender::ed::sculpt_paint::PaintStroke::original, UnifiedPaintSettings::overlap_factor, Brush::overlay_flags, PAINT_USE_CAVITY_MASK, wmOperator::ptr, blender::ed::sculpt_paint::PaintStroke::redraw, RegionView3D::rflag, RNA_enum_get(), RNA_enum_set(), RV3D_PAINTING, UnifiedPaintSettings::start_pixel_radius, UnifiedPaintSettings::stroke_active, blender::ed::sculpt_paint::PaintStroke::stroke_mode, blender::ed::sculpt_paint::PaintStroke::test_start, MTex::tex, TEX_IMAGE, Tex::type, ToolSettings::unified_paint_settings, blender::ed::sculpt_paint::PaintStroke::update_step, blender::ed::sculpt_paint::PaintStroke::ups, blender::ed::sculpt_paint::PaintStroke::vc, and blender::ed::sculpt_paint::PaintStroke::zoom_2d.
Referenced by grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_invoke(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_curves_stroke_invoke(), vpaint_exec(), vpaint_invoke(), wpaint_exec(), and wpaint_invoke().
|
static |
Definition at line 733 of file paint_stroke.cc.
References BKE_brush_curve_strength(), fabsf, i, max_ff(), sum(), and x.
Referenced by paint_stroke_integrate_overlap().
|
static |
Definition at line 1208 of file paint_stroke.cc.
References average(), BLI_assert, i, blender::ed::sculpt_paint::PaintSample::mouse, blender::ed::sculpt_paint::PaintStroke::num_samples, blender::ed::sculpt_paint::PaintSample::pressure, and blender::ed::sculpt_paint::PaintStroke::samples.
Referenced by paint_stroke_modal().
| void blender::ed::sculpt_paint::paint_stroke_set_mode_data | ( | PaintStroke * | stroke, |
| std::unique_ptr< PaintModeData > | mode_data ) |
Definition at line 1758 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::mode_data.
Referenced by blender::ed::sculpt_paint::image::ops::paint::paint_stroke_test_start(), stroke_update_step(), vpaint_stroke_test_start(), and wpaint_stroke_test_start().
| bool blender::ed::sculpt_paint::paint_stroke_started | ( | PaintStroke * | stroke | ) |
Definition at line 1763 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::stroke_started.
|
static |
Definition at line 498 of file paint_stroke.cc.
References BRUSH_CURVE, BRUSH_LINE, BRUSH_SPACE, and Brush::flag.
Referenced by paint_brush_stroke_add_step().
|
static |
Definition at line 504 of file paint_stroke.cc.
References BRUSH_ABSOLUTE_JITTER, BRUSH_ANCHORED, BRUSH_DRAG_DOT, ELEM, Brush::flag, Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_CLONE, invert(), Brush::jitter, Brush::jitter_absolute, Texture2D, and Texture3D.
Referenced by paint_stroke_jitter_pos().
|
static |
Definition at line 260 of file paint_stroke.cc.
References BRUSH_SCENE_SPACING, Brush::flag, and Sculpt.
Referenced by paint_brush_stroke_add_step(), paint_line_strokes_spacing(), paint_space_stroke(), paint_space_stroke_spacing(), paint_stroke_curve_end(), and paint_stroke_modal().
| ViewContext * blender::ed::sculpt_paint::paint_stroke_view_context | ( | PaintStroke * | stroke | ) |
Definition at line 1733 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::vc.
Referenced by sculpt_update_cache_invariants(), and blender::ed::sculpt_paint::vwpaint::update_cache_invariants().
Return true if the brush size can change during paint (normally used for pressure).
Definition at line 1087 of file paint_stroke.cc.
References BRUSH_ANCHORED, BRUSH_USE_GRADIENT, Brush::flag, Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_FILL, Sculpt, sculpt_is_grab_tool(), Texture2D, and Texture3D.
Referenced by paint_brush_update(), paint_space_stroke_enabled(), sculpt_update_cache_variants(), and blender::ed::sculpt_paint::vwpaint::update_cache_variants().
| bool blender::ed::sculpt_paint::paint_supports_dynamic_tex_coords | ( | const Brush & | br, |
| PaintMode | mode ) |
Return true if the brush size can change during paint (normally used for pressure).
Definition at line 1148 of file paint_stroke.cc.
References BRUSH_ANCHORED, Brush::flag, Sculpt, and sculpt_is_grab_tool().
Referenced by paint_brush_update().
| bool blender::ed::sculpt_paint::paint_supports_smooth_stroke | ( | PaintStroke * | stroke, |
| const Brush & | br, | ||
| PaintMode | mode ) |
Definition at line 1113 of file paint_stroke.cc.
References BRUSH_ANCHORED, BRUSH_DRAG_DOT, BRUSH_LINE, BRUSH_SMOOTH_STROKE, BRUSH_STROKE_SMOOTH, Brush::flag, GPAINT_BRUSH_TYPE_DRAW, GPencil, Brush::gpencil_brush_type, Sculpt, sculpt_is_grab_tool(), and blender::ed::sculpt_paint::PaintStroke::stroke_mode.
Referenced by paint_smooth_stroke(), and paint_stroke_modal().
| bool blender::ed::sculpt_paint::paint_supports_texture | ( | PaintMode | mode | ) |
Definition at line 1141 of file paint_stroke.cc.
References ELEM, Sculpt, Texture2D, Texture3D, and Vertex.
Referenced by stencil_control_poll().
|
static |
Definition at line 1475 of file paint_cursor.cc.
References BKE_screen_find_region_type(), BLI_listbase_is_empty(), ELEM, GPencil, wmWindow::grabcursor, wmWindow::modalcursor, blender::ed::sculpt_paint::PaintCursorContext::mode, bScreen::regionbase, RGN_TYPE_TEMPORARY, blender::ed::sculpt_paint::PaintCursorContext::screen, VertexGPencil, blender::ed::sculpt_paint::PaintCursorContext::win, WM_CURSOR_DOT, WM_CURSOR_PAINT, and WM_cursor_set().
Referenced by paint_draw_cursor().
|
static |
Definition at line 1237 of file paint_cursor.cc.
References BLI_assert_unreachable, GPencil, Invalid, Sculpt, SculptCurves, SculptGPencil, Texture2D, Texture3D, Vertex, VertexGPencil, Weight, and WeightGPencil.
Referenced by paint_cursor_context_init().
|
static |
Definition at line 2435 of file sculpt.cc.
References SculptSession::cache, SculptSession::cursor_location, SculptSession::cursor_radius, blender::ed::sculpt_paint::StrokeCache::location_symm, node_in_sphere(), blender::bke::object::pbvh_get(), Object::sculpt, and blender::bke::pbvh::search_nodes().
Referenced by cursor_geometry_info_update().
|
static |
Definition at line 2446 of file sculpt.cc.
References SculptSession::cache, dist_squared_ray_to_aabb_v3_precalc(), Brush::falloff_shape, blender::ed::sculpt_paint::StrokeCache::location_symm, node_fully_masked_or_hidden(), node_in_cylinder(), node_in_sphere(), PAINT_FALLOFF_SHAPE_SPHERE, PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::StrokeCache::radius, Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_MASK, blender::bke::pbvh::search_nodes(), blender::math::square(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by calc_brush_node_mask(), dynamic_topology_update(), and pbvh_gather_texpaint().
|
static |
Definition at line 2517 of file sculpt.cc.
References pbvh_gather_generic().
Referenced by do_brush_action().
|
static |
Definition at line 5799 of file sculpt.cc.
References SculptFakeNeighbors::fake_neighbor_index, SculptSession::fake_neighbors, and pose_fake_neighbors_free().
Referenced by pose_fake_neighbors_free(), and SCULPT_fake_neighbors_free().
|
static |
Definition at line 499 of file paint_cursor.cc.
References add_v3_v3v3(), BLI_assert, cross_v3_v3v3(), ED_view3d_global_to_vector(), ED_view3d_project_float_global(), fabsf, len_v2v2(), mul_v3_fl(), normalize_v3(), ViewContext::region, ViewContext::rv3d, V3D_PROJ_RET_OK, V3D_PROJ_TEST_NOP, and view.
Referenced by paint_cursor_update_pixel_radius().
|
static |
Definition at line 545 of file paint_cursor.cc.
References ED_view3d_calc_zfac_ex(), ED_view3d_win_to_delta(), blender::math::numbers::inv_sqrt3, blender::math::length(), ViewContext::region, ViewContext::rv3d, blender::math::safe_divide(), and blender::math::transform_direction().
Referenced by grease_pencil_brush_cursor_draw().
| void blender::ed::sculpt_paint::project_translations | ( | MutableSpan< float3float3 > | translations, |
| const float3float3 & | plane ) |
Align the translations with plane normal.
Definition at line 7292 of file sculpt.cc.
References blender::math::dot(), i, blender::MutableSpan< T >::index_range(), blender::math::length_squared(), project_translations(), and blender::math::rcp().
Referenced by project_translations().
|
static |
Definition at line 3147 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::alt_smooth, brush_type_is_paint(), SculptSession::cache, blender::ed::sculpt_paint::undo::Color, depsgraph, blender::ed::sculpt_paint::undo::FaceSet, blender::ed::sculpt_paint::undo::Mask, blender::ed::sculpt_paint::undo::Position, blender::ed::sculpt_paint::undo::push_nodes(), Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_BRUSH_TYPE_MASK, and blender::ed::sculpt_paint::StrokeCache::supports_gravity.
Referenced by do_brush_action().
|
static |
Definition at line 837 of file sculpt.cc.
References SculptRakeData::follow_co, SculptRakeData::follow_dist, interp_v3_v3v3(), and len_v3v3().
Referenced by brush_delta_update().
| float blender::ed::sculpt_paint::raycast_init | ( | ViewContext * | vc, |
| const float2float2 & | mval, | ||
| float3float3 & | r_ray_start, | ||
| float3float3 & | r_ray_end, | ||
| float3float3 & | r_ray_normal, | ||
| bool | original ) |
Definition at line 4621 of file sculpt.cc.
References blender::bke::pbvh::clip_ray_ortho(), ViewContext::depsgraph, blender::math::distance(), ED_view3d_win_to_origin(), ED_view3d_win_to_segment_clipped(), RegionView3D::is_persp, blender::math::normalize_and_get_length(), ViewContext::obact, blender::bke::object::pbvh_get(), raycast_init(), ViewContext::region, ViewContext::rv3d, RV3D_CLIPPING_ENABLED, blender::math::transform_point(), and ViewContext::v3d.
Referenced by cursor_geometry_info_update(), raycast_init(), blender::ed::sculpt_paint::dyntopo::sample_detail_dyntopo(), stroke_get_location_bvh_ex(), and vertex_is_occluded().
|
static |
Definition at line 5749 of file sculpt.cc.
References redo_empty_ui().
Referenced by redo_empty_ui(), and SCULPT_OT_brush_stroke().
| void blender::ed::sculpt_paint::remember_stroke_position | ( | Scene & | scene, |
| const float3float3 & | brush_position_wo ) |
Updates the position of the stroke so that it can be used by the orbit-around-selection navigation method.
Definition at line 348 of file curves_sculpt_brush.cc.
References UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, copy_v3_v3(), UnifiedPaintSettings::last_stroke_valid, Scene::toolsettings, and ToolSettings::unified_paint_settings.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::CombOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::DeleteOperationExecutor::initialize_spherical_brush_reference_point(), and blender::ed::sculpt_paint::SelectionPaintOperationExecutor::initialize_spherical_brush_reference_point().
|
static |
Definition at line 1813 of file grease_pencil_draw_ops.cc.
References get_current_drawing_or_duplicate_for_autokey(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), and blender::geometry::remove_points_and_split().
|
static |
Definition at line 5200 of file sculpt.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::GSpan::data(), blender::GVArrayCommon::get_internal_span(), init(), init(), blender::GVArrayCommon::is_span(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::remove(), replace_attribute(), blender::bke::GAttributeReader::sharing_info, and blender::bke::GAttributeReader::varray.
Referenced by replace_attribute(), and store_mesh_from_eval().
| void blender::ed::sculpt_paint::report_empty_evaluated_surface | ( | ReportList * | reports | ) |
Definition at line 414 of file curves_sculpt_brush.cc.
References BKE_report(), reports, and RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
| void blender::ed::sculpt_paint::report_empty_original_surface | ( | ReportList * | reports | ) |
Definition at line 409 of file curves_sculpt_brush.cc.
References BKE_report(), reports, and RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
| bool blender::ed::sculpt_paint::report_if_shape_key_is_locked | ( | const Object & | ob, |
| ReportList * | reports ) |
Checks if the currently active Sculpt Mode on the object is targeting a locked shape key, and produces an error message if so (unless reports is null).
Definition at line 128 of file sculpt.cc.
References BKE_reportf(), KeyBlock::flag, Object::id, KEYBLOCK_LOCKED_SHAPE, ID::name, reports, RPT_ERROR, Object::sculpt, and SculptSession::shapekey_active.
Referenced by blender::ed::transform::createTransSculpt(), sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), and blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start().
| void blender::ed::sculpt_paint::report_invalid_uv_map | ( | ReportList * | reports | ) |
Definition at line 434 of file curves_sculpt_brush.cc.
References BKE_report(), reports, and RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute().
| void blender::ed::sculpt_paint::report_missing_surface | ( | ReportList * | reports | ) |
Definition at line 419 of file curves_sculpt_brush.cc.
References BKE_report(), reports, and RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
| void blender::ed::sculpt_paint::report_missing_uv_map_on_evaluated_surface | ( | ReportList * | reports | ) |
Definition at line 429 of file curves_sculpt_brush.cc.
References BKE_report(), reports, and RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
| void blender::ed::sculpt_paint::report_missing_uv_map_on_original_surface | ( | ReportList * | reports | ) |
Definition at line 424 of file curves_sculpt_brush.cc.
References BKE_report(), reports, and RPT_WARNING.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
| void blender::ed::sculpt_paint::reset_translations_to_original | ( | MutableSpan< float3float3 > | translations, |
| Span< float3float3 > | positions, | ||
| Span< float3float3 > | orig_positions ) |
Cancel out translations already applied over the course of the operation from the new translations. This is used for tools that calculate new positions based on the original positions for the entirety of an operation. Conceptually this is the same as resetting the positions before each step of the operation, but combining that into the same loop should be preferable for performance.
Definition at line 7230 of file sculpt.cc.
References BLI_assert, i, blender::MutableSpan< T >::index_range(), reset_translations_to_original(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), and reset_translations_to_original().
|
static |
Definition at line 314 of file brush_asset_ops.cc.
References blender::ed::asset::library_reference_to_rna_enum_itemf().
Referenced by BRUSH_OT_asset_save_as().
|
static |
Definition at line 129 of file paint_cursor.cc.
References MTex::brush_map_mode, col, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, ViewContext::region, snap(), ARegion::winx, and ARegion::winy.
Referenced by load_tex().
|
static |
Definition at line 624 of file sculpt_ops.cc.
References blender::ed::sculpt_paint::color::active_color_attribute(), SculptSession::active_vert(), BKE_base_is_visible(), BKE_brush_color_set(), BKE_paint_brush(), BKE_sculpt_update_object_for_edit(), C, color_supported_check(), blender::ed::sculpt_paint::color::color_vert_get(), CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_view3d(), Object::data, blender::bke::GAttributeReader::domain, faces, IMB_colormanagement_scene_linear_to_srgb_v3(), NA_EDITED, NC_BRUSH, OPERATOR_CANCELLED, OPERATOR_FINISHED, Sculpt::paint, wmOperator::reports, Object::sculpt, ToolSettings::sculpt, and WM_event_add_notifier().
Referenced by SCULPT_OT_sample_color().
| std::optional< CurvesBrush3D > blender::ed::sculpt_paint::sample_curves_3d_brush | ( | const Depsgraph & | depsgraph, |
| const ARegion & | region, | ||
| const View3D & | v3d, | ||
| const RegionView3D & | rv3d, | ||
| const Object & | curves_object, | ||
| const float2float2 & | brush_pos_re, | ||
| const float | brush_radius_re ) |
Find 3d brush position based on cursor position for curves sculpting.
Definition at line 171 of file curves_sculpt_brush.cc.
References BKE_object_get_evaluated_mesh(), BLI_bvhtree_ray_cast(), BVHTreeRayHit::co, Object::data, DEG_get_evaluated(), depsgraph, BVHTreeRayHit::dist, dist_to_line_v3(), blender::math::distance(), ED_view3d_win_to_segment_clipped(), find_curves_brush_position(), FLT_MAX, Curves::geometry, blender::bke::crazyspace::get_evaluated_curves_deformation(), BVHTreeRayHit::index, blender::math::invert(), blender::math::normalize(), blender::ed::sculpt_paint::CurvesBrush3D::position_cu, blender::bke::crazyspace::GeometryDeformation::positions, blender::ed::sculpt_paint::CurvesBrush3D::radius_cu, blender::bke::BVHTreeFromMesh::raycast_callback, Curves::surface, blender::math::transform_point(), and blender::bke::BVHTreeFromMesh::tree.
Referenced by blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::DeleteOperationExecutor::initialize_spherical_brush_reference_point(), and blender::ed::sculpt_paint::SelectionPaintOperationExecutor::initialize_spherical_brush_reference_point().
| std::optional< CurvesBrush3D > blender::ed::sculpt_paint::sample_curves_surface_3d_brush | ( | const Depsgraph & | depsgraph, |
| const ARegion & | region, | ||
| const View3D & | v3d, | ||
| const CurvesSurfaceTransforms & | transforms, | ||
| const bke::BVHTreeFromMesh & | surface_bvh, | ||
| const float2float2 & | brush_pos_re, | ||
| const float | brush_radius_re ) |
Definition at line 267 of file curves_sculpt_brush.cc.
References BLI_bvhtree_ray_cast(), BVHTreeRayHit::co, depsgraph, BVHTreeRayHit::dist, dist_to_line_v3(), ED_view3d_win_to_segment_clipped(), FLT_MAX, BVHTreeRayHit::index, blender::math::normalize(), blender::bke::BVHTreeFromMesh::raycast_callback, blender::bke::CurvesSurfaceTransforms::surface_to_curves, blender::math::transform_point(), blender::bke::BVHTreeFromMesh::tree, blender::bke::CurvesSurfaceTransforms::world_to_curves, and blender::bke::CurvesSurfaceTransforms::world_to_surface.
Referenced by blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and use_add_density_mode().
|
static |
Definition at line 104 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::last_curve_timestamp, MEM_SAFE_FREE, and CurveMaskCache::sampled_curve.
Referenced by paint_curve_mask_cache_free_data().
| void blender::ed::sculpt_paint::scale_factors | ( | MutableSpan< float > | factors, |
| float | strength ) |
Definition at line 7493 of file sculpt.cc.
References scale_factors().
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), scale_factors(), scale_factors(), and blender::ed::sculpt_paint::cloth::solve_verts_simulation().
| void blender::ed::sculpt_paint::scale_factors | ( | MutableSpan< float > | factors, |
| Span< float > | strengths ) |
Definition at line 7503 of file sculpt.cc.
References BLI_assert, i, blender::MutableSpan< T >::index_range(), scale_factors(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
| void blender::ed::sculpt_paint::scale_translations | ( | MutableSpan< float3float3 > | translations, |
| float | factor ) |
Definition at line 7483 of file sculpt.cc.
References i, blender::MutableSpan< T >::index_range(), and scale_translations().
| void blender::ed::sculpt_paint::scale_translations | ( | MutableSpan< float3float3 > | translations, |
| Span< float > | factors ) |
Definition at line 7476 of file sculpt.cc.
References i, blender::MutableSpan< T >::index_range(), and scale_translations().
Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::cloth::apply_scale_filter(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::face_set::edit_fairing(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), scale_translations(), scale_translations(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().
| void blender::ed::sculpt_paint::scatter_data_bmesh | ( | Span< T > | node_data, |
| const Set< BMVert *, 0 > & | verts, | ||
| MutableSpan< T > | dst ) |
Definition at line 6445 of file sculpt.cc.
References BLI_assert, BM_elem_index_get, i, scatter_data_bmesh(), blender::Span< T >::size(), and verts.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), scatter_data_bmesh(), scatter_data_bmesh< float >(), and scatter_data_bmesh< float3 >().
| template void blender::ed::sculpt_paint::scatter_data_bmesh< float > | ( | Span< float > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float > | ) |
References scatter_data_bmesh().
| template void blender::ed::sculpt_paint::scatter_data_bmesh< float3float3 > | ( | Span< float3float3 > | , |
| const Set< BMVert *, 0 > & | , | ||
| MutableSpan< float3float3 > | ) |
References scatter_data_bmesh().
| void blender::ed::sculpt_paint::scatter_data_grids | ( | const SubdivCCG & | subdiv_ccg, |
| Span< T > | node_data, | ||
| Span< int > | grids, | ||
| MutableSpan< T > | dst ) |
Definition at line 6429 of file sculpt.cc.
References BKE_subdiv_ccg_key_top_level(), BLI_assert, blender::MutableSpan< T >::copy_from(), CCGKey::grid_area, blender::bke::ccg::grid_range(), i, blender::Span< T >::index_range(), scatter_data_grids(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by blender::ed::sculpt_paint::mask::apply_new_mask_grids(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), scatter_data_grids(), scatter_data_grids< float >(), scatter_data_grids< float3 >(), and blender::ed::sculpt_paint::mask::scatter_mask_grids().
| template void blender::ed::sculpt_paint::scatter_data_grids< float > | ( | const SubdivCCG & | , |
| Span< float > | , | ||
| Span< int > | , | ||
| MutableSpan< float > | ) |
References scatter_data_grids().
| template void blender::ed::sculpt_paint::scatter_data_grids< float3float3 > | ( | const SubdivCCG & | , |
| Span< float3float3 > | , | ||
| Span< int > | , | ||
| MutableSpan< float3float3 > | ) |
References scatter_data_grids().
| void blender::ed::sculpt_paint::scatter_data_mesh | ( | Span< T > | src, |
| Span< int > | indices, | ||
| MutableSpan< T > | dst ) |
Scatter data from an array of the node's data to the referenced geometry vertices.
Definition at line 6419 of file sculpt.cc.
References BLI_assert, i, indices, scatter_data_mesh(), and blender::Span< T >::size().
Referenced by blender::ed::sculpt_paint::cloth::apply_grab_brush(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::mask::apply_new_mask_mesh(), blender::ed::sculpt_paint::cloth::apply_snake_hook_brush(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_mesh(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), blender::ed::sculpt_paint::mask::increase_contrast_mask_mesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::undo::restore_face_set_from_undo_step(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), scatter_data_mesh(), scatter_data_mesh< bool >(), scatter_data_mesh< float >(), scatter_data_mesh< float3 >(), scatter_data_mesh< float4 >(), scatter_data_mesh< int >(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().
| template void blender::ed::sculpt_paint::scatter_data_mesh< bool > | ( | Span< bool > | , |
| Span< int > | , | ||
| MutableSpan< bool > | ) |
References scatter_data_mesh().
| template void blender::ed::sculpt_paint::scatter_data_mesh< float > | ( | Span< float > | , |
| Span< int > | , | ||
| MutableSpan< float > | ) |
References scatter_data_mesh().
| template void blender::ed::sculpt_paint::scatter_data_mesh< float3float3 > | ( | Span< float3float3 > | , |
| Span< int > | , | ||
| MutableSpan< float3float3 > | ) |
References scatter_data_mesh().
| template void blender::ed::sculpt_paint::scatter_data_mesh< float4 > | ( | Span< float4 > | , |
| Span< int > | , | ||
| MutableSpan< float4 > | ) |
References scatter_data_mesh().
| template void blender::ed::sculpt_paint::scatter_data_mesh< int > | ( | Span< int > | , |
| Span< int > | , | ||
| MutableSpan< int > | ) |
References scatter_data_mesh().
|
static |
Test whether the #StrokeCache.sculpt_normal needs update in do_brush_action
Definition at line 810 of file sculpt.cc.
References BKE_brush_has_cube_tip(), BKE_brush_mask_texture_get(), MTex::brush_map_mode, brush_uses_topology_rake(), SculptSession::cache, ELEM, MTEX_MAP_MODE_AREA, blender::ed::sculpt_paint::StrokeCache::normal_weight, OB_MODE_SCULPT, Sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BLOB, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_CREASE, SCULPT_BRUSH_TYPE_DRAW, SCULPT_BRUSH_TYPE_DRAW_SHARP, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_LAYER, SCULPT_BRUSH_TYPE_NUDGE, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_THUMB, blender::bke::brush::supports_normal_weight(), and MTex::tex.
Referenced by do_brush_action().
|
static |
Definition at line 5721 of file sculpt.cc.
References BKE_paint_brush_for_read(), brush_exit_tex(), C, SculptSession::cache, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), wmOperator::customdata, depsgraph, Sculpt::paint, paint_stroke_cancel(), blender::ed::sculpt_paint::undo::restore_from_undo_step(), Object::sculpt, ToolSettings::sculpt, sculpt_brush_stroke_cancel(), and blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo().
Referenced by sculpt_brush_stroke_cancel(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 5702 of file sculpt.cc.
References brush_stroke_init(), C, wmOperator::customdata, OPERATOR_FINISHED, paint_stroke_exec(), paint_stroke_new(), sculpt_brush_stroke_exec(), stroke_done(), stroke_get_location_bvh(), stroke_test_start(), and stroke_update_step().
Referenced by sculpt_brush_stroke_exec(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 5620 of file sculpt.cc.
References BKE_base_is_visible(), BKE_paint_brush(), BKE_report(), BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BLI_assert, brush_stroke_init(), brush_type_is_attribute_only(), brush_type_is_mask(), brush_type_is_paint(), C, color_supported_check(), CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_view3d(), wmOperator::customdata, ELEM, blender::bke::pbvh::Grids, wmOperatorType::modal, wmEvent::mval, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, over_mesh(), Sculpt::paint, paint_stroke_free(), paint_stroke_new(), blender::bke::object::pbvh_get(), wmOperator::ptr, report_if_shape_key_is_locked(), wmOperator::reports, RNA_boolean_get(), RPT_ERROR, ToolSettings::sculpt, sculpt_brush_stroke_invoke(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, stroke_done(), stroke_get_location_bvh(), stroke_test_start(), stroke_update_step(), blender::bke::pbvh::Tree::type(), wmEvent::type, wmOperator::type, and WM_event_add_modal_handler().
Referenced by sculpt_brush_stroke_invoke(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 270 of file curves_sculpt_ops.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_stroke_operator_properties(), sculpt_curves_stroke_cancel(), sculpt_curves_stroke_invoke(), and sculpt_curves_stroke_modal().
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 1166 of file curves_sculpt_ops.cc.
References blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_poll(), OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and SCULPT_CURVES_OT_min_distance_edit().
Referenced by ED_operatortypes_sculpt_curves(), and SCULPT_CURVES_OT_min_distance_edit().
|
static |
Definition at line 807 of file curves_sculpt_ops.cc.
References blender::ed::curves::editable_curves_poll(), FLT_MAX, OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_DISTANCE, RNA_def_float(), RNA_def_property_subtype(), SCULPT_CURVES_OT_select_grow(), blender::ed::sculpt_paint::select_grow::select_grow_invoke(), and blender::ed::sculpt_paint::select_grow::select_grow_modal().
Referenced by ED_operatortypes_sculpt_curves(), and SCULPT_CURVES_OT_select_grow().
|
static |
Definition at line 486 of file curves_sculpt_ops.cc.
References blender::ed::curves::editable_curves_poll(), INT32_MAX, INT32_MIN, OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), RNA_def_float(), RNA_def_int(), blender::ed::sculpt_paint::select_random::select_random_exec(), and blender::ed::sculpt_paint::select_random::select_random_ui().
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 260 of file curves_sculpt_ops.cc.
References C, wmOperator::customdata, paint_stroke_cancel(), and blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::stroke.
Referenced by SCULPT_CURVES_OT_brush_stroke().
|
static |
Definition at line 209 of file curves_sculpt_ops.cc.
References BKE_paint_brush_for_read(), BKE_paint_get_active_from_paintmode(), C, CTX_data_scene(), wmOperator::customdata, wmOperatorType::modal, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, paint_stroke_free(), paint_stroke_new(), SculptCurves, blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::stroke, stroke_done(), stroke_get_location(), stroke_test_start(), stroke_update_step(), wmEvent::type, wmOperator::type, and WM_event_add_modal_handler().
Referenced by SCULPT_CURVES_OT_brush_stroke().
|
static |
Definition at line 246 of file curves_sculpt_ops.cc.
References C, wmOperator::customdata, ELEM, OPERATOR_CANCELLED, OPERATOR_FINISHED, paint_stroke_modal(), and blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::stroke.
Referenced by SCULPT_CURVES_OT_brush_stroke().
|
static |
Definition at line 4565 of file sculpt.cc.
References BKE_pbvh_node_get_tmin(), blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::FindNearestToRayData::corner_tris, blender::ed::sculpt_paint::FindNearestToRayData::corner_verts, blender::ed::sculpt_paint::FindNearestToRayData::depth, blender::ed::sculpt_paint::FindNearestToRayData::dist_sq_to_ray, blender::ed::sculpt_paint::FindNearestToRayData::faces, blender::bke::pbvh::find_nearest_to_ray_node(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::FindNearestToRayData::hide_poly, blender::ed::sculpt_paint::FindNearestToRayData::hit, blender::ed::sculpt_paint::FindNearestToRayData::is_mid_stroke, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::FindNearestToRayData::object, orig_position_data_lookup_grids(), orig_position_data_lookup_mesh_all_verts(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::FindNearestToRayData::ray_normal, blender::ed::sculpt_paint::FindNearestToRayData::ray_start, sculpt_find_nearest_to_ray_cb(), blender::ed::sculpt_paint::FindNearestToRayData::subdiv_ccg, blender::bke::pbvh::Tree::type(), blender::ed::sculpt_paint::FindNearestToRayData::use_original, and blender::ed::sculpt_paint::FindNearestToRayData::vert_positions.
Referenced by sculpt_find_nearest_to_ray_cb(), and stroke_get_location_bvh_ex().
Noise texture gives different values for the same input coord; this can tear a multi-resolution mesh during sculpting so do a stitch in this case.
Definition at line 3607 of file sculpt.cc.
References SculptSession::active, BKE_brush_mask_texture_get(), BKE_paint_brush_for_read(), SculptSession::multires, multires_stitch_grids(), OB_MODE_SCULPT, Sculpt::paint, Object::sculpt, MTex::tex, TEX_NOISE, and Tex::type.
Referenced by stroke_update_step().
|
static |
Definition at line 1177 of file paint_cursor.cc.
References BRUSH_GRAB_ACTIVE_VERTEX, SculptSession::deform_modifiers_active, depsgraph, Brush::flag, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_depth_test_get(), GPU_line_width(), GPU_PRIM_LINES, immBegin(), immEnd(), immUniformColor4f(), immVertex3fv(), Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), SculptSession::preview_verts, Array< T, InlineBufferCapacity, Allocator >::size(), and vert_positions_for_grab_active_get().
Referenced by paint_cursor_cursor_draw_3d_view_brush_cursor_active(), and paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 3815 of file sculpt.cc.
References SculptSession::cache, ClipX, eModifierMode_Realtime, eModifierType_Mirror, blender::ed::sculpt_paint::StrokeCache::flag, MirrorModifierData::flag, i, blender::MatBase< float, 4, 4 >::identity(), blender::math::invert(), LISTBASE_FOREACH, blender::ed::sculpt_paint::StrokeCache::mat, blender::ed::sculpt_paint::StrokeCache::mat_inv, blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, MirrorModifierData::mirror_ob, MOD_MIR_AXIS_X, MOD_MIR_CLIPPING, Object::modifiers, mul_m4_m4m4(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), sculpt_init_mirror_clipping(), blender::ed::sculpt_paint::StrokeCache::tolerance, and MirrorModifierData::tolerance.
Referenced by sculpt_init_mirror_clipping(), and sculpt_update_cache_invariants().
|
static |
Definition at line 1070 of file paint_stroke.cc.
References BRUSH_CLOTH_DEFORM_GRAB, Brush::cloth_deform_type, ELEM, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SNAKE_HOOK, and SCULPT_BRUSH_TYPE_THUMB.
Referenced by paint_supports_dynamic_size(), paint_supports_dynamic_tex_coords(), and paint_supports_smooth_stroke().
|
static |
Definition at line 1219 of file paint_cursor.cc.
References GPU_line_width(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_push(), Brush::height, blender::MatBase< float, 4, 4 >::identity(), imm_draw_circle_wire_3d(), immUniformColor3fvAlpha(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), and blender::math::translate().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
|
static |
Definition at line 543 of file sculpt_ops.cc.
References BKE_base_is_visible(), BKE_paint_brushes_validate(), BKE_view_layer_active_object_get(), BKE_view_layer_base_find(), BKE_view_layer_synced_ensure(), C, CTX_data_depsgraph_on_load(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), CTX_wm_message_bus(), CTX_wm_view3d(), Object::data, depsgraph, Object::id, ME_SCULPT_DYNAMIC_TOPOLOGY, Object::mode, blender::ed::object::mode_compat_set(), NC_SCENE, ND_MODE, OB_MODE_SCULPT, object_sculpt_mode_enter(), object_sculpt_mode_exit(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Sculpt::paint, blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_enter_sculpt_mode(), wmOperator::reports, ToolSettings::sculpt, Scene::toolsettings, WM_event_add_notifier(), WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by SCULPT_OT_sculptmode_toggle().
|
static |
Definition at line 4418 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::alt_smooth, Brush::autosmooth_factor, BRUSH_MASK_SMOOTH, BRUSH_STROKE_SMOOTH, brush_type_is_paint(), SculptSession::cache, blender::ed::sculpt_paint::auto_mask::is_enabled(), Brush::mask_tool, blender::bke::object::pbvh_get(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_SLIDE_RELAX, SCULPT_BRUSH_TYPE_SMEAR, SCULPT_BRUSH_TYPE_SMOOTH, and sculpt_needs_connectivity_info().
Referenced by sculpt_needs_connectivity_info(), and SCULPT_stroke_modifiers_check().
| void blender::ed::sculpt_paint::SCULPT_OT_brush_stroke | ( | wmOperatorType * | ot | ) |
Definition at line 5751 of file sculpt.cc.
References brush_stroke_modal(), OPTYPE_BLOCKING, ot, paint_stroke_operator_properties(), PROP_HIDDEN, PROP_SKIP_SAVE, redo_empty_ui(), RNA_def_boolean(), RNA_def_property_flag(), sculpt_brush_stroke_cancel(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), SCULPT_OT_brush_stroke(), and SCULPT_poll().
Referenced by operatortypes_sculpt(), and SCULPT_OT_brush_stroke().
|
static |
Definition at line 181 of file sculpt_ops.cc.
References optimize_exec(), OPTYPE_REGISTER, ot, and SCULPT_mode_poll().
Referenced by operatortypes_sculpt().
|
static |
Definition at line 673 of file sculpt_ops.cc.
References OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, ot, sample_color_invoke(), and SCULPT_mode_poll().
Referenced by operatortypes_sculpt().
|
static |
Definition at line 606 of file sculpt_ops.cc.
References ED_operator_object_active_editable_mesh(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and sculpt_mode_toggle_exec().
Referenced by operatortypes_sculpt().
|
static |
Definition at line 147 of file sculpt_ops.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, SCULPT_mode_poll(), and set_persistent_base_exec().
Referenced by operatortypes_sculpt().
| void blender::ed::sculpt_paint::SCULPT_OT_set_pivot_position | ( | wmOperatorType * | ot | ) |
Definition at line 993 of file sculpt_transform.cc.
References FLT_MAX, OPTYPE_REGISTER, OPTYPE_UNDO, ot, prop_sculpt_pivot_position_types, RNA_def_enum(), RNA_def_float(), SCULPT_mode_poll(), SCULPT_OT_set_pivot_position(), set_pivot_depends_on_cursor(), set_pivot_position_exec(), set_pivot_position_invoke(), set_pivot_position_poll_property(), and Unmasked.
Referenced by operatortypes_sculpt(), and SCULPT_OT_set_pivot_position().
|
static |
Definition at line 293 of file sculpt_ops.cc.
References no_multires_poll(), ot, RNA_def_float(), RNA_def_property_ui_range(), and symmetrize_exec().
Referenced by operatortypes_sculpt().
|
static |
Definition at line 4463 of file sculpt.cc.
References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::ed::sculpt_paint::RaycastData::active_vertex, BKE_pbvh_node_get_tmin(), BKE_subdiv_ccg_key_top_level(), blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::ed::sculpt_paint::RaycastData::depth, blender::ed::sculpt_paint::RaycastData::face_normal, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::Node::flag_, blender::bke::pbvh::Node::FullyHidden, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::bke::pbvh::Mesh, blender::bke::pbvh::node_raycast_bmesh(), blender::bke::pbvh::node_raycast_grids(), blender::bke::pbvh::node_raycast_mesh(), blender::ed::sculpt_paint::RaycastData::object, orig_position_data_lookup_grids(), orig_position_data_lookup_mesh_all_verts(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, sculpt_raycast_cb(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, SubdivCCGCoord::to_index(), blender::bke::pbvh::Tree::type(), blender::ed::sculpt_paint::RaycastData::use_original, and blender::ed::sculpt_paint::RaycastData::vert_positions.
Referenced by cursor_geometry_info_update(), sculpt_raycast_cb(), stroke_get_location_bvh_ex(), and vertex_is_occluded().
|
static |
Definition at line 286 of file sculpt_transform.cc.
References blender::bke::pbvh::BMesh, Object::data, depsgraph, SculptSession::filter_cache, blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::index_mask::IndexMask::foreach_index(), SubdivCCG::grid_area, blender::bke::pbvh::Grids, i, blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::filter::Cache::node_mask, blender::bke::pbvh::Tree::nodes(), blender::bke::object::pbvh_get(), SubdivCCG::positions, blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), Object::sculpt, SCULPT_mesh_symmetry_xyz_get(), SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::tag_positions_changed(), blender::ed::sculpt_paint::filter::Cache::transform_displacement_mode, transform_matrices_init(), transform_node_bmesh(), transform_node_grids(), transform_node_mesh(), blender::bke::pbvh::Tree::type(), blender::bke::pbvh::update_node_bounds_bmesh(), blender::bke::pbvh::update_node_bounds_grids(), and blender::bke::pbvh::update_node_bounds_mesh().
Referenced by update_modal_transform().
|
static |
Definition at line 3924 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, blender::ed::sculpt_paint::StrokeCache::alt_smooth, BKE_brush_color_jitter_get_settings(), BKE_paint_brush(), BKE_paint_brush_for_read(), BLI_dial_init(), blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_ACCUMULATE, BRUSH_ANCHORED, brush_flip(), BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, C, SculptSession::cache, copy_v2_v2(), CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), SculptSession::cursor_location, SculptSession::cursor_normal, SculptSession::cursor_sampled_normal, wmOperator::customdata, blender::ed::sculpt_paint::StrokeCache::dial, UnifiedPaintSettings::draw_inverted, ED_view3d_ob_project_mat_get(), fabsf, blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::flag, Brush::flag, blender::ed::sculpt_paint::StrokeCache::gravity_direction, Sculpt::gravity_factor, Sculpt::gravity_object, i, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::ed::sculpt_paint::StrokeCache::initial_hsv_jitter, blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::initial_normal_symm, blender::ed::sculpt_paint::StrokeCache::invert, blender::math::invert(), max_ff(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, blender::ed::sculpt_paint::StrokeCache::mouse, blender::ed::sculpt_paint::StrokeCache::mouse_event, blender::ed::sculpt_paint::StrokeCache::normal_weight, Brush::normal_weight, blender::math::normalize(), Sculpt::paint, ToolSettings::paint_mode, paint_stroke_view_context(), blender::ed::sculpt_paint::StrokeCache::pen_flip, blender::ed::sculpt_paint::StrokeCache::plane_brush, Brush::plane_trim, blender::ed::sculpt_paint::StrokeCache::plane_trim_squared, blender::ed::sculpt_paint::StrokeCache::projection_mat, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), Object::runtime, ViewContext::rv3d, blender::ed::sculpt_paint::StrokeCache::scale, Object::scale, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_SHARP, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_ROTATE, sculpt_init_mirror_clipping(), sculpt_update_cache_invariants(), SCULPT_use_image_paint_brush(), seed_hsv_jitter(), smooth_brush_toggle_on(), blender::bke::brush::supports_accumulate(), blender::bke::brush::supports_gravity(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::bke::brush::supports_normal_weight(), UnifiedPaintSettings::tex_mouse, blender::math::transform_direction(), ToolSettings::unified_paint_settings, blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::StrokeCache::view_normal, and RegionView3D::viewinv.
Referenced by sculpt_update_cache_invariants(), and stroke_test_start().
|
static |
Definition at line 4318 of file sculpt.cc.
References UnifiedPaintSettings::anchored_initial_mouse, UnifiedPaintSettings::anchored_size, BKE_brush_unprojected_radius_set(), BKE_brush_use_locked_size(), BKE_brush_use_size_pressure(), BKE_paint_brush(), BLI_dial_angle(), BRUSH_ANCHORED, brush_delta_update(), brush_dynamic_size_get(), BRUSH_EDGE_TO_EDGE, UnifiedPaintSettings::brush_rotation, blender::ed::sculpt_paint::StrokeCache::bstrength, C, SculptSession::cache, cache_paint_invariants_update(), blender::ed::sculpt_paint::StrokeCache::clay_thumb_brush, copy_v2_v2(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, blender::ed::sculpt_paint::StrokeCache::dial, UnifiedPaintSettings::draw_anchored, blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::ed::sculpt_paint::StrokeCache::first_time, Brush::flag, blender::ed::sculpt_paint::StrokeCache::initial_mouse, UnifiedPaintSettings::initial_pixel_radius, blender::ed::sculpt_paint::StrokeCache::initial_radius, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), blender::ed::sculpt_paint::StrokeCache::iteration_count, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::mouse, blender::ed::sculpt_paint::StrokeCache::mouse_event, object_space_radius_get(), Sculpt::paint, paint_calc_object_space_radius(), paint_supports_dynamic_size(), UnifiedPaintSettings::pixel_radius, blender::ed::sculpt_paint::StrokeCache::pressure, blender::ed::sculpt_paint::StrokeCache::pressure_stabilizer, ptr, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::radius_squared, RNA_float_get(), RNA_float_get_array(), Sculpt, Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLAY_THUMB, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SNAKE_HOOK, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), sculpt_update_cache_variants(), blender::ed::sculpt_paint::StrokeCache::special_rotation, blender::ed::sculpt_paint::StrokeCache::stabilizer_index, blender::ed::sculpt_paint::StrokeCache::tilt, Scene::toolsettings, ToolSettings::unified_paint_settings, blender::ed::sculpt_paint::StrokeCache::vc, and blender::ed::sculpt_paint::StrokeCache::vertex_rotation.
Referenced by sculpt_update_cache_variants(), and stroke_update_step().
|
static |
Definition at line 84 of file sculpt_ops.cc.
References blender::bke::MutableAttributeAccessor::add(), BKE_base_is_visible(), BKE_sculpt_update_object_for_edit(), blender::bke::pbvh::BMesh, C, CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_wm_view3d(), Object::data, depsgraph, blender::VArray< T >::ForSpan(), SculptSession::grid_size, SubdivCCG::grid_size, blender::bke::pbvh::Grids, SculptSession::grids_num, SubdivCCG::grids_num, blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, SubdivCCG::normals, OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::bke::object::pbvh_get(), SculptSession::persistent, blender::bke::Point, SubdivCCG::positions, blender::bke::MutableAttributeAccessor::remove(), Object::sculpt, SculptSession::sculpt_persistent_co, SculptSession::sculpt_persistent_disp, SculptSession::sculpt_persistent_no, blender::bke::AttributeReader< T >::sharing_info, SculptSession::subdiv_ccg, blender::bke::AttributeReader< T >::varray, and blender::bke::pbvh::vert_normals_eval().
Referenced by SCULPT_OT_set_persistent_base().
|
static |
Definition at line 638 of file sculpt_transform.cc.
References ActiveVert, CursorSurface, ELEM, ptr, and RNA_enum_get().
Referenced by SCULPT_OT_set_pivot_position().
|
static |
Definition at line 913 of file sculpt_transform.cc.
References SculptSession::active_vert_position(), ActiveVert, average_mask_border_position(), UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, average_unmasked_position(), BKE_base_is_visible(), BKE_sculpt_update_object_for_edit(), C, copy_v3_v3(), CTX_data_active_base(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_tool_settings(), CTX_wm_region(), CTX_wm_view3d(), cursor_geometry_info_update(), CursorSurface, Object::data, depsgraph, ED_region_tag_redraw(), UnifiedPaintSettings::last_stroke_valid, NC_GEOM, ND_SELECT, OPERATOR_CANCELLED, OPERATOR_FINISHED, Origin, SculptSession::pivot_pos, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), Object::sculpt, SCULPT_mesh_symmetry_xyz_get(), set_pivot_position_exec(), stroke_get_location_bvh(), ToolSettings::unified_paint_settings, Unmasked, WM_event_add_notifier(), and zero_v3().
Referenced by SCULPT_OT_set_pivot_position(), set_pivot_position_exec(), and set_pivot_position_invoke().
|
static |
Definition at line 973 of file sculpt_transform.cc.
References C, wmEvent::mval, wmOperator::ptr, RNA_float_set(), set_pivot_position_exec(), and set_pivot_position_invoke().
Referenced by SCULPT_OT_set_pivot_position(), and set_pivot_position_invoke().
|
static |
Definition at line 982 of file sculpt_transform.cc.
References ActiveVert, CursorSurface, ELEM, wmOperator::ptr, RNA_enum_get(), RNA_property_identifier(), set_pivot_position_poll_property(), and STRPREFIX.
Referenced by SCULPT_OT_set_pivot_position(), and set_pivot_position_poll_property().
|
static |
Definition at line 1331 of file grease_pencil_draw_ops.cc.
References blender::bke::curves_copy_point_selection(), blender::IndexMask::from_predicate(), i, blender::IndexRange::last(), blender::math::pow(), blender::IndexRange::size(), blender::IndexRange::start(), and step.
Referenced by grease_pencil_apply_fill().
|
static |
Definition at line 3894 of file sculpt.cc.
References BKE_brush_size_set(), BKE_paint_brush(), BKE_paint_brush_set(), C, CTX_data_scene(), ELEM, Brush::mask_tool, blender::ed::sculpt_paint::StrokeCache::saved_active_brush, blender::ed::sculpt_paint::StrokeCache::saved_mask_brush_tool, blender::ed::sculpt_paint::StrokeCache::saved_smooth_size, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_SLIDE_RELAX, SCULPT_BRUSH_TYPE_SMEAR, and smooth_brush_toggle_off().
Referenced by smooth_brush_toggle_off(), and stroke_done().
|
static |
Definition at line 3852 of file sculpt.cc.
References BKE_brush_size_get(), BKE_brush_size_set(), BKE_curvemapping_init(), BKE_paint_brush(), BKE_paint_brush_set(), BKE_paint_brush_set_essentials(), BRUSH_MASK_SMOOTH, C, CLOG_WARN, CTX_data_main(), CTX_data_scene(), Brush::curve, ELEM, LOG, Brush::mask_tool, blender::ed::sculpt_paint::StrokeCache::saved_active_brush, blender::ed::sculpt_paint::StrokeCache::saved_mask_brush_tool, blender::ed::sculpt_paint::StrokeCache::saved_smooth_size, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_SLIDE_RELAX, SCULPT_BRUSH_TYPE_SMEAR, and smooth_brush_toggle_on().
Referenced by sculpt_update_cache_invariants(), and smooth_brush_toggle_on().
|
static |
Definition at line 1302 of file grease_pencil_draw_ops.cc.
References blender::bke::GSpanAttributeWriter::finish(), blender::VArray< T >::ForSingle(), blender::index_mask::IndexMask::is_empty(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::geometry::smooth_curve_attribute(), and blender::bke::GSpanAttributeWriter::span.
Referenced by grease_pencil_apply_fill().
|
static |
Definition at line 119 of file curves_sculpt_ops.cc.
References BKE_paint_brush_for_read(), BLI_assert_unreachable, C, CTX_data_scene(), ToolSettings::curves_sculpt, Brush::curves_sculpt_brush_type, CURVES_SCULPT_BRUSH_TYPE_ADD, CURVES_SCULPT_BRUSH_TYPE_COMB, CURVES_SCULPT_BRUSH_TYPE_DELETE, CURVES_SCULPT_BRUSH_TYPE_DENSITY, CURVES_SCULPT_BRUSH_TYPE_GROW_SHRINK, CURVES_SCULPT_BRUSH_TYPE_PINCH, CURVES_SCULPT_BRUSH_TYPE_PUFF, CURVES_SCULPT_BRUSH_TYPE_SELECTION_PAINT, CURVES_SCULPT_BRUSH_TYPE_SLIDE, CURVES_SCULPT_BRUSH_TYPE_SMOOTH, CURVES_SCULPT_BRUSH_TYPE_SNAKE_HOOK, new_add_operation(), new_comb_operation(), new_delete_operation(), new_density_operation(), new_grow_shrink_operation(), new_pinch_operation(), new_puff_operation(), new_selection_paint_operation(), new_slide_operation(), new_smooth_operation(), new_snake_hook_operation(), CurvesSculpt::paint, wmOperator::ptr, RNA_enum_get(), and Scene::toolsettings.
Referenced by stroke_update_step().
| void blender::ed::sculpt_paint::store_mesh_from_eval | ( | const wmOperator & | op, |
| const Scene & | scene, | ||
| const Depsgraph & | depsgraph, | ||
| const RegionView3D * | rv3d, | ||
| Object & | object, | ||
| Mesh * | new_mesh ) |
Fully replace the sculpt mesh with a mesh outside of Main. This implements various checks to avoid pushing full geometry-type undo steps when possible, allowing for better performance.
Definition at line 5275 of file sculpt.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), blender::bke::pbvh::all_leaf_nodes(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), attribute_matches(), Geometry::attributes, BKE_id_free(), BKE_mesh_copy_parameters(), BKE_sculptsession_use_pbvh_draw(), CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_INT32, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CustomData_add_layer_named_with_data(), CustomData_free_layer_named(), DEG_id_tag_update(), depsgraph, ELEM, blender::bke::Face, blender::ed::sculpt_paint::undo::FaceSet, blender::bke::AttributeIter::get(), get_vertex_group_sharing_info(), ID_RECALC_GEOMETRY, ID_RECALC_SHADING, LISTBASE_FOREACH, blender::ed::sculpt_paint::undo::Mask, blender::bke::AttributeIter::name, blender::bke::object::pbvh_get(), blender::bke::Point, blender::ed::sculpt_paint::undo::Position, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_nodes(), replace_attribute(), blender::bke::AttributeReader< T >::sharing_info, store_mesh_from_eval(), store_sculpt_entire_mesh(), blender::bke::pbvh::Tree::tag_face_sets_changed(), blender::bke::pbvh::Tree::tag_masks_changed(), tag_mesh_positions_changed(), blender::bke::pbvh::Tree::tag_positions_changed(), topology_matches(), blender::bke::pbvh::Tree::update_bounds(), and blender::bke::AttributeReader< T >::varray.
Referenced by store_mesh_from_eval(), and blender::ed::geometry::store_result_geometry().
|
static |
Definition at line 5254 of file sculpt.cc.
References BKE_mesh_nomain_to_mesh(), BKE_sculptsession_free_pbvh(), blender::ed::sculpt_paint::undo::geometry_begin(), blender::ed::sculpt_paint::undo::geometry_end(), and store_sculpt_entire_mesh().
Referenced by store_mesh_from_eval(), and store_sculpt_entire_mesh().
|
static |
Definition at line 1011 of file paint_stroke.cc.
References blender::ed::sculpt_paint::PaintStroke::brush, MTex::brush_angle_mode, UnifiedPaintSettings::brush_rotation, UnifiedPaintSettings::brush_rotation_sec, C, blender::ed::sculpt_paint::PaintStroke::done, Brush::mask_mtex, Brush::mtex, MTEX_ANGLE_RAKE, paint_stroke_free(), blender::ed::sculpt_paint::PaintStroke::redraw, blender::ed::sculpt_paint::PaintStroke::stroke_started, and blender::ed::sculpt_paint::PaintStroke::ups.
|
static |
Definition at line 5570 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::alt_smooth, BKE_paint_brush(), BLI_assert, blender::ed::sculpt_paint::StrokeCache::brush, brush_exit_tex(), C, SculptSession::cache, Color, CTX_data_active_object(), CTX_data_tool_settings(), UnifiedPaintSettings::draw_inverted, flush_update_done(), Image, Mask, NC_OBJECT, ND_DRAW, Sculpt::paint, ToolSettings::paint_mode, Position, Object::sculpt, ToolSettings::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_PAINT, SCULPT_stroke_modifiers_check(), SCULPT_use_image_paint_brush(), smooth_brush_toggle_off(), stroke_done(), stroke_undo_end(), ToolSettings::unified_paint_settings, and WM_event_add_notifier().
|
static |
Definition at line 204 of file curves_sculpt_ops.cc.
References C, and UNUSED_VARS.
Referenced by grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_invoke(), paint_stroke_cancel(), paint_stroke_curve_end(), paint_stroke_exec(), paint_stroke_modal(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_curves_stroke_invoke(), and stroke_done().
|
static |
Definition at line 213 of file grease_pencil_draw_ops.cc.
References C, blender::ed::sculpt_paint::GreasePencilStrokeOperation::on_stroke_done(), and paint_stroke_mode_data().
|
static |
Definition at line 80 of file grease_pencil_draw_ops.cc.
References out.
|
static |
Definition at line 160 of file curves_sculpt_ops.cc.
References C, out, and UNUSED_VARS.
Referenced by grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_invoke(), and sculpt_curves_stroke_invoke().
| bool blender::ed::sculpt_paint::stroke_get_location_bvh | ( | bContext * | C, |
| float | out[3], | ||
| const float | mval[2], | ||
| bool | force_original ) |
Do a ray-cast in the tree to find the 3d brush location (This allows us to ignore the GL depth buffer)
TODO: This should be updated to return std::optional<float3>
Definition at line 4919 of file sculpt.cc.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), C, copy_v3_v3(), Brush::falloff_shape, out, PAINT_FALLOFF_SHAPE_TUBE, result, stroke_get_location_bvh(), and stroke_get_location_bvh_ex().
Referenced by blender::ed::sculpt_paint::filter::cache_init(), paint_brush_stroke_add_step(), paint_line_strokes_spacing(), paint_space_stroke(), paint_stroke_curve_end(), paint_stroke_modal(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), set_pivot_position_exec(), stroke_get_location_bvh(), vpaint_exec(), vpaint_invoke(), wpaint_exec(), and wpaint_invoke().
|
static |
| check_closest | if true and the ray test fails a point closest to the ray will be found. |
| limit_closest_radius | if true then the closest point will be tested against the active brush radius. |
Definition at line 4806 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, BKE_paint_brush(), BKE_paint_get_active_from_context(), C, SculptSession::cache, blender::ed::sculpt_paint::FindNearestToRayData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::FindNearestToRayData::corner_verts, blender::ed::sculpt_paint::RaycastData::corner_verts, CTX_data_depsgraph_pointer(), CTX_data_scene(), Object::data, depsgraph, blender::ed::sculpt_paint::FindNearestToRayData::depth, blender::ed::sculpt_paint::RaycastData::depth, blender::ed::sculpt_paint::FindNearestToRayData::dist_sq_to_ray, ED_view3d_viewcontext_init(), blender::bke::Face, blender::ed::sculpt_paint::FindNearestToRayData::faces, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::find_nearest_to_ray(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::FindNearestToRayData::hide_poly, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::FindNearestToRayData::hit, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::FindNearestToRayData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, ViewContext::obact, blender::ed::sculpt_paint::FindNearestToRayData::object, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), out, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::FindNearestToRayData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::FindNearestToRayData::ray_start, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), Object::sculpt, sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), SCULPT_stroke_modifiers_check(), stroke_get_location_bvh_ex(), blender::ed::sculpt_paint::FindNearestToRayData::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::subdiv_ccg, SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), blender::ed::sculpt_paint::FindNearestToRayData::use_original, blender::ed::sculpt_paint::RaycastData::use_original, blender::ed::sculpt_paint::FindNearestToRayData::vert_positions, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), and vert_random_access_ensure().
Referenced by over_mesh(), stroke_get_location_bvh(), and stroke_get_location_bvh_ex().
|
static |
Definition at line 208 of file grease_pencil_draw_ops.cc.
References C, CTX_wm_region(), and ED_region_tag_redraw().
Referenced by grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), and grease_pencil_weight_brush_stroke_invoke().
|
static |
Definition at line 172 of file curves_sculpt_ops.cc.
References C, and UNUSED_VARS.
Referenced by grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_invoke(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_curves_stroke_invoke(), and stroke_test_start().
|
static |
Definition at line 179 of file grease_pencil_draw_ops.cc.
References C, and UNUSED_VARS.
|
static |
Definition at line 5471 of file sculpt.cc.
References BKE_paint_brush(), brush_type_is_paint(), C, View3DShading::color_type, CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_region_view3d(), CTX_wm_view3d(), cursor_geometry_info_update(), ED_view3d_init_mats_rv3d(), wmOperator::flag, OB_SOLID, OP_IS_INVOKE, over_mesh(), Sculpt::paint, ToolSettings::paint_mode, Object::sculpt, ToolSettings::sculpt, Brush::sculpt_brush_type, sculpt_update_cache_invariants(), SCULPT_use_image_paint_brush(), View3D::shading, stroke_test_start(), stroke_undo_begin(), View3DShading::type, and V3D_SHADING_VERTEX_COLOR.
|
static |
Definition at line 5509 of file sculpt.cc.
References BKE_paint_brush_for_read(), brush_type_is_paint(), C, SculptSession::cache, Color, copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_tool_settings(), depsgraph, do_brush_action(), do_symmetrical_brush_actions(), dynamic_topology_update(), blender::ed::sculpt_paint::StrokeCache::first_time, flush_update_step(), Image, blender::ed::sculpt_paint::StrokeCache::last_location, blender::ed::sculpt_paint::StrokeCache::location, Mask, Sculpt::paint, ToolSettings::paint_mode, paint_stroke_distance_get(), Position, restore_from_undo_step_if_necessary(), Object::sculpt, ToolSettings::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_MASK, sculpt_fix_noise_tear(), SCULPT_stroke_modifiers_check(), sculpt_update_cache_variants(), SCULPT_use_image_paint_brush(), blender::ed::sculpt_paint::StrokeCache::stroke_distance, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), stroke_update_step(), and ToolSettings::unified_paint_settings.
|
static |
Definition at line 178 of file curves_sculpt_ops.cc.
References C, wmOperator::customdata, blender::ed::sculpt_paint::StrokeExtension::is_first, blender::ed::sculpt_paint::StrokeExtension::mouse_position, blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::operation, blender::ed::sculpt_paint::StrokeExtension::pressure, blender::ed::sculpt_paint::StrokeExtension::reports, wmOperator::reports, RNA_float_get(), RNA_float_get_array(), and start_brush_operation().
Referenced by grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_invoke(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_curves_stroke_invoke(), and stroke_update_step().
|
static |
Definition at line 185 of file grease_pencil_draw_ops.cc.
References BLI_assert, C, get_stroke_operation(), blender::ed::sculpt_paint::GreasePencilStrokeOperation::on_stroke_extended(), paint_stroke_mode_data(), paint_stroke_set_mode_data(), RNA_float_get(), RNA_float_get_array(), and sample.
|
static |
Definition at line 215 of file sculpt_ops.cc.
References BKE_base_is_visible(), BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_mirror_apply_mirror_on_axis(), BKE_sculptsession_free_pbvh(), SculptSession::bm, BM_EDGE, BM_ELEM_TAG, SculptSession::bm_log, BM_log_all_added(), BM_log_before_all_removed(), BM_mesh_elem_hflag_disable_all(), BM_mesh_toolflags_set(), blender::bke::pbvh::BMesh, BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_op_callf(), C, CTX_data_active_base(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), depsgraph, blender::ed::sculpt_paint::undo::Geometry, blender::ed::sculpt_paint::undo::geometry_begin(), blender::ed::sculpt_paint::undo::geometry_end(), blender::bke::pbvh::Grids, Object::id, ID_RECALC_GEOMETRY, blender::bke::pbvh::Mesh, NC_OBJECT, ND_DRAW, OPERATOR_CANCELLED, OPERATOR_FINISHED, blender::bke::object::pbvh_get(), wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_node(), RNA_float_get(), Object::sculpt, ToolSettings::sculpt, Sculpt::symmetrize_direction, blender::ed::sculpt_paint::dyntopo::triangulate(), blender::bke::pbvh::Tree::type(), and WM_event_add_notifier().
Referenced by SCULPT_OT_symmetrize().
|
inline |
Definition at line 511 of file paint_intern.hh.
References PAINT_SYMM_X, PAINT_SYMM_Y, and PAINT_SYMM_Z.
Referenced by calc_brush_plane(), calc_overlap(), cursor_draw_point_with_symmetry(), filter_region_clip_factors(), filter_region_clip_factors(), find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), blender::ed::sculpt_paint::gesture::flip_for_symmetry_pass(), blender::ed::sculpt_paint::trim::gesture_apply_for_symmetry_pass(), blender::ed::sculpt_paint::boundary::init_boundary_bmesh(), blender::ed::sculpt_paint::boundary::init_boundary_grids(), blender::ed::sculpt_paint::boundary::init_boundary_mesh(), blender::ed::sculpt_paint::gesture::is_affected_lasso(), sculpt_apply_texture(), SCULPT_cache_calc_brushdata_symm(), SCULPT_calc_vertex_displacement(), SCULPT_flip_v3_by_symm_area(), SCULPT_is_vertex_inside_brush_radius_symm(), transform_radius_elastic(), update_sculpt_normal(), and blender::ed::sculpt_paint::pose::vert_inside_brush_radius().
|
static |
Definition at line 5036 of file sculpt.cc.
References blender::bke::pbvh::bounds_get(), blender::bke::object::pbvh_get(), and tag_mesh_positions_changed().
Referenced by flush_update_step(), store_mesh_from_eval(), and tag_mesh_positions_changed().
| float3float3 blender::ed::sculpt_paint::tilt_apply_to_normal | ( | const float3float3 & | normal, |
| const StrokeCache & | cache, | ||
| const float | tilt_strength ) |
Definition at line 2691 of file sculpt.cc.
References ViewContext::obact, ViewContext::rv3d, blender::ed::sculpt_paint::StrokeCache::tilt, tilt_apply_to_normal(), blender::ed::sculpt_paint::StrokeCache::vc, and RegionView3D::viewinv.
| float3float3 blender::ed::sculpt_paint::tilt_apply_to_normal | ( | const Object & | object, |
| const float4x4 & | view_inverse, | ||
| const float3float3 & | normal, | ||
| const float2float2 & | tilt, | ||
| float | tilt_strength ) |
Tilts a normal by the x and y tilt values using the view axis.
Definition at line 2671 of file sculpt.cc.
References M_PI_2, blender::math::normalize(), blender::math::rotate_direction_around_axis(), blender::math::transform_direction(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis().
Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::do_plane_brush(), paint_cursor_drawing_setup_cursor_space(), tilt_apply_to_normal(), and tilt_effective_normal_get().
| float3float3 blender::ed::sculpt_paint::tilt_effective_normal_get | ( | const SculptSession & | ss, |
| const Brush & | brush ) |
Get effective surface normal with pen tilt and tilt strength applied to it.
Definition at line 2699 of file sculpt.cc.
References SculptSession::cache, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, tilt_apply_to_normal(), and Brush::tilt_strength_factor.
Referenced by blender::ed::sculpt_paint::brushes::do_draw_brush(), and blender::ed::sculpt_paint::brushes::do_draw_sharp_brush().
Definition at line 5233 of file sculpt.cc.
References attribute_matches(), Geometry::attributes, b, Mesh::corners_num, Mesh::edges_num, Mesh::faces_num, Mesh::runtime, topology_matches(), and Mesh::verts_num.
Referenced by store_mesh_from_eval(), and topology_matches().
| float blender::ed::sculpt_paint::transform_brush_radius | ( | const float4x4 & | transform, |
| const float3float3 & | brush_position, | ||
| const float | old_radius ) |
Definition at line 356 of file curves_sculpt_brush.cc.
References blender::math::distance(), and blender::math::transform_point().
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), and blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry().
|
static |
Definition at line 87 of file sculpt_transform.cc.
References add_v3_fl(), copy_v3_v3(), copy_v4_v4(), i, Incremental, SculptSession::init_pivot_pos, SculptSession::init_pivot_rot, SculptSession::init_pivot_scale, invert_m4_m4(), mul_m4_m4m4(), normalize_qt(), Original, PAINT_SYMM_AREAS, SculptSession::pivot_pos, SculptSession::pivot_rot, SculptSession::pivot_scale, SculptSession::prev_pivot_pos, SculptSession::prev_pivot_rot, SculptSession::prev_pivot_scale, ptr, quat_to_mat4(), SCULPT_flip_quat_by_symm_area(), SCULPT_flip_v3_by_symm_area(), size_to_mat4(), sub_qt_qtqt(), sub_v3_v3v3(), translate_m4(), and unit_m4().
Referenced by sculpt_transform_all_vertices(), and transform_radius_elastic().
|
static |
Definition at line 255 of file sculpt_transform.cc.
References apply_translations(), BKE_pbvh_bmesh_node_unique_verts(), SculptSession::bm, SculptSession::bm_log, calc_symm_area_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), filter_translations_with_symmetry(), orig_position_data_gather_bmesh(), Vector< T, InlineBufferCapacity, Allocator >::resize(), scale_translations(), SCULPT_mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::TransformLocalData::translations, and verts.
Referenced by sculpt_transform_all_vertices().
|
static |
Definition at line 223 of file sculpt_transform.cc.
References apply_translations(), BKE_subdiv_ccg_key_top_level(), calc_symm_area_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), filter_translations_with_symmetry(), CCGKey::grid_area, blender::bke::pbvh::GridsNode::grids(), orig_position_data_get_grids(), blender::ed::sculpt_paint::OrigPositionData::positions, Vector< T, InlineBufferCapacity, Allocator >::resize(), scale_translations(), SCULPT_mesh_symmetry_xyz_get(), blender::Span< T >::size(), SculptSession::subdiv_ccg, and blender::ed::sculpt_paint::TransformLocalData::translations.
Referenced by sculpt_transform_all_vertices().
|
static |
Definition at line 194 of file sculpt_transform.cc.
References calc_symm_area_transform_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::PositionDeformData::deform(), blender::ed::sculpt_paint::PositionDeformData::eval, blender::ed::sculpt_paint::TransformLocalData::factors, fill_factor_from_hide_and_mask(), filter_translations_with_symmetry(), blender::ed::sculpt_paint::MeshAttributeData::hide_vert, blender::ed::sculpt_paint::MeshAttributeData::mask, orig_position_data_get_mesh(), blender::ed::sculpt_paint::OrigPositionData::positions, Vector< T, InlineBufferCapacity, Allocator >::resize(), scale_translations(), SCULPT_mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::TransformLocalData::translations, blender::bke::pbvh::MeshNode::verts(), and verts.
Referenced by sculpt_transform_all_vertices().
| void blender::ed::sculpt_paint::transform_positions | ( | const float4x4 & | transform, |
| MutableSpan< float3float3 > | positions ) |
Definition at line 7555 of file sculpt.cc.
References i, blender::MutableSpan< T >::index_range(), and blender::math::transform_point().
| void blender::ed::sculpt_paint::transform_positions | ( | Span< float3float3 > | src, |
| const float4x4 & | transform, | ||
| MutableSpan< float3float3 > | dst ) |
Definition at line 7544 of file sculpt.cc.
References BLI_assert, i, blender::Span< T >::index_range(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().
Referenced by blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_mesh().
|
static |
Definition at line 453 of file sculpt_transform.cc.
References BKE_kelvinlet_init_params(), BLI_assert, blender::bke::pbvh::BMesh, Object::data, depsgraph, elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), SculptSession::filter_cache, blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::index_mask::IndexMask::foreach_index(), SubdivCCG::grid_area, blender::bke::pbvh::Grids, i, Incremental, is_symmetry_iteration_valid(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::filter::Cache::node_mask, blender::bke::pbvh::Tree::nodes(), PAINT_SYMM_NONE, params, blender::bke::object::pbvh_get(), SculptSession::pivot_pos, SubdivCCG::positions, Object::sculpt, SCULPT_get_vertex_symm_area(), SCULPT_mesh_symmetry_xyz_get(), SculptSession::subdiv_ccg, symmetry_flip(), blender::bke::pbvh::Tree::tag_positions_changed(), blender::ed::sculpt_paint::filter::Cache::transform_displacement_mode, transform_matrices_init(), blender::bke::pbvh::Tree::type(), blender::bke::pbvh::update_node_bounds_bmesh(), blender::bke::pbvh::update_node_bounds_grids(), and blender::bke::pbvh::update_node_bounds_mesh().
Referenced by update_modal_transform().
| void blender::ed::sculpt_paint::translations_from_new_positions | ( | Span< float3float3 > | new_positions, |
| Span< float3float3 > | old_positions, | ||
| MutableSpan< float3float3 > | translations ) |
Definition at line 7534 of file sculpt.cc.
References BLI_assert, i, blender::Span< T >::index_range(), blender::Span< T >::size(), and translations_from_new_positions().
| void blender::ed::sculpt_paint::translations_from_new_positions | ( | Span< float3float3 > | new_positions, |
| Span< int > | verts, | ||
| Span< float3float3 > | old_positions, | ||
| MutableSpan< float3float3 > | translations ) |
For brushes that calculate an averaged new position instead of generating a new translation vector.
Definition at line 7523 of file sculpt.cc.
References BLI_assert, i, blender::Span< T >::size(), translations_from_new_positions(), and verts.
Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), translations_from_new_positions(), and translations_from_new_positions().
| void blender::ed::sculpt_paint::translations_from_offset_and_factors | ( | const float3float3 & | offset, |
| Span< float > | factors, | ||
| MutableSpan< float3float3 > | r_translations ) |
Definition at line 7512 of file sculpt.cc.
References BLI_assert, i, blender::Span< T >::index_range(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), and translations_from_offset_and_factors().
Referenced by blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), and translations_from_offset_and_factors().
|
static |
Definition at line 49 of file paint_image_2d_curve_mask.cc.
References aa_samples_per_texel_axis(), BLI_assert, CurveMaskCache::curve_mask, CurveSamplesBaseLen, CurveSamplesLen, floorf, i, len, len_v2v2(), max_ff(), min_ii(), CurveMaskCache::sampled_curve, x, and y.
Referenced by paint_curve_mask_cache_update().
Definition at line 538 of file sculpt_transform.cc.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_use_locked_size(), BKE_paint_brush_for_read(), BKE_sculpt_update_object_for_edit(), C, copy_v3_v3(), copy_v4_v4(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_tool_settings(), depsgraph, ED_view3d_viewcontext_init(), flush_update_step(), SculptSession::init_pivot_pos, Sculpt::paint, paint_calc_object_space_radius(), SculptSession::pivot_pos, SculptSession::pivot_rot, SculptSession::pivot_scale, Position, SculptSession::prev_pivot_pos, SculptSession::prev_pivot_rot, SculptSession::prev_pivot_scale, Object::sculpt, ToolSettings::sculpt, sculpt_transform_all_vertices(), SCULPT_TRANSFORM_MODE_ALL_VERTICES, SCULPT_TRANSFORM_MODE_RADIUS_ELASTIC, Sculpt::transform_mode, transform_radius_elastic(), and vert_random_access_ensure().
Referenced by blender::ed::transform::recalcData_sculpt().
|
static |
Definition at line 110 of file paint_image_2d_curve_mask.cc.
References BKE_brush_curve_strength_clamped(), CurveMapping::changed_timestamp, Brush::curve, CurveSamplesBaseLen, CurveSamplesLen, i, CurveMaskCache::last_curve_timestamp, len, MEM_malloc_arrayN(), and CurveMaskCache::sampled_curve.
Referenced by paint_curve_mask_cache_update().
|
static |
Definition at line 2550 of file sculpt.cc.
References BKE_paint_brush_for_read(), BRUSH_ANCHORED, BRUSH_ORIGINAL_NORMAL, SculptSession::cache, calc_sculpt_normal(), copy_v3_v3(), depsgraph, Brush::falloff_shape, Brush::flag, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, mul_m4_v3(), blender::ed::sculpt_paint::brushes::CursorSampleResult::node_mask, blender::ed::sculpt_paint::StrokeCache::normal_weight, normalize_v3(), Sculpt::paint, PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_normal, project_plane_v3_v3v3(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_SNAKE_HOOK, SCULPT_BRUSH_TYPE_THUMB, blender::ed::sculpt_paint::StrokeCache::sculpt_normal, blender::ed::sculpt_paint::StrokeCache::sculpt_normal_symm, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, symmetry_flip(), and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by do_brush_action().
|
static |
Detects whether the brush should be in Add or Subtract mode.
Definition at line 799 of file curves_sculpt_density.cc.
References BKE_brush_size_get(), BKE_object_get_evaluated_mesh(), BKE_paint_brush_for_read(), BRUSH_CURVES_SCULPT_DENSITY_MODE_ADD, BRUSH_CURVES_SCULPT_DENSITY_MODE_REMOVE, BRUSH_STROKE_INVERT, C, CTX_data_active_object(), CTX_data_depsgraph_on_load(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), ToolSettings::curves_sculpt, Brush::curves_sculpt_settings, Object::data, DEG_get_evaluated(), BrushCurvesSculptSettings::density_mode, depsgraph, Curves::geometry, blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::ed::sculpt_paint::StrokeExtension::mouse_position, CurvesSculpt::paint, blender::threading::parallel_for(), pow2f(), sample_curves_surface_3d_brush(), Curves::surface, Scene::toolsettings, and use_add_density_mode().
Referenced by new_density_operation(), and use_add_density_mode().
| Span< BMVert * > blender::ed::sculpt_paint::vert_neighbors_get_bmesh | ( | BMVert & | vert, |
| BMeshNeighborVerts & | r_neighbors ) |
Definition at line 388 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BM_ITER_ELEM, BM_LOOPS_OF_VERT, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), and l.
Referenced by blender::ed::sculpt_paint::smooth::average_data_bmesh(), blender::ed::sculpt_paint::mask::average_neighbor_mask_bmesh(), blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::cloth::calc_vert_neighbor_indices_bmesh(), calc_vert_neighbors(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_sample_from_surface(), blender::ed::sculpt_paint::boundary::edit_data_init_bmesh(), blender::ed::sculpt_paint::flood_fill::FillDataBMesh::execute(), blender::ed::sculpt_paint::pose::grow_factors_bmesh(), blender::ed::sculpt_paint::mask::grow_mask_bmesh(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_bmesh(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_bmesh(), blender::ed::sculpt_paint::smooth::neighbor_position_average_bmesh(), and blender::ed::sculpt_paint::mask::shrink_mask_bmesh().
| Span< BMVert * > blender::ed::sculpt_paint::vert_neighbors_get_interior_bmesh | ( | BMVert & | vert, |
| BMeshNeighborVerts & | r_neighbors ) |
Definition at line 403 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BM_ITER_ELEM, BM_LOOPS_OF_VERT, BM_vert_is_boundary(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), l, blender::Vector< T, InlineBufferCapacity, Allocator >::remove_if(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by calc_vert_neighbors_interior(), and blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_bmesh_impl().
| Span< int > blender::ed::sculpt_paint::vert_neighbors_get_mesh | ( | const OffsetIndices< int > | faces, |
| const Span< int > | corner_verts, | ||
| const GroupedSpan< int > | vert_to_face, | ||
| const Span< bool > | hide_poly, | ||
| const int | vert, | ||
| Vector< int > & | r_neighbors ) |
Definition at line 430 of file sculpt.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_non_duplicates(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::bke::mesh::face_find_adjacent_verts(), faces, blender::Span< T >::is_empty(), and verts.
Referenced by blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_faces(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::boundary::edit_data_init_mesh(), blender::ed::sculpt_paint::flood_fill::FillDataMesh::execute(), geometry_preview_lines_update(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_mesh(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_mesh(), and blender::ed::sculpt_paint::dyntopo::sample_detail_voxel().
| Span< float3float3 > blender::ed::sculpt_paint::vert_positions_for_grab_active_get | ( | const Depsgraph & | depsgraph, |
| const Object & | object ) |
Coordinates used for manipulating the base mesh when Grab Active Vertex is enabled.
Definition at line 170 of file sculpt.cc.
References BLI_assert, depsgraph, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), SculptSession::shapekey_active, and blender::bke::pbvh::vert_positions_eval().
Referenced by brush_delta_update(), paint_cursor_draw_3d_view_brush_cursor_inactive(), and sculpt_geometry_preview_lines_draw().
| void blender::ed::sculpt_paint::vert_random_access_ensure | ( | Object & | object | ) |
Ensure random access; required for blender::bke::pbvh::Type::BMesh
Definition at line 142 of file sculpt.cc.
References SculptSession::bm, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, blender::bke::pbvh::BMesh, and blender::bke::object::pbvh_get().
Referenced by blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::pose::calc_average_face_set_center(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), calc_smooth_translations(), blender::ed::sculpt_paint::islands::calc_topology_islands_bmesh(), blender::ed::sculpt_paint::face_set::change_visibility_invoke(), cursor_geometry_info_update(), blender::ed::sculpt_paint::boundary::data_init_bmesh(), blender::ed::sculpt_paint::brushes::do_smooth_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::mask::duplicate_mask(), blender::ed::sculpt_paint::hide::duplicate_visibility_bmesh(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::expand::ensure_sculptsession_data(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), init_transform(), blender::ed::sculpt_paint::trim::initialize_cursor_info(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_sculpt_session_update_and_init(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_apply(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), stroke_get_location_bvh_ex(), update_modal_transform(), vertex_is_occluded(), and blender::ed::sculpt_paint::expand::write_mask_data().
| bool blender::ed::sculpt_paint::vertex_is_occluded | ( | const Depsgraph & | depsgraph, |
| const Object & | object, | ||
| const float3float3 & | position, | ||
| bool | original ) |
Definition at line 6112 of file sculpt.cc.
References SculptSession::cache, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, depsgraph, blender::ed::sculpt_paint::RaycastData::depth, ED_view3d_project_float_v2_m4(), blender::ed::sculpt_paint::RaycastData::faces, SculptSession::filter_cache, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::RaycastData::object, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::StrokeCache::projection_mat, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), ViewContext::region, sculpt_raycast_cb(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), blender::ed::sculpt_paint::RaycastData::use_original, blender::ed::sculpt_paint::filter::Cache::vc, blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), vertex_is_occluded(), and blender::ed::sculpt_paint::filter::Cache::viewmat.
Referenced by blender::ed::sculpt_paint::auto_mask::calc_view_occlusion_factor(), and vertex_is_occluded().
|
static |
Definition at line 441 of file brush_asset_ops.cc.
References BKE_paint_get_active_from_context(), C, CTX_data_main(), blender::ed::asset::find_asset_from_weak_ref(), blender::asset_system::AssetLibrary::library_reference(), and blender::ed::asset::visit_library_catalogs_catalog_for_search().
Referenced by BRUSH_OT_asset_edit_metadata().
|
static |
Definition at line 332 of file brush_asset_ops.cc.
References C, CTX_data_main(), blender::ed::asset::get_asset_library_ref_from_opptr(), ptr, and blender::ed::asset::visit_library_catalogs_catalog_for_search().
Referenced by BRUSH_OT_asset_save_as().
|
constexpr |
Definition at line 22 of file paint_image_2d_curve_mask.cc.
Referenced by aa_samples_per_texel_axis().
|
constexpr |
Definition at line 21 of file paint_image_2d_curve_mask.cc.
Referenced by aa_samples_per_texel_axis().
|
constexpr |
Number of samples to use between 0..1.
Definition at line 26 of file paint_image_2d_curve_mask.cc.
Referenced by update_curve_mask(), and update_sampled_curve().
|
constexpr |
Number of samples to store in the cache.
M_SQRT2 is used as brushes are circles and the curve_mask is square.
Definition at line 33 of file paint_image_2d_curve_mask.cc.
Referenced by update_curve_mask(), and update_sampled_curve().
|
staticconstexpr |
Definition at line 150 of file sculpt_intern.hh.
Referenced by calc_stabilized_plane().
|
static |
Definition at line 609 of file sculpt_transform.cc.
Referenced by SCULPT_OT_set_pivot_position().
|
staticconstexpr |
Definition at line 154 of file sculpt_transform.cc.
Referenced by filter_translations_with_symmetry().