|
Blender
V2.93
|
#include "DNA_brush_types.h"#include "DNA_key_types.h"#include "DNA_listBase.h"#include "DNA_meshdata_types.h"#include "DNA_vec_types.h"#include "BLI_bitmap.h"#include "BLI_gsqueue.h"#include "BLI_threads.h"#include "BKE_paint.h"#include "BKE_pbvh.h"Go to the source code of this file.
Classes | |
| struct | SculptCursorGeometryInfo |
| struct | SculptVertexNeighborIter |
| struct | SculptOrigVertData |
| struct | SculptFloodFill |
| struct | SculptUndoNodeGeometry |
| struct | SculptUndoNode |
| struct | SculptRakeData |
| struct | SculptThreadedTaskData |
| struct | SculptBrushTest |
| struct | SculptSearchSphereData |
| struct | SculptSearchCircleData |
| struct | AutomaskingSettings |
| struct | AutomaskingCache |
| struct | StrokeCache |
| struct | ExpandCache |
| struct | FilterCache |
Macros | |
| #define | SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY 256 |
| #define | SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN(ss, v_index, neighbor_iterator) |
| #define | SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN(ss, v_index, neighbor_iterator) |
| #define | SCULPT_VERTEX_NEIGHBORS_ITER_END(neighbor_iterator) |
| #define | FAKE_NEIGHBOR_NONE -1 |
| #define | SCULPT_RAKE_BRUSH_FACTOR 0.25f |
| #define | SCULPT_CLAY_STABILIZER_LEN 10 |
| #define | EXPAND_SYMM_AREAS 8 |
| #define EXPAND_SYMM_AREAS 8 |
Definition at line 1114 of file sculpt_intern.h.
| #define FAKE_NEIGHBOR_NONE -1 |
Definition at line 178 of file sculpt_intern.h.
| #define SCULPT_CLAY_STABILIZER_LEN 10 |
Definition at line 894 of file sculpt_intern.h.
| #define SCULPT_RAKE_BRUSH_FACTOR 0.25f |
Definition at line 680 of file sculpt_intern.h.
| #define SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN | ( | ss, | |
| v_index, | |||
| neighbor_iterator | |||
| ) |
Definition at line 153 of file sculpt_intern.h.
| #define SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY 256 |
Definition at line 122 of file sculpt_intern.h.
| #define SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN | ( | ss, | |
| v_index, | |||
| neighbor_iterator | |||
| ) |
Definition at line 145 of file sculpt_intern.h.
| #define SCULPT_VERTEX_NEIGHBORS_ITER_END | ( | neighbor_iterator | ) |
Definition at line 161 of file sculpt_intern.h.
| typedef struct AutomaskingCache AutomaskingCache |
| typedef struct AutomaskingSettings AutomaskingSettings |
| typedef enum eBoundaryAutomaskMode eBoundaryAutomaskMode |
| typedef enum eSculptExpandFalloffType eSculptExpandFalloffType |
| typedef enum eSculptExpandRecursionType eSculptExpandRecursionType |
| typedef enum eSculptExpandTargetType eSculptExpandTargetType |
| typedef struct ExpandCache ExpandCache |
| typedef struct FilterCache FilterCache |
| typedef struct SculptBrushTest SculptBrushTest |
| typedef bool(* SculptBrushTestFn) (SculptBrushTest *test, const float co[3]) |
Definition at line 823 of file sculpt_intern.h.
| typedef struct SculptCursorGeometryInfo SculptCursorGeometryInfo |
| typedef enum SculptFilterOrientation SculptFilterOrientation |
| typedef struct SculptThreadedTaskData SculptThreadedTaskData |
| typedef struct SculptUndoNode SculptUndoNode |
| typedef struct SculptUndoNodeGeometry SculptUndoNodeGeometry |
| typedef enum SculptUpdateType SculptUpdateType |
| typedef struct SculptVertexNeighborIter SculptVertexNeighborIter |
| typedef struct StrokeCache StrokeCache |
| Enumerator | |
|---|---|
| AUTOMASK_INIT_BOUNDARY_EDGES | |
| AUTOMASK_INIT_BOUNDARY_FACE_SETS | |
Definition at line 358 of file sculpt_intern.h.
| enum eDynTopoWarnFlag |
| Enumerator | |
|---|---|
| DYNTOPO_WARN_VDATA | |
| DYNTOPO_WARN_EDATA | |
| DYNTOPO_WARN_LDATA | |
| DYNTOPO_WARN_MODIFIER | |
Definition at line 315 of file sculpt_intern.h.
Definition at line 1092 of file sculpt_intern.h.
| Enumerator | |
|---|---|
| SCULPT_EXPAND_RECURSION_TOPOLOGY | |
| SCULPT_EXPAND_RECURSION_GEODESICS | |
Definition at line 1109 of file sculpt_intern.h.
| Enumerator | |
|---|---|
| SCULPT_EXPAND_TARGET_MASK | |
| SCULPT_EXPAND_TARGET_FACE_SETS | |
| SCULPT_EXPAND_TARGET_COLORS | |
Definition at line 1103 of file sculpt_intern.h.
| Enumerator | |
|---|---|
| SCULPT_FILTER_ORIENTATION_LOCAL | |
| SCULPT_FILTER_ORIENTATION_WORLD | |
| SCULPT_FILTER_ORIENTATION_VIEW | |
Definition at line 1073 of file sculpt_intern.h.
| Enumerator | |
|---|---|
| SCULPT_TRANSFORM_DISPLACEMENT_ORIGINAL | |
| SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL | |
Definition at line 1080 of file sculpt_intern.h.
| enum SculptUndoType |
Definition at line 592 of file sculpt_intern.h.
| enum SculptUpdateType |
| Enumerator | |
|---|---|
| SCULPT_UPDATE_COORDS | |
| SCULPT_UPDATE_MASK | |
| SCULPT_UPDATE_VISIBILITY | |
| SCULPT_UPDATE_COLOR | |
Definition at line 57 of file sculpt_intern.h.
| int SCULPT_active_face_set_get | ( | SculptSession * | ss | ) |
Definition at line 331 of file sculpt.c.
References SculptSession::active_face_index, SculptSession::active_grid_index, BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SCULPT_FACE_SET_NONE, and SculptSession::subdiv_ccg.
Referenced by do_brush_action(), ED_sculpt_face_sets_active_update_and_get(), pose_ik_chain_init_face_sets_fk(), SCULPT_automasking_cache_settings_update(), sculpt_cloth_filter_invoke(), sculpt_expand_set_initial_components_for_mouse(), sculpt_face_set_edit_invoke(), sculpt_face_sets_automasking_init(), and sculpt_face_sets_change_visibility_exec().
| const float* SCULPT_active_vertex_co_get | ( | SculptSession * | ss | ) |
Definition at line 285 of file sculpt.c.
References SCULPT_active_vertex_get(), and SCULPT_vertex_co_get().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive(), pose_ik_chain_init_face_sets(), sample_detail_voxel(), sculpt_cloth_filter_invoke(), SCULPT_cursor_geometry_info_update(), SCULPT_do_boundary_brush(), sculpt_face_sets_change_visibility_exec(), SCULPT_floodfill_add_active(), SCULPT_geometry_preview_lines_update(), sculpt_mask_expand_invoke(), sculpt_set_pivot_position_exec(), and SCULPT_topology_automasking_init().
| int SCULPT_active_vertex_get | ( | SculptSession * | ss | ) |
Definition at line 277 of file sculpt.c.
References SculptSession::active_vertex_index, BKE_pbvh_type(), ELEM, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, and PBVH_GRIDS.
Referenced by dyntopo_detail_size_sample_from_surface(), paint_cursor_draw_3d_view_brush_cursor_inactive(), pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sample_detail_voxel(), SCULPT_active_vertex_co_get(), SCULPT_active_vertex_normal_get(), SCULPT_do_boundary_brush(), sculpt_expand_set_initial_components_for_mouse(), sculpt_expand_target_vertex_update_and_get(), sculpt_expand_task_cb(), SCULPT_floodfill_add_active(), SCULPT_geometry_preview_lines_update(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), sculpt_sample_color_invoke(), and sculpt_update_brush_delta().
| void SCULPT_active_vertex_normal_get | ( | SculptSession * | ss, |
| float | normal[3] | ||
| ) |
Definition at line 290 of file sculpt.c.
References normal, SCULPT_active_vertex_get(), and SCULPT_vertex_normal_get().
Referenced by sculpt_mask_expand_invoke().
| struct AutomaskingCache* SCULPT_automasking_active_cache_get | ( | SculptSession * | ss | ) |
Definition at line 65 of file sculpt_automasking.c.
References StrokeCache::automasking, FilterCache::automasking, SculptSession::cache, SculptSession::filter_cache, and NULL.
Referenced by cloth_brush_satisfy_constraints(), and do_cloth_brush_solve_simulation_task_cb_ex().
| void SCULPT_automasking_cache_free | ( | struct AutomaskingCache * | automasking | ) |
Definition at line 163 of file sculpt_automasking.c.
References AutomaskingCache::factor, and MEM_SAFE_FREE.
Referenced by SCULPT_filter_cache_free(), and sculpt_stroke_done().
| struct AutomaskingCache* SCULPT_automasking_cache_init | ( | Sculpt * | sd, |
| Brush * | brush, | ||
| Object * | ob | ||
| ) |
Definition at line 336 of file sculpt_automasking.c.
References AUTOMASK_INIT_BOUNDARY_EDGES, AUTOMASK_INIT_BOUNDARY_FACE_SETS, Brush::automasking_boundary_edges_propagation_steps, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, AutomaskingCache::factor, MEM_callocN, MEM_malloc_arrayN, NULL, Object::sculpt, SCULPT_automasking_cache_settings_update(), SCULPT_automasking_needs_factors_cache(), SCULPT_boundary_automasking_init(), SCULPT_boundary_info_ensure(), sculpt_face_sets_automasking_init(), SCULPT_is_automasking_enabled(), SCULPT_is_automasking_mode_enabled(), SCULPT_topology_automasking_init(), SCULPT_vertex_count_get(), and SCULPT_vertex_random_access_ensure().
Referenced by do_brush_action(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), and sculpt_mesh_filter_invoke().
| float SCULPT_automasking_factor_get | ( | struct AutomaskingCache * | automasking, |
| SculptSession * | ss, | ||
| int | vert | ||
| ) |
Definition at line 130 of file sculpt_automasking.c.
References BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_FACE_SETS, AutomaskingCache::factor, AutomaskingSettings::flags, AutomaskingSettings::initial_face_set, SCULPT_vertex_has_face_set(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), and AutomaskingCache::settings.
Referenced by cloth_brush_satisfy_constraints(), cloth_filter_apply_forces_task_cb(), color_filter_task_cb(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_cloth_brush_solve_simulation_task_cb_ex(), do_elastic_deform_brush_task_cb_ex(), do_pose_brush_task_cb_ex(), do_snake_hook_brush_task_cb_ex(), mesh_filter_surface_smooth_displace_task_cb(), mesh_filter_task_cb(), and SCULPT_brush_strength_factor().
Definition at line 107 of file sculpt_smooth.c.
References add_v3_v3(), BM_edge_is_boundary(), BM_EDGES_OF_VERT, BM_ITER_ELEM, BMVert::co, copy_v3_v3(), dot_v3v3(), e, madd_v3_v3fl(), mul_v3_v3fl(), BMVert::no, normalize_v3(), sub_v3_v3(), sub_v3_v3v3(), v, and zero_v3().
Referenced by do_topology_rake_bmesh_task_cb_ex().
| float* SCULPT_boundary_automasking_init | ( | Object * | ob, |
| eBoundaryAutomaskMode | mode, | ||
| int | propagation_steps, | ||
| float * | automask_factor | ||
| ) |
Definition at line 268 of file sculpt_automasking.c.
References AUTOMASK_INIT_BOUNDARY_EDGES, AUTOMASK_INIT_BOUNDARY_FACE_SETS, BLI_assert, EDGE_DISTANCE_INF, float(), SculptVertexNeighborIter::index, MEM_callocN, MEM_SAFE_FREE, NULL, SculptSession::pmap, pow2f(), Object::sculpt, SCULPT_vertex_count_get(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, and SCULPT_VERTEX_NEIGHBORS_ITER_END.
Referenced by SCULPT_automasking_cache_init().
| void SCULPT_boundary_data_free | ( | struct SculptBoundary * | boundary | ) |
Definition at line 533 of file sculpt_boundary.c.
References SculptBoundary::bend, SculptBoundary::directions, SculptBoundary::distance, SculptBoundary::edges, SculptBoundary::edit_info, MEM_SAFE_FREE, SculptBoundary::pivot_positions, SculptBoundary::pivot_rotation_axis, SculptBoundary::slide, and SculptBoundary::vertices.
Referenced by paint_cursor_preview_boundary_data_update(), SCULPT_cache_free(), and sculpt_expand_boundary_topology_falloff_create().
| struct SculptBoundary* SCULPT_boundary_data_init | ( | Object * | object, |
| Brush * | brush, | ||
| const int | initial_vertex, | ||
| const float | radius | ||
| ) |
Definition at line 492 of file sculpt_boundary.c.
References Brush::boundary_falloff_type, Brush::boundary_offset, BOUNDARY_VERTEX_NONE, BRUSH_BOUNDARY_FALLOFF_CONSTANT, MEM_callocN, NULL, sculpt_boundary_edit_data_init(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_boundary_info_ensure(), sculpt_boundary_is_vertex_in_editable_boundary(), and SCULPT_vertex_random_access_ensure().
Referenced by paint_cursor_preview_boundary_data_update(), SCULPT_do_boundary_brush(), and sculpt_expand_boundary_topology_falloff_create().
| void SCULPT_boundary_edges_preview_draw | ( | const uint | gpuattr, |
| struct SculptSession * | ss, | ||
| const float | outline_col[3], | ||
| const float | outline_alpha | ||
| ) |
Definition at line 1032 of file sculpt_boundary.c.
References SculptSession::boundary_preview, SculptBoundary::edges, GPU_line_width(), GPU_PRIM_LINES, immBegin(), immEnd(), immUniformColor3fvAlpha(), immVertex3fv(), SculptBoundary::num_edges, SCULPT_vertex_co_get(), SculptBoundaryPreviewEdge::v1, and SculptBoundaryPreviewEdge::v2.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
| void SCULPT_boundary_info_ensure | ( | Object * | object | ) |
Definition at line 9039 of file sculpt.c.
References BKE_mesh_from_object(), BLI_BITMAP_NEW, BLI_BITMAP_SET, SculptVertexInfo::boundary, e, MLoop::e, l, MPoly::loopstart, Mesh::medge, MEM_calloc_arrayN, MEM_freeN, Mesh::mloop, Mesh::mpoly, Mesh::totedge, MPoly::totloop, Mesh::totpoly, Mesh::totvert, MEdge::v1, MEdge::v2, and SculptSession::vertex_info.
Referenced by do_slide_relax_brush(), SCULPT_automasking_cache_init(), SCULPT_boundary_data_init(), SCULPT_do_draw_face_sets_brush(), SCULPT_enhance_details_brush(), sculpt_expand_ensure_sculptsession_data(), sculpt_face_set_edit_fair_face_set(), sculpt_mesh_filter_invoke(), and SCULPT_smooth().
| void SCULPT_boundary_pivot_line_preview_draw | ( | const uint | gpuattr, |
| struct SculptSession * | ss | ||
| ) |
Definition at line 1050 of file sculpt_boundary.c.
References SculptSession::boundary_preview, GPU_line_width(), GPU_PRIM_LINES, immBegin(), immEnd(), immUniformColor4f(), immVertex3fv(), SculptBoundary::initial_vertex, SculptBoundary::pivot_vertex, and SCULPT_vertex_co_get().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
| float* SCULPT_brush_deform_target_vertex_co_get | ( | SculptSession * | ss, |
| const int | deform_target, | ||
| PBVHVertexIter * | iter | ||
| ) |
Definition at line 310 of file sculpt.c.
References BRUSH_DEFORM_TARGET_CLOTH_SIM, BRUSH_DEFORM_TARGET_GEOMETRY, SculptSession::cache, StrokeCache::cloth_sim, PBVHVertexIter::co, SculptClothSimulation::deformation_pos, and PBVHVertexIter::index.
Referenced by do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), and do_pose_brush_task_cb_ex().
| const float* SCULPT_brush_frontface_normal_from_falloff_shape | ( | SculptSession * | ss, |
| char | falloff_shape | ||
| ) |
Definition at line 1787 of file sculpt.c.
References SculptSession::cache, PAINT_FALLOFF_SHAPE_SPHERE, StrokeCache::sculpt_normal_symm, and StrokeCache::view_normal.
Referenced by do_vpaint_brush_blur_task_cb_ex(), do_vpaint_brush_draw_task_cb_ex(), do_vpaint_brush_smear_task_cb_ex(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_calc_average_weight_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), and do_wpaint_brush_smear_task_cb_ex().
| float SCULPT_brush_plane_offset_get | ( | Sculpt * | sd, |
| SculptSession * | ss | ||
| ) |
Definition at line 4881 of file sculpt.c.
References BKE_paint_brush(), BRUSH_OFFSET_PRESSURE, SculptSession::cache, Brush::flag, Sculpt::paint, Brush::plane_offset, and StrokeCache::pressure.
Referenced by do_clay_brush(), do_clay_strips_brush(), do_clay_thumb_brush(), do_fill_brush(), do_flatten_brush(), do_scrape_brush(), and SCULPT_do_multiplane_scrape_brush().
| float SCULPT_brush_strength_factor | ( | struct SculptSession * | ss, |
| const struct Brush * | br, | ||
| const float | point[3], | ||
| const float | len, | ||
| const short | vno[3], | ||
| const float | fno[3], | ||
| const float | mask, | ||
| const int | vertex_index, | ||
| const int | thread_id | ||
| ) |
| bool SCULPT_brush_test_circle_sq | ( | SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1705 of file sculpt.c.
References closest_to_plane_normalized_v3(), SculptBrushTest::dist, len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::plane_view, SculptBrushTest::radius_squared, and sculpt_brush_test_clipping().
Referenced by SCULPT_brush_test_init_with_falloff_shape().
| bool SCULPT_brush_test_cube | ( | SculptBrushTest * | test, |
| const float | co[3], | ||
| const float | local[4][4], | ||
| const float | roundness | ||
| ) |
Definition at line 1723 of file sculpt.c.
References copy_v3_fl(), SculptBrushTest::dist, fabsf, len_v2v2(), M_SQRT1_2, max_ff(), min_ff(), mul_v3_m4v3(), and sculpt_brush_test_clipping().
Referenced by do_clay_strips_brush_task_cb_ex(), and do_paint_brush_task_cb_ex().
| void SCULPT_brush_test_init | ( | struct SculptSession * | ss, |
| SculptBrushTest * | test | ||
| ) |
Definition at line 1616 of file sculpt.c.
References SculptSession::cache, SculptBrushTest::clip_rv3d, copy_m4_m4(), copy_v3_v3(), SculptSession::cursor_location, SculptSession::cursor_radius, SculptBrushTest::dist, SculptBrushTest::location, StrokeCache::location, SculptBrushTest::mirror_symmetry_pass, StrokeCache::mirror_symmetry_pass, NULL, SculptBrushTest::plane_tool, SculptBrushTest::plane_view, SculptBrushTest::radial_symmetry_pass, StrokeCache::radial_symmetry_pass, SculptBrushTest::radius, SculptBrushTest::radius_squared, StrokeCache::radius_squared, SculptSession::rv3d, ViewContext::rv3d, RV3D_CLIPPING_ENABLED, sqrtf, SculptBrushTest::symm_rot_mat_inv, StrokeCache::symm_rot_mat_inv, unit_m4(), SculptSession::v3d, ViewContext::v3d, StrokeCache::vc, and zero_v4().
Referenced by do_clay_strips_brush_task_cb_ex(), and SCULPT_brush_test_init_with_falloff_shape().
| SculptBrushTestFn SCULPT_brush_test_init_with_falloff_shape | ( | SculptSession * | ss, |
| SculptBrushTest * | test, | ||
| char | falloff_shape | ||
| ) |
Definition at line 1770 of file sculpt.c.
References SculptSession::cache, SculptBrushTest::location, PAINT_FALLOFF_SHAPE_SPHERE, plane_from_point_normal_v3(), SculptBrushTest::plane_view, SCULPT_brush_test_circle_sq(), SCULPT_brush_test_init(), SCULPT_brush_test_sphere_sq(), and StrokeCache::view_normal.
Referenced by calc_area_normal_and_center_task_cb(), calc_clay_surface_task_cb(), calc_multiplane_scrape_surface_task_cb(), do_clay_brush_task_cb_ex(), do_clay_thumb_brush_task_cb_ex(), do_cloth_brush_apply_forces_task_cb_ex(), do_color_smooth_task_cb_exec(), do_crease_brush_task_cb_ex(), do_displacement_eraser_brush_task_cb_ex(), do_displacement_smear_brush_task_cb_ex(), do_draw_brush_task_cb_ex(), do_draw_face_sets_brush_task_cb_ex(), do_draw_sharp_brush_task_cb_ex(), do_enhance_details_brush_task_cb_ex(), do_fill_brush_task_cb_ex(), do_flatten_brush_task_cb_ex(), do_grab_brush_task_cb_ex(), do_gravity_task_cb_ex(), do_inflate_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_mask_brush_draw_task_cb_ex(), do_multiplane_scrape_brush_task_cb_ex(), do_nudge_brush_task_cb_ex(), do_paint_brush_task_cb_ex(), do_pinch_brush_task_cb_ex(), do_relax_face_sets_brush_task_cb_ex(), do_rotate_brush_task_cb_ex(), do_sample_wet_paint_task_cb(), do_scrape_brush_task_cb_ex(), do_smear_brush_task_cb_exec(), do_smooth_brush_task_cb_ex(), do_snake_hook_brush_task_cb_ex(), do_thumb_brush_task_cb_ex(), do_topology_rake_bmesh_task_cb_ex(), do_topology_relax_task_cb_ex(), do_topology_slide_task_cb_ex(), do_vpaint_brush_blur_task_cb_ex(), do_vpaint_brush_calc_average_color_cb_ex(), do_vpaint_brush_draw_task_cb_ex(), do_vpaint_brush_smear_task_cb_ex(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_calc_average_weight_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), do_wpaint_brush_smear_task_cb_ex(), SCULPT_do_surface_smooth_brush_displace_task_cb_ex(), and SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex().
| bool SCULPT_brush_test_sphere | ( | SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1667 of file sculpt.c.
References SculptBrushTest::dist, len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::radius_squared, sculpt_brush_test_clipping(), and sqrtf.
| bool SCULPT_brush_test_sphere_fast | ( | const SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1697 of file sculpt.c.
References len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::radius_squared, and sculpt_brush_test_clipping().
| bool SCULPT_brush_test_sphere_sq | ( | SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1683 of file sculpt.c.
References SculptBrushTest::dist, len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::radius_squared, and sculpt_brush_test_clipping().
Referenced by SCULPT_brush_test_init_with_falloff_shape().
| void SCULPT_cache_calc_brushdata_symm | ( | StrokeCache * | cache, |
| const char | symm, | ||
| const char | axis, | ||
| const float | angle | ||
| ) |
Flip all the edit-data across the axis/axes specified by symm. Used to calculate multiple modifications to the mesh when symmetry is enabled.
Definition at line 6397 of file sculpt.c.
References angle(), flip_qt_qt(), flip_v3_v3(), CCL_NAMESPACE_BEGIN::frac(), StrokeCache::grab_delta, StrokeCache::grab_delta_symmetry, StrokeCache::gravity_direction, StrokeCache::initial_location, StrokeCache::initial_normal, StrokeCache::is_rake_rotation_valid, StrokeCache::last_location, StrokeCache::location, mul_m4_v3(), mul_v3_fl(), Sculpt::paint, PAINT_SYMMETRY_FEATHER, StrokeCache::plane_offset, StrokeCache::rake_rotation, StrokeCache::rake_rotation_symmetry, rotate_m4(), StrokeCache::supports_gravity, StrokeCache::symm_rot_mat, StrokeCache::symm_rot_mat_inv, Paint::symmetry_flags, StrokeCache::true_gravity_direction, StrokeCache::true_initial_location, StrokeCache::true_initial_normal, StrokeCache::true_last_location, StrokeCache::true_location, StrokeCache::true_view_normal, unit_m4(), StrokeCache::view_normal, and zero_v3().
Referenced by do_radial_symmetry(), do_symmetrical_brush_actions(), vpaint_do_paint(), vpaint_do_symmetrical_brush_actions(), wpaint_do_paint(), and wpaint_do_symmetrical_brush_actions().
| void SCULPT_cache_free | ( | StrokeCache * | cache | ) |
Operator for applying a stroke (various attributes including mouse path) using the current brush.
Definition at line 6708 of file sculpt.c.
References StrokeCache::boundaries, StrokeCache::cloth_sim, StrokeCache::detail_directions, StrokeCache::dial, StrokeCache::layer_displacement_factor, StrokeCache::limit_surface_co, MEM_freeN, MEM_SAFE_FREE, PAINT_SYMM_AREAS, StrokeCache::pose_ik_chain, StrokeCache::prev_colors, StrokeCache::prev_displacement, SCULPT_boundary_data_free(), SCULPT_cloth_simulation_free(), SCULPT_pose_ik_chain_free(), and StrokeCache::surface_smooth_laplacian_disp.
Referenced by ed_vwpaintmode_enter_generic(), ed_vwpaintmode_exit_generic(), sculpt_brush_stroke_cancel(), sculpt_stroke_done(), vpaint_cancel(), vpaint_stroke_done(), wpaint_cancel(), and wpaint_stroke_done().
| void SCULPT_calc_area_normal | ( | Sculpt * | sd, |
| Object * | ob, | ||
| PBVHNode ** | nodes, | ||
| int | totnode, | ||
| float | r_area_no[3] | ||
| ) |
Definition at line 2197 of file sculpt.c.
References BKE_paint_brush(), Sculpt::paint, and SCULPT_pbvh_calc_area_normal().
Referenced by calc_sculpt_normal(), do_clay_strips_brush(), do_clay_thumb_brush(), SCULPT_do_multiplane_scrape_brush(), and SCULPT_do_paint_brush().
| void SCULPT_calc_brush_plane | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct PBVHNode ** | nodes, | ||
| int | totnode, | ||
| float | r_area_no[3], | ||
| float | r_area_co[3] | ||
| ) |
Definition at line 4228 of file sculpt.c.
References add_v3_v3(), ARRAY_SET_ITEMS, BKE_paint_brush(), BRUSH_ORIGINAL_NORMAL, BRUSH_ORIGINAL_PLANE, SculptSession::cache, calc_area_center(), calc_area_normal_and_center(), copy_v3_v3(), Brush::falloff_shape, Brush::flag, flip_v3(), StrokeCache::last_center, StrokeCache::mirror_symmetry_pass, mul_m4_v3(), normalize_v3(), Sculpt::paint, PAINT_FALLOFF_SHAPE_TUBE, StrokeCache::plane_offset, project_plane_v3_v3v3(), Object::sculpt, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, StrokeCache::sculpt_normal, Brush::sculpt_plane, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SCULPT_stroke_is_main_symmetry_pass(), StrokeCache::symm_rot_mat, StrokeCache::true_view_normal, StrokeCache::view_normal, and zero_v3().
Referenced by cloth_brush_apply_brush_foces(), do_clay_brush(), do_clay_strips_brush(), do_clay_thumb_brush(), do_fill_brush(), do_flatten_brush(), do_scrape_brush(), and SCULPT_do_multiplane_scrape_brush().
Definition at line 940 of file sculpt.c.
Referenced by do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), pose_brush_grow_factor_task_cb_ex(), pose_face_sets_floodfill_cb(), pose_topology_floodfill_cb(), sculpt_expand_reposition_pivot(), sculpt_mask_expand_modal(), and sculpt_set_pivot_position_exec().
| void SCULPT_clip | ( | Sculpt * | sd, |
| SculptSession * | ss, | ||
| float | co[3], | ||
| const float | val[3] | ||
| ) |
Handles clipping against a mirror modifier and SCULPT_LOCK_X/Y/Z axis flags.
Definition at line 2638 of file sculpt.c.
References SculptSession::cache, StrokeCache::clip_mirror_mtx, StrokeCache::clip_tolerance, CLIP_X, fabsf, StrokeCache::flag, Sculpt::flags, invert_m4_m4(), mul_m4_v3(), mul_v3_m4v3(), and SCULPT_LOCK_X.
Referenced by do_enhance_details_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_smooth_brush_task_cb_ex(), do_topology_rake_bmesh_task_cb_ex(), and sculpt_combine_proxies_task_cb().
| PBVHNode** SCULPT_cloth_brush_affected_nodes_gather | ( | SculptSession * | ss, |
| Brush * | brush, | ||
| int * | r_totnode | ||
| ) |
Definition at line 122 of file sculpt_cloth.c.
References BKE_pbvh_search_gather(), BLI_assert, BRUSH_CLOTH_SIMULATION_AREA_DYNAMIC, BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, BRUSH_CLOTH_SIMULATION_AREA_LOCAL, SculptSession::cache, Brush::cloth_sim_limit, Brush::cloth_simulation_area_type, data, StrokeCache::initial_location, StrokeCache::initial_radius, StrokeCache::location, NULL, SculptSession::pbvh, StrokeCache::radius, SCULPT_search_sphere_cb(), Brush::sculpt_tool, SCULPT_TOOL_CLOTH, and square_f().
Referenced by do_brush_action().
| void SCULPT_cloth_brush_do_simulation_step | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct SculptClothSimulation * | cloth_sim, | ||
| struct PBVHNode ** | nodes, | ||
| int | totnode | ||
| ) |
Definition at line 927 of file sculpt_cloth.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), cloth_brush_satisfy_constraints(), CLOTH_SIMULATION_TIME_STEP, do_cloth_brush_solve_simulation_task_cb_ex(), Sculpt::paint, Object::sculpt, and SculptThreadedTaskData::sd.
Referenced by do_brush_action(), sculpt_cloth_filter_modal(), and SCULPT_do_cloth_brush().
| void SCULPT_cloth_brush_ensure_nodes_constraints | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct PBVHNode ** | nodes, | ||
| int | totnode, | ||
| struct SculptClothSimulation * | cloth_sim, | ||
| float | initial_location[3], | ||
| const float | radius | ||
| ) |
Definition at line 1108 of file sculpt_cloth.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_edgeset_free(), BLI_edgeset_new(), BLI_task_parallel_range(), SculptClothSimulation::created_length_constraints, do_cloth_brush_build_constraints_task_cb_ex(), Sculpt::paint, and SculptThreadedTaskData::sd.
Referenced by do_brush_action(), sculpt_cloth_ensure_constraints_in_simulation_area(), and sculpt_cloth_filter_invoke().
| struct SculptClothSimulation* SCULPT_cloth_brush_simulation_create | ( | struct SculptSession * | ss, |
| const float | cloth_mass, | ||
| const float | cloth_damping, | ||
| const float | cloth_softbody_strength, | ||
| const bool | use_collisions, | ||
| const bool | needs_deform_coords | ||
| ) |
Definition at line 1056 of file sculpt_cloth.c.
References SculptClothSimulation::acceleration, SculptClothSimulation::capacity_length_constraints, cloth_brush_collider_cache_create(), CLOTH_LENGTH_CONSTRAINTS_BLOCK, cloth_sim_initialize_default_node_state(), SculptClothSimulation::collider_list, SculptClothSimulation::damping, SculptClothSimulation::deformation_pos, SculptClothSimulation::deformation_strength, SculptSession::depsgraph, SculptClothSimulation::init_pos, SculptClothSimulation::last_iteration_pos, SculptClothSimulation::length_constraint_tweak, SculptClothSimulation::length_constraints, SculptClothSimulation::mass, MEM_calloc_arrayN, MEM_callocN, SculptClothSimulation::pos, SculptClothSimulation::prev_pos, SCULPT_vertex_count_get(), SculptClothSimulation::softbody_pos, and SculptClothSimulation::softbody_strength.
Referenced by do_brush_action(), sculpt_cloth_filter_invoke(), and SCULPT_do_cloth_brush().
| void SCULPT_cloth_brush_simulation_init | ( | struct SculptSession * | ss, |
| struct SculptClothSimulation * | cloth_sim | ||
| ) |
Definition at line 1145 of file sculpt_cloth.c.
References copy_v3_v3(), SculptClothSimulation::deformation_pos, SculptClothSimulation::deformation_strength, SculptClothSimulation::init_pos, SculptClothSimulation::last_iteration_pos, NULL, SculptClothSimulation::prev_pos, SCULPT_vertex_co_get(), SCULPT_vertex_count_get(), and SculptClothSimulation::softbody_pos.
Referenced by do_brush_action(), sculpt_cloth_filter_invoke(), and SCULPT_do_cloth_brush().
| void SCULPT_cloth_brush_store_simulation_state | ( | struct SculptSession * | ss, |
| struct SculptClothSimulation * | cloth_sim | ||
| ) |
Definition at line 1164 of file sculpt_cloth.c.
References copy_v3_v3(), SculptClothSimulation::pos, SCULPT_vertex_co_get(), and SCULPT_vertex_count_get().
Referenced by do_brush_action(), and SCULPT_do_cloth_brush().
| void SCULPT_cloth_plane_falloff_preview_draw | ( | const uint | gpuattr, |
| struct SculptSession * | ss, | ||
| const float | outline_col[3], | ||
| float | outline_alpha | ||
| ) |
Definition at line 1304 of file sculpt_cloth.c.
References add_v3_v3v3(), StrokeCache::brush, BRUSH_CLOTH_DEFORM_GRAB, SculptSession::cache, Brush::cloth_deform_type, copy_m4_m4(), GPU_line_width(), GPU_matrix_mul, GPU_PRIM_LINES, GPU_PRIM_TRIS, StrokeCache::grab_delta, immBegin(), immEnd(), immUniformColor3fvAlpha(), immVertex3f(), StrokeCache::radius, StrokeCache::stroke_local_mat, and StrokeCache::true_location.
Referenced by paint_cursor_cursor_draw_3d_view_brush_cursor_active().
| void SCULPT_cloth_sim_activate_nodes | ( | struct SculptClothSimulation * | cloth_sim, |
| PBVHNode ** | nodes, | ||
| int | totnode | ||
| ) |
Definition at line 1172 of file sculpt_cloth.c.
References BLI_ghash_lookup(), SculptClothSimulation::node_state, SculptClothSimulation::node_state_index, POINTER_AS_INT, and SCULPT_CLOTH_NODE_ACTIVE.
Referenced by do_brush_action(), sculpt_cloth_filter_modal(), and SCULPT_do_cloth_brush().
| void SCULPT_cloth_simulation_free | ( | struct SculptClothSimulation * | cloth_sim | ) |
Definition at line 1254 of file sculpt_cloth.c.
References SculptClothSimulation::acceleration, BKE_collider_cache_free(), BLI_ghash_free(), SculptClothSimulation::collider_list, SculptClothSimulation::deformation_pos, SculptClothSimulation::deformation_strength, SculptClothSimulation::init_pos, SculptClothSimulation::last_iteration_pos, SculptClothSimulation::length_constraint_tweak, SculptClothSimulation::length_constraints, MEM_SAFE_FREE, SculptClothSimulation::node_state, SculptClothSimulation::node_state_index, NULL, SculptClothSimulation::pos, SculptClothSimulation::prev_pos, and SculptClothSimulation::softbody_pos.
Referenced by SCULPT_cache_free(), and SCULPT_filter_cache_free().
| void SCULPT_cloth_simulation_limits_draw | ( | const uint | gpuattr, |
| const struct Brush * | brush, | ||
| const float | location[3], | ||
| const float | normal[3], | ||
| const float | rds, | ||
| const float | line_width, | ||
| const float | outline_col[3], | ||
| const float | alpha | ||
| ) |
| void SCULPT_connected_components_ensure | ( | Object * | ob | ) |
Definition at line 9007 of file sculpt.c.
References SculptVertexInfo::connected_component, data, MEM_malloc_arrayN, Object::sculpt, SCULPT_connected_components_floodfill_cb(), SCULPT_floodfill_add_initial(), SCULPT_floodfill_execute(), SCULPT_floodfill_free(), SCULPT_floodfill_init(), SCULPT_TOPOLOGY_ID_NONE, SCULPT_vertex_count_get(), and SculptSession::vertex_info.
Referenced by sculpt_expand_ensure_sculptsession_data(), SCULPT_fake_neighbors_ensure(), and sculpt_mask_init_exec().
| bool SCULPT_cursor_geometry_info_update | ( | bContext * | C, |
| SculptCursorGeometryInfo * | out, | ||
| const float | mouse[2], | ||
| bool | use_sampled_normal | ||
| ) |
Definition at line 7452 of file sculpt.c.
References SculptRaycastData::active_face_grid_index, SculptSession::active_face_index, SculptSession::active_grid_index, SculptCursorGeometryInfo::active_vertex_co, SculptSession::active_vertex_index, SculptRaycastData::active_vertex_index, add_v3_v3(), BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_use_locked_size(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_pbvh_raycast(), BKE_pbvh_type(), C, copy_m3_m4(), copy_v3_v3(), CTX_data_depsgraph_pointer(), CTX_data_scene(), SculptSession::cursor_location, SculptSession::cursor_normal, SculptSession::cursor_radius, SculptSession::cursor_sampled_normal, SculptSession::cursor_view_normal, depsgraph, SculptRaycastData::depth, ED_view3d_viewcontext_init(), SculptRaycastData::face_normal, SculptRaycastData::hit, Object::imat, invert_m4_m4(), SculptRaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), SculptCursorGeometryInfo::location, MEM_SAFE_FREE, mul_m3_v3(), mul_v3_fl(), SculptCursorGeometryInfo::normal, normalize_v3_v3(), ViewContext::obact, Object::obmat, SculptRaycastData::original, paint_calc_object_space_radius(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::rv3d, ViewContext::rv3d, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_active_vertex_co_get(), SCULPT_pbvh_calc_area_normal(), sculpt_pbvh_gather_cursor_update(), sculpt_raycast_cb(), SCULPT_raycast_init(), SCULPT_stroke_modifiers_check(), SCULPT_vertex_random_access_ensure(), Scene::toolsettings, SculptSession::v3d, ViewContext::v3d, RegionView3D::viewinv, and zero_v3().
Referenced by ED_sculpt_face_sets_active_update_and_get(), paint_cursor_sculpt_session_update_and_init(), sample_detail_voxel(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), sculpt_expand_target_vertex_update_and_get(), sculpt_face_set_edit_invoke(), sculpt_face_sets_change_visibility_invoke(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), sculpt_mesh_filter_invoke(), sculpt_trim_gesture_box_invoke(), and sculpt_trim_gesture_lasso_invoke().
| void SCULPT_do_boundary_brush | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct PBVHNode ** | nodes, | ||
| int | totnode | ||
| ) |
Definition at line 950 of file sculpt_boundary.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), StrokeCache::boundaries, Brush::boundary_deform_type, BRUSH_BOUNDARY_DEFORM_BEND, BRUSH_BOUNDARY_DEFORM_EXPAND, BRUSH_BOUNDARY_DEFORM_GRAB, BRUSH_BOUNDARY_DEFORM_INFLATE, BRUSH_BOUNDARY_DEFORM_SMOOTH, BRUSH_BOUNDARY_DEFORM_TWIST, SculptSession::cache, data, do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), flip_v3_v3(), StrokeCache::initial_radius, StrokeCache::mirror_symmetry_pass, Sculpt::paint, StrokeCache::radius_squared, Object::sculpt, SCULPT_active_vertex_co_get(), SCULPT_active_vertex_get(), sculpt_boundary_bend_data_init(), SCULPT_boundary_data_init(), sculpt_boundary_falloff_factor_init(), sculpt_boundary_slide_data_init(), sculpt_boundary_twist_data_init(), SCULPT_nearest_vertex_get(), and SCULPT_stroke_is_first_brush_step_of_symmetry_pass().
Referenced by do_brush_action().
| void SCULPT_do_cloth_brush | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct PBVHNode ** | nodes, | ||
| int | totnode | ||
| ) |
Definition at line 1199 of file sculpt_cloth.c.
References BKE_paint_brush(), BRUSH_CLOTH_SIMULATION_AREA_LOCAL, BRUSH_CLOTH_USE_COLLISION, SculptSession::cache, cloth_brush_apply_brush_foces(), Brush::cloth_constraint_softbody_strength, Brush::cloth_damping, Brush::cloth_mass, StrokeCache::cloth_sim, Brush::cloth_simulation_area_type, Brush::flag2, Sculpt::paint, Object::sculpt, SCULPT_cloth_brush_do_simulation_step(), SCULPT_cloth_brush_simulation_create(), SCULPT_cloth_brush_simulation_init(), SCULPT_cloth_brush_store_simulation_state(), sculpt_cloth_ensure_constraints_in_simulation_area(), SCULPT_cloth_sim_activate_nodes(), SCULPT_is_cloth_deform_brush(), SCULPT_stroke_is_first_brush_step(), and SCULPT_stroke_is_first_brush_step_of_symmetry_pass().
Referenced by do_brush_action().
Definition at line 242 of file sculpt_face_set.c.
References StrokeCache::alt_smooth, BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, Brush::curve, data, do_draw_face_sets_brush_task_cb_ex(), do_relax_face_sets_brush_task_cb_ex(), Sculpt::paint, Object::sculpt, and SCULPT_boundary_info_ensure().
Referenced by do_brush_action().
Definition at line 233 of file sculpt_multiplane_scrape.c.
References add_v3_v3(), angle_v3v3(), MultiplaneScrapeSampleData::area_cos, MultiplaneScrapeSampleData::area_count, MultiplaneScrapeSampleData::area_nos, BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), BRUSH_MULTIPLANE_SCRAPE_DYNAMIC, BRUSH_ORIGINAL_NORMAL, StrokeCache::bstrength, SculptSession::cache, calc_multiplane_scrape_surface_reduce(), calc_multiplane_scrape_surface_task_cb(), copy_m4_m4(), copy_v3_v3(), cross_v3_v3v3(), data, DEG2RADF, do_multiplane_scrape_brush_task_cb_ex(), dot_v3v3(), Brush::flag, Brush::flag2, TaskParallelSettings::func_reduce, StrokeCache::grab_delta_symmetry, interpf(), invert_m4(), invert_m4_m4(), is_zero_v3(), StrokeCache::location, mid_v3_v3v3(), StrokeCache::mirror_symmetry_pass, mul_v3_fl(), mul_v3_mat3_m4v3(), mul_v3_v3fl(), mul_v3_v3v3(), StrokeCache::multiplane_scrape_angle, Brush::multiplane_scrape_angle, normalize_m4(), normalize_v3(), NULL, Sculpt::paint, plane_from_point_normal_v3(), StrokeCache::pressure, RAD2DEGF, StrokeCache::radial_symmetry_pass, StrokeCache::radius, rotate_v3_v3v3fl(), StrokeCache::scale, Object::sculpt, SCULPT_brush_plane_offset_get(), SCULPT_calc_area_normal(), SCULPT_calc_brush_plane(), SCULPT_DISP_DIR_AREA, Brush::sculpt_plane, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SculptThreadedTaskData::sd, StrokeCache::stroke_local_mat, sub_v3_v3v3(), TaskParallelSettings::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by do_brush_action().
Definition at line 250 of file sculpt_paint_color.c.
References StrokeCache::alt_smooth, BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), blend_color_interpolate_float(), BLI_hash_int_01(), BLI_task_parallel_range(), SculptSession::cache, CLAMP4, SampleWetPaintTLSData::color, copy_v3_v3(), copy_v4_v4(), cross_v3_v3v3(), Brush::curve, data, StrokeCache::density_seed, do_color_smooth_task_cb_exec(), do_paint_brush_task_cb_ex(), do_sample_wet_paint_task_cb(), StrokeCache::first_time, TaskParallelSettings::func_reduce, StrokeCache::grab_delta_symmetry, invert_m4_m4(), is_finite_v4(), is_zero_m4(), StrokeCache::location, mul_m4_m4m4(), mul_v3_fl(), mul_v4_fl(), normalize_m4(), Sculpt::paint, StrokeCache::paint_brush, StrokeCache::radius, sample_wet_paint_reduce(), scale_m4_fl(), Object::sculpt, SCULPT_calc_area_normal(), SCULPT_stroke_is_first_brush_step(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SculptThreadedTaskData::sd, Brush::tip_roundness, Brush::tip_scale_x, SampleWetPaintTLSData::tot_samples, TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, SculptSession::vcol, StrokeCache::wet_mix, StrokeCache::wet_mix_prev_color, StrokeCache::wet_persistence, and zero_v4().
Referenced by do_brush_action().
| void SCULPT_do_pose_brush | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct PBVHNode ** | nodes, | ||
| int | totnode | ||
| ) |
Definition at line 1136 of file sculpt_pose.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), BRUSH_POSE_DEFORM_ROTATE_TWIST, BRUSH_POSE_DEFORM_SCALE_TRASLATE, BRUSH_POSE_DEFORM_SQUASH_STRETCH, SculptSession::cache, copy_qt_qt(), copy_v3_v3(), data, do_pose_brush_task_cb_ex(), SculptPoseIKChainSegment::initial_orig, invert_m4_m4(), StrokeCache::mirror_symmetry_pass, mul_m4_m4_post(), mul_v3_fl(), SculptPoseIKChainSegment::orig, StrokeCache::orig_grab_location, Sculpt::paint, PAINT_SYMM_AREAS, SculptPoseIKChainSegment::pivot_mat, SculptPoseIKChainSegment::pivot_mat_inv, Brush::pose_deform_type, StrokeCache::pose_ik_chain, quat_to_mat4(), SculptPoseIKChainSegment::rot, SculptPoseIKChainSegment::scale, Object::sculpt, SCULPT_flip_quat_by_symm_area(), SCULPT_flip_v3_by_symm_area(), SCULPT_mesh_symmetry_xyz_get(), sculpt_pose_align_pivot_local_space(), sculpt_pose_do_rotate_twist_deform(), sculpt_pose_do_scale_translate_deform(), sculpt_pose_do_squash_stretch_deform(), SculptPoseIKChain::segments, SculptPoseIKChain::tot_segments, SculptPoseIKChainSegment::trans_mat, translate_m4(), and unit_m4().
Referenced by do_brush_action().
Definition at line 459 of file sculpt_paint_color.c.
References StrokeCache::alt_smooth, BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, copy_v4_v4(), Brush::curve, data, do_color_smooth_task_cb_exec(), do_smear_brush_task_cb_exec(), do_smear_store_prev_colors_task_cb_exec(), MEM_callocN, Sculpt::paint, StrokeCache::prev_colors, Object::sculpt, SCULPT_stroke_is_first_brush_step(), SCULPT_vertex_color_get(), SCULPT_vertex_count_get(), and SculptSession::vcol.
Referenced by do_brush_action().
Definition at line 395 of file sculpt_smooth.c.
References StrokeCache::bstrength, SculptSession::cache, Object::sculpt, SCULPT_enhance_details_brush(), and SCULPT_smooth().
Referenced by do_brush_action().
Definition at line 540 of file sculpt_smooth.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, Sculpt::paint, SCULPT_do_surface_smooth_brush_displace_task_cb_ex(), SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex(), and Brush::surface_smooth_iterations.
Referenced by do_brush_action().
| enum eDynTopoWarnFlag SCULPT_dynamic_topology_check | ( | Scene * | scene, |
| Object * | ob | ||
| ) |
Definition at line 347 of file sculpt_dyntopo.c.
Referenced by ED_object_sculptmode_enter_ex(), and sculpt_dynamic_topology_toggle_invoke().
| void SCULPT_dynamic_topology_disable | ( | bContext * | C, |
| struct SculptUndoNode * | unode | ||
| ) |
Definition at line 275 of file sculpt_dyntopo.c.
References C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), depsgraph, scene, and SCULPT_dynamic_topology_disable_ex().
Referenced by sculpt_undo_bmesh_restore_begin(), and sculpt_undo_bmesh_restore_end().
| void sculpt_dynamic_topology_disable_with_undo | ( | struct Main * | bmain, |
| struct Depsgraph * | depsgraph, | ||
| Scene * | scene, | ||
| Object * | ob | ||
| ) |
Definition at line 284 of file sculpt_dyntopo.c.
References SculptSession::bm, depsgraph, ED_undo_stack_get(), G, NULL, scene, Object::sculpt, SCULPT_dynamic_topology_disable_ex(), SCULPT_UNDO_DYNTOPO_END, SCULPT_undo_push_begin(), SCULPT_undo_push_end(), and SCULPT_undo_push_node().
Referenced by ED_object_sculptmode_exit_ex(), and sculpt_dynamic_topology_toggle_exec().
| void SCULPT_dynamic_topology_enable_ex | ( | struct Main * | bmain, |
| struct Depsgraph * | depsgraph, | ||
| Scene * | scene, | ||
| Object * | ob | ||
| ) |
Definition at line 148 of file sculpt_dyntopo.c.
References BKE_mesh_mselect_clear(), BKE_scene_graph_update_tagged(), SculptSession::bm, BM_data_layer_add(), SculptSession::bm_log, BM_log_create(), BM_mesh_bm_from_me(), BM_mesh_create(), BM_mesh_normals_update(), SculptSession::bm_smooth_shading, BMALLOC_TEMPLATE_FROM_ME, CD_PAINT_MASK, Object::data, DEG_id_tag_update(), depsgraph, Mesh::flag, Sculpt::flags, Object::id, ID_RECALC_GEOMETRY, ME_SCULPT_DYNAMIC_TOPOLOGY, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_dynamic_topology_triangulate(), SCULPT_dyntopo_node_layers_add(), SCULPT_DYNTOPO_SMOOTH_SHADING, SCULPT_pbvh_clear(), Scene::toolsettings, BMesh::totface, Mesh::totpoly, and BMesh::vdata.
Referenced by ED_object_sculptmode_enter_ex(), and sculpt_dynamic_topology_enable_with_undo().
| void SCULPT_dynamic_topology_triangulate | ( | struct BMesh * | bm | ) |
Definition at line 79 of file sculpt_dyntopo.c.
References bm, BM_mesh_triangulate(), MOD_TRIANGULATE_NGON_EARCLIP, MOD_TRIANGULATE_QUAD_BEAUTY, NULL, BMesh::totface, and BMesh::totloop.
Referenced by SCULPT_dynamic_topology_enable_ex(), and sculpt_symmetrize_exec().
| void SCULPT_dyntopo_node_layers_add | ( | struct SculptSession * | ss | ) |
Definition at line 113 of file sculpt_dyntopo.c.
References SculptSession::bm, BM_data_layer_add_named(), SculptSession::cd_face_node_offset, CD_FLAG_TEMPORARY, CD_PROP_INT32, SculptSession::cd_vert_node_offset, CustomData_get_layer_index(), CustomData_get_n_offset(), CustomData_get_named_layer_index(), CustomDataLayer::flag, CustomData::layers, BMesh::pdata, and BMesh::vdata.
Referenced by SCULPT_dynamic_topology_enable_ex(), and sculpt_undo_bmesh_enable().
| void sculpt_expand_modal_keymap | ( | struct wmKeyConfig * | keyconf | ) |
Definition at line 2136 of file sculpt_expand.c.
References wmKeyMap::modal_items, NULL, SCULPT_EXPAND_MODAL_BRUSH_GRADIENT_TOGGLE, SCULPT_EXPAND_MODAL_CANCEL, SCULPT_EXPAND_MODAL_CONFIRM, SCULPT_EXPAND_MODAL_FALLOFF_GEODESIC, SCULPT_EXPAND_MODAL_FALLOFF_SPHERICAL, SCULPT_EXPAND_MODAL_FALLOFF_TOPOLOGY, SCULPT_EXPAND_MODAL_FALLOFF_TOPOLOGY_DIAGONALS, SCULPT_EXPAND_MODAL_GRADIENT_TOGGLE, SCULPT_EXPAND_MODAL_INVERT, SCULPT_EXPAND_MODAL_LOOP_COUNT_DECREASE, SCULPT_EXPAND_MODAL_LOOP_COUNT_INCREASE, SCULPT_EXPAND_MODAL_MOVE_TOGGLE, SCULPT_EXPAND_MODAL_PRESERVE_TOGGLE, SCULPT_EXPAND_MODAL_RECURSION_STEP_GEODESIC, SCULPT_EXPAND_MODAL_RECURSION_STEP_TOPOLOGY, SCULPT_EXPAND_MODAL_SNAP_TOGGLE, SCULPT_EXPAND_MODAL_TEXTURE_DISTORTION_DECREASE, SCULPT_EXPAND_MODAL_TEXTURE_DISTORTION_INCREASE, WM_modalkeymap_assign(), WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by ED_keymap_paint().
| int SCULPT_face_set_next_available_get | ( | SculptSession * | ss | ) |
Definition at line 700 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totfaces.
Referenced by do_brush_action(), sculpt_face_set_create_exec(), sculpt_init_session(), and sculpt_mask_expand_invoke().
| void SCULPT_face_set_visibility_set | ( | SculptSession * | ss, |
| int | face_set, | ||
| bool | visible | ||
| ) |
Definition at line 382 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totfaces.
Referenced by sculpt_face_sets_change_visibility_exec().
| void SCULPT_face_sets_visibility_all_set | ( | SculptSession * | ss, |
| bool | visible | ||
| ) |
Definition at line 418 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SCULPT_FACE_SET_NONE, and SculptSession::totfaces.
Referenced by sculpt_face_sets_change_visibility_exec().
| void SCULPT_face_sets_visibility_invert | ( | SculptSession * | ss | ) |
Definition at line 404 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totfaces.
Referenced by sculpt_face_sets_change_visibility_exec().
| void SCULPT_fake_neighbors_disable | ( | Object * | ob | ) |
Definition at line 9106 of file sculpt.c.
References BLI_assert, SculptFakeNeighbors::fake_neighbor_index, SculptSession::fake_neighbors, NULL, Object::sculpt, and SculptFakeNeighbors::use_fake_neighbors.
Referenced by SCULPT_pose_ik_chain_init().
| void SCULPT_fake_neighbors_enable | ( | Object * | ob | ) |
Definition at line 9099 of file sculpt.c.
References BLI_assert, SculptFakeNeighbors::fake_neighbor_index, SculptSession::fake_neighbors, NULL, Object::sculpt, and SculptFakeNeighbors::use_fake_neighbors.
Referenced by SCULPT_pose_ik_chain_init().
Definition at line 9070 of file sculpt.c.
References SculptFakeNeighbors::current_max_distance, SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, SculptSession::fake_neighbors, Object::sculpt, SCULPT_connected_components_ensure(), SCULPT_fake_neighbor_add(), SCULPT_fake_neighbor_init(), SCULPT_fake_neighbor_search(), and SCULPT_vertex_count_get().
Referenced by SCULPT_pose_ik_chain_init().
| void SCULPT_fake_neighbors_free | ( | struct Object * | ob | ) |
Definition at line 9113 of file sculpt.c.
References Object::sculpt, and sculpt_pose_fake_neighbors_free().
Referenced by SCULPT_flush_update_done().
| void SCULPT_filter_cache_free | ( | SculptSession * | ss | ) |
Definition at line 177 of file sculpt_filter_mesh.c.
References FilterCache::automasking, FilterCache::cloth_sim, FilterCache::detail_directions, SculptSession::filter_cache, FilterCache::limit_surface_co, FilterCache::mask_update_it, MEM_SAFE_FREE, FilterCache::nodes, FilterCache::normal_factor, FilterCache::prev_face_set, FilterCache::prev_mask, SCULPT_automasking_cache_free(), SCULPT_cloth_simulation_free(), FilterCache::sharpen_factor, and FilterCache::surface_smooth_laplacian_disp.
Referenced by ED_sculpt_end_transform(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_mask_expand_cancel(), sculpt_mask_expand_modal(), and sculpt_mesh_filter_modal().
| void SCULPT_filter_cache_init | ( | struct bContext * | C, |
| Object * | ob, | ||
| Sculpt * | sd, | ||
| const int | undo_type | ||
| ) |
Definition at line 121 of file sculpt_filter_mesh.c.
References BKE_pbvh_node_mark_normals_update(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BKE_pbvh_type(), BKE_pbvh_update_normals(), BLI_task_parallel_range(), C, center, copy_m4_m4(), CTX_data_ensure_evaluated_depsgraph(), data, depsgraph, ED_view3d_viewcontext_init(), SculptSession::filter_cache, filter_cache_init_task_cb(), invert_m4_m4(), MEM_callocN, FilterCache::nodes, NULL, FilterCache::obmat, Object::obmat, FilterCache::obmat_inv, SculptSearchSphereData::original, SculptSession::pbvh, PBVH_GRIDS, FilterCache::random_seed, ViewContext::rv3d, Object::sculpt, SCULPT_search_sphere_cb(), FilterCache::totnode, RegionView3D::viewinv, FilterCache::viewmat, RegionView3D::viewmat, and FilterCache::viewmat_inv.
Referenced by ED_sculpt_init_transform(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), and sculpt_mesh_filter_invoke().
| void SCULPT_filter_to_object_space | ( | float | r_v[3], |
| struct FilterCache * | filter_cache | ||
| ) |
Definition at line 84 of file sculpt_filter_mesh.c.
References mul_mat3_m4_v3(), FilterCache::obmat_inv, FilterCache::orientation, SCULPT_FILTER_ORIENTATION_LOCAL, SCULPT_FILTER_ORIENTATION_VIEW, SCULPT_FILTER_ORIENTATION_WORLD, and FilterCache::viewmat_inv.
Referenced by cloth_filter_apply_forces_task_cb(), mesh_filter_task_cb(), and SCULPT_filter_zero_disabled_axis_components().
| void SCULPT_filter_to_orientation_space | ( | float | r_v[3], |
| struct FilterCache * | filter_cache | ||
| ) |
Definition at line 68 of file sculpt_filter_mesh.c.
References mul_mat3_m4_v3(), FilterCache::obmat, FilterCache::orientation, SCULPT_FILTER_ORIENTATION_LOCAL, SCULPT_FILTER_ORIENTATION_VIEW, SCULPT_FILTER_ORIENTATION_WORLD, and FilterCache::viewmat.
Referenced by mesh_filter_task_cb(), and SCULPT_filter_zero_disabled_axis_components().
| void SCULPT_filter_zero_disabled_axis_components | ( | float | r_v[3], |
| struct FilterCache * | filter_cache | ||
| ) |
Definition at line 100 of file sculpt_filter_mesh.c.
References FilterCache::enabled_force_axis, SCULPT_filter_to_object_space(), and SCULPT_filter_to_orientation_space().
Referenced by cloth_filter_apply_displacement_to_deform_co(), and cloth_filter_apply_forces_to_vertices().
| void SCULPT_flip_quat_by_symm_area | ( | float | quat[3], |
| const ePaintSymmetryFlags | symm, | ||
| const ePaintSymmetryAreas | symmarea, | ||
| const float | pivot[3] | ||
| ) |
Definition at line 4209 of file sculpt.c.
References flip_qt().
Referenced by SCULPT_do_pose_brush(), and sculpt_transform_matrices_init().
| void SCULPT_flip_v3_by_symm_area | ( | float | v[3], |
| const ePaintSymmetryFlags | symm, | ||
| const ePaintSymmetryAreas | symmarea, | ||
| const float | pivot[3] | ||
| ) |
Definition at line 4190 of file sculpt.c.
Referenced by SCULPT_do_pose_brush(), sculpt_pose_align_pivot_local_space(), and sculpt_transform_matrices_init().
| void SCULPT_floodfill_add_active | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct SculptSession * | ss, | ||
| SculptFloodFill * | flood, | ||
| float | radius | ||
| ) |
Definition at line 1131 of file sculpt.c.
References flip_v3_v3(), SCULPT_active_vertex_co_get(), SCULPT_active_vertex_get(), SCULPT_floodfill_add_initial(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_nearest_vertex_get(), and v.
Referenced by pose_ik_chain_init_face_sets_fk(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
| void SCULPT_floodfill_add_and_skip_initial | ( | SculptFloodFill * | flood, |
| int | index | ||
| ) |
Definition at line 1099 of file sculpt.c.
References BLI_BITMAP_ENABLE, BLI_gsqueue_push(), SculptFloodFill::queue, and SculptFloodFill::visited_vertices.
Referenced by sculpt_expand_topology_from_state_boundary().
| void SCULPT_floodfill_add_initial | ( | SculptFloodFill * | flood, |
| int | index | ||
| ) |
Definition at line 1094 of file sculpt.c.
References BLI_gsqueue_push(), and SculptFloodFill::queue.
Referenced by pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), and sculpt_mask_by_color_contiguous().
| void SCULPT_floodfill_add_initial_with_symmetry | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct SculptSession * | ss, | ||
| SculptFloodFill * | flood, | ||
| int | index, | ||
| float | radius | ||
| ) |
Definition at line 1105 of file sculpt.c.
References flip_v3_v3(), SCULPT_floodfill_add_initial(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_nearest_vertex_get(), SCULPT_vertex_co_get(), and v.
Referenced by pose_ik_chain_init_face_sets(), sculpt_expand_normal_falloff_create(), and sculpt_expand_topology_falloff_create().
| void SCULPT_floodfill_execute | ( | struct SculptSession * | ss, |
| SculptFloodFill * | flood, | ||
| bool(*)(SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata) | func, | ||
| void * | userdata | ||
| ) |
Definition at line 1157 of file sculpt.c.
References BLI_BITMAP_ENABLE, BLI_BITMAP_TEST, BLI_gsqueue_is_empty(), BLI_gsqueue_pop(), BLI_gsqueue_push(), SculptVertexNeighborIter::index, SculptVertexNeighborIter::is_duplicate, SculptFloodFill::queue, SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, SCULPT_vertex_visible_get(), and SculptFloodFill::visited_vertices.
Referenced by pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), sculpt_expand_normal_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
| void SCULPT_floodfill_free | ( | SculptFloodFill * | flood | ) |
Definition at line 1188 of file sculpt.c.
References BLI_gsqueue_free(), MEM_SAFE_FREE, NULL, SculptFloodFill::queue, and SculptFloodFill::visited_vertices.
Referenced by pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), sculpt_expand_normal_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
| void SCULPT_floodfill_init | ( | struct SculptSession * | ss, |
| SculptFloodFill * | flood | ||
| ) |
Definition at line 1085 of file sculpt.c.
References BLI_BITMAP_NEW, BLI_gsqueue_new(), SculptFloodFill::queue, SCULPT_vertex_count_get(), SCULPT_vertex_random_access_ensure(), and SculptFloodFill::visited_vertices.
Referenced by pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), sculpt_expand_normal_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
Definition at line 6340 of file sculpt.c.
References BKE_mesh_calc_normals(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), data, Object::data, SculptSession::deform_modifiers_active, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, NULL, SculptSession::orig_cos, Sculpt::paint, SculptSession::pbvh, Object::sculpt, SCULPT_flush_stroke_deform_task_cb(), sculpt_update_keyblock(), SCULPT_vertcos_to_key(), SculptSession::shapekey_active, and Mesh::totvert.
Referenced by ED_sculpt_update_modal_transform(), sculpt_cloth_filter_modal(), sculpt_face_set_edit_modify_coordinates(), sculpt_gesture_project_end(), sculpt_mesh_filter_modal(), and sculpt_stroke_update_step().
| void SCULPT_flush_update_done | ( | const bContext * | C, |
| Object * | ob, | ||
| SculptUpdateType | update_flags | ||
| ) |
Definition at line 7819 of file sculpt.c.
References blender::compositor::area(), bScreen::areabase, BKE_pbvh_bmesh_after_stroke(), BKE_pbvh_type(), BKE_pbvh_update_bounds(), BKE_pbvh_update_vertex_data(), BKE_sculptsession_use_pbvh_draw(), C, CTX_wm_manager(), CTX_wm_region_view3d(), CTX_wm_view3d(), Object::data, SculptSession::deform_modifiers_active, DEG_id_tag_update(), ED_region_tag_redraw(), Mesh::id, Object::id, ID_REAL_USERS, ID_RECALC_GEOMETRY, LISTBASE_FOREACH, mesh, SculptSession::pbvh, PBVH_BMESH, PBVH_UpdateColor, PBVH_UpdateMask, PBVH_UpdateOriginalBB, RegionView3D::rflag, RGN_TYPE_WINDOW, RV3D_PAINTING, Object::sculpt, SCULPT_fake_neighbors_free(), SCULPT_UPDATE_COLOR, SCULPT_UPDATE_COORDS, sculpt_update_keyblock(), SCULPT_UPDATE_MASK, SculptSession::shapekey_active, SPACE_VIEW3D, SpaceLink::spacetype, wmWindowManager::windows, and WM_window_get_active_screen().
Referenced by ED_sculpt_end_transform(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_expand_finish(), sculpt_expand_restore_original_state(), sculpt_face_set_edit_modify_coordinates(), sculpt_gesture_project_end(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_cancel(), sculpt_mask_expand_modal(), sculpt_mesh_filter_modal(), and sculpt_stroke_done().
| void SCULPT_flush_update_step | ( | bContext * | C, |
| SculptUpdateType | update_flags | ||
| ) |
Definition at line 7759 of file sculpt.c.
References BKE_pbvh_update_bounds(), BKE_sculptsession_use_pbvh_draw(), C, SculptSession::cache, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), StrokeCache::current_r, DEG_id_tag_update(), depsgraph, ED_region_tag_redraw(), ED_region_tag_redraw_partial(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SHADING, SculptSession::modifier, SculptSession::multires, MULTIRES_COORDS_MODIFIED, multires_mark_as_modified(), NULL, SculptSession::pbvh, PBVH_UpdateBB, r, RegionView3D::rflag, RV3D_PAINTING, Object::sculpt, sculpt_extend_redraw_rect_previous(), SCULPT_get_redraw_rect(), SCULPT_UPDATE_COORDS, SCULPT_update_object_bounding_box(), ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by ED_sculpt_update_modal_transform(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_expand_flush_updates(), sculpt_expand_restore_original_state(), sculpt_face_set_edit_modify_coordinates(), sculpt_gesture_project_end(), sculpt_mask_expand_cancel(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), sculpt_mesh_filter_modal(), and sculpt_stroke_update_step().
| float* SCULPT_geodesic_distances_create | ( | struct Object * | ob, |
| struct GSet * | initial_vertices, | ||
| const float | limit_radius | ||
| ) |
Definition at line 306 of file sculpt_geodesic.c.
References BKE_pbvh_type(), BLI_assert, NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, Object::sculpt, SCULPT_geodesic_fallback_create(), and SCULPT_geodesic_mesh_create().
Referenced by sculpt_expand_geodesics_from_state_boundary(), SCULPT_geodesic_from_vertex(), and SCULPT_geodesic_from_vertex_and_symm().
Definition at line 353 of file sculpt_geodesic.c.
References BLI_gset_add(), BLI_gset_free(), BLI_gset_int_new(), NULL, POINTER_FROM_INT, and SCULPT_geodesic_distances_create().
| float* SCULPT_geodesic_from_vertex_and_symm | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| const int | vertex, | ||
| const float | limit_radius | ||
| ) |
Definition at line 322 of file sculpt_geodesic.c.
References BLI_gset_add(), BLI_gset_free(), BLI_gset_int_new(), flip_v3_v3(), NULL, POINTER_FROM_INT, Object::sculpt, SCULPT_geodesic_distances_create(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_nearest_vertex_get(), SCULPT_vertex_co_get(), and v.
Referenced by sculpt_expand_geodesic_falloff_create().
| void SCULPT_geometry_preview_lines_update | ( | bContext * | C, |
| struct SculptSession * | ss, | ||
| float | radius | ||
| ) |
Definition at line 8605 of file sculpt.c.
References BKE_pbvh_type(), BKE_sculpt_update_object_for_edit(), BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, BLI_gsqueue_free(), BLI_gsqueue_is_empty(), BLI_gsqueue_new(), BLI_gsqueue_pop(), BLI_gsqueue_push(), C, copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), SculptSession::deform_modifiers_active, depsgraph, SculptVertexNeighborIter::index, len_squared_v3v3(), MEM_callocN, MEM_freeN, NULL, SculptSession::pbvh, PBVH_GRIDS, SculptSession::pmap, SculptSession::preview_vert_index_count, SculptSession::preview_vert_index_list, SCULPT_active_vertex_co_get(), SCULPT_active_vertex_get(), SCULPT_vertex_co_for_grab_active_get(), SCULPT_vertex_count_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, and SculptVertexNeighborIter::size.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
| bool SCULPT_get_redraw_rect | ( | struct ARegion * | region, |
| struct RegionView3D * | rv3d, | ||
| Object * | ob, | ||
| rcti * | rect | ||
| ) |
Definition at line 1573 of file sculpt.c.
References BKE_pbvh_redraw_BB(), paint_convert_bb_to_rect(), SculptSession::pbvh, and Object::sculpt.
Referenced by SCULPT_flush_update_step(), and wpaint_stroke_update_step().
| ePaintSymmetryAreas SCULPT_get_vertex_symm_area | ( | const float | co[3] | ) |
Definition at line 4175 of file sculpt.c.
References PAINT_SYMM_AREA_DEFAULT, PAINT_SYMM_AREA_X, PAINT_SYMM_AREA_Y, and PAINT_SYMM_AREA_Z.
Referenced by do_pose_brush_task_cb_ex(), and sculpt_transform_task_cb().
| bool SCULPT_is_automasking_enabled | ( | const Sculpt * | sd, |
| const SculptSession * | ss, | ||
| const Brush * | br | ||
| ) |
Definition at line 86 of file sculpt_automasking.c.
References BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, SCULPT_is_automasking_mode_enabled(), and SCULPT_stroke_is_dynamic_topology().
Referenced by do_brush_action(), SCULPT_automasking_cache_init(), sculpt_color_filter_invoke(), sculpt_face_sets_automasking_init(), sculpt_mesh_filter_invoke(), sculpt_needs_connectivity_info(), and sculpt_stroke_done().
| bool SCULPT_is_automasking_mode_enabled | ( | const Sculpt * | sd, |
| const Brush * | br, | ||
| const eAutomasking_flag | mode | ||
| ) |
Definition at line 76 of file sculpt_automasking.c.
References Brush::automasking_flags, and Sculpt::automasking_flags.
Referenced by SCULPT_automasking_cache_init(), and SCULPT_is_automasking_enabled().
| BLI_INLINE bool SCULPT_is_cloth_deform_brush | ( | const Brush * | brush | ) |
Definition at line 447 of file sculpt_intern.h.
References BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_DEFORM_TARGET_CLOTH_SIM, Brush::cloth_deform_type, Brush::deform_target, ELEM, Brush::sculpt_tool, and SCULPT_TOOL_CLOTH.
Referenced by do_cloth_brush_build_constraints_task_cb_ex(), paint_space_stroke_enabled(), paint_space_stroke_spacing(), paint_tool_require_location(), SCULPT_do_cloth_brush(), sculpt_update_brush_delta(), and sculpt_update_cache_variants().
| bool SCULPT_is_symmetry_iteration_valid | ( | char | i, |
| char | symm | ||
| ) |
Definition at line 1042 of file sculpt.c.
Referenced by calc_symmetry_feather(), do_symmetrical_brush_actions(), sculpt_expand_boundary_topology_falloff_create(), sculpt_expand_diagonals_falloff_create(), sculpt_expand_find_active_connected_components_from_vert(), sculpt_expand_spherical_falloff_create(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), SCULPT_geodesic_from_vertex_and_symm(), sculpt_gesture_apply(), SCULPT_is_vertex_inside_brush_radius_symm(), and sculpt_pose_brush_is_vertex_inside_brush_radius().
| bool SCULPT_is_vertex_inside_brush_radius_symm | ( | const float | vertex[3], |
| const float | br_co[3], | ||
| float | radius, | ||
| char | symm | ||
| ) |
Definition at line 1048 of file sculpt.c.
References flip_v3_v3(), len_squared_v3v3(), and SCULPT_is_symmetry_iteration_valid().
Referenced by automask_floodfill_cb().
| void SCULPT_mask_filter_smooth_apply | ( | Sculpt * | sd, |
| Object * | ob, | ||
| PBVHNode ** | nodes, | ||
| const int | totnode, | ||
| const int | smooth_iterations | ||
| ) |
Definition at line 265 of file sculpt_filter_mask.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, MASK_FILTER_SMOOTH, and mask_filter_task_cb().
Referenced by sculpt_mask_expand_modal().
| struct MVert* SCULPT_mesh_deformed_mverts_get | ( | SculptSession * | ss | ) |
Definition at line 295 of file sculpt.c.
References BKE_pbvh_get_verts(), BKE_pbvh_type(), SculptSession::deform_modifiers_active, SculptSession::mvert, NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::shapekey_active.
Referenced by do_draw_face_sets_brush_task_cb_ex(), sculpt_face_set_edit_fair_face_set(), and SCULPT_geodesic_mesh_create().
| char SCULPT_mesh_symmetry_xyz_get | ( | Object * | object | ) |
Definition at line 323 of file sculpt.c.
References BKE_mesh_from_object(), mesh, and Mesh::symmetry.
Referenced by cursor_draw_point_with_symmetry(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_symmetrical_brush_actions(), pose_brush_grow_factor_task_cb_ex(), pose_ik_chain_init_face_sets(), SCULPT_do_pose_brush(), sculpt_expand_boundary_topology_falloff_create(), sculpt_expand_diagonals_falloff_create(), sculpt_expand_find_active_connected_components_from_vert(), sculpt_expand_reposition_pivot(), sculpt_expand_spherical_falloff_create(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), SCULPT_geodesic_from_vertex_and_symm(), sculpt_gesture_context_init_common(), sculpt_mask_expand_modal(), SCULPT_pose_calc_pose_data(), sculpt_set_pivot_position_exec(), SCULPT_topology_automasking_init(), sculpt_transform_all_vertices(), vpaint_do_symmetrical_brush_actions(), and wpaint_do_symmetrical_brush_actions().
| bool SCULPT_mode_poll | ( | struct bContext * | C | ) |
Definition at line 6601 of file sculpt.c.
References C, CTX_data_active_object(), Object::mode, and OB_MODE_SCULPT.
Referenced by ED_keymap_paint(), PAINT_OT_mask_flood_fill(), sculpt_and_constant_or_manual_detail_poll(), sculpt_and_dynamic_topology_poll(), SCULPT_mode_poll_view3d(), sculpt_no_multires_poll(), SCULPT_OT_cloth_filter(), SCULPT_OT_dirty_mask(), SCULPT_OT_dynamic_topology_toggle(), SCULPT_OT_expand(), SCULPT_OT_face_sets_change_visibility(), SCULPT_OT_face_sets_create(), SCULPT_OT_face_sets_edit(), SCULPT_OT_face_sets_init(), SCULPT_OT_face_sets_randomize_colors(), SCULPT_OT_mask_expand(), SCULPT_OT_mask_filter(), SCULPT_OT_mask_init(), SCULPT_OT_mesh_filter(), SCULPT_OT_optimize(), SCULPT_OT_sample_detail_size(), SCULPT_OT_set_persistent_base(), SCULPT_OT_set_pivot_position(), SCULPT_poll(), and SCULPT_vertex_colors_poll().
| bool SCULPT_mode_poll_view3d | ( | struct bContext * | C | ) |
Definition at line 6615 of file sculpt.c.
References C, CTX_wm_region_view3d(), and SCULPT_mode_poll().
Referenced by ED_object_sculptmode_enter_ex(), PAINT_OT_hide_show(), PAINT_OT_mask_box_gesture(), PAINT_OT_mask_lasso_gesture(), PAINT_OT_mask_line_gesture(), SCULPT_OT_face_set_box_gesture(), SCULPT_OT_face_set_lasso_gesture(), SCULPT_OT_project_line_gesture(), SCULPT_OT_trim_box_gesture(), and SCULPT_OT_trim_lasso_gesture().
| void SCULPT_multiplane_scrape_preview_draw | ( | const uint | gpuattr, |
| Brush * | brush, | ||
| SculptSession * | ss, | ||
| const float | outline_col[3], | ||
| const float | outline_alpha | ||
| ) |
Definition at line 405 of file sculpt_multiplane_scrape.c.
References angle(), BRUSH_MULTIPLANE_SCRAPE_PLANES_PREVIEW, SculptSession::cache, DEG2RADF, Brush::flag2, GPU_matrix_mul, GPU_PRIM_LINES, GPU_PRIM_TRIS, immBegin(), immEnd(), immUniformColor3fvAlpha(), immVertex3f(), StrokeCache::invert, invert_m4_m4(), StrokeCache::multiplane_scrape_angle, StrokeCache::pen_flip, StrokeCache::radius, rotate_v3_v3v3fl(), and StrokeCache::stroke_local_mat.
Referenced by paint_cursor_cursor_draw_3d_view_brush_cursor_active().
| int SCULPT_nearest_vertex_get | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| const float | co[3], | ||
| float | max_distance, | ||
| bool | use_original | ||
| ) |
Definition at line 1000 of file sculpt.c.
References BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), copy_v3_v3(), data, do_nearest_vertex_get_task_cb(), TaskParallelSettings::func_reduce, MEM_SAFE_FREE, NearestVertexTLSData::nearest_vertex_distance_squared, nearest_vertex_get_reduce(), NearestVertexTLSData::nearest_vertex_index, SculptThreadedTaskData::nearest_vertex_search_co, NULL, SculptSession::pbvh, Object::sculpt, SCULPT_search_sphere_cb(), SculptThreadedTaskData::sd, TaskParallelSettings::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by pose_ik_chain_init_topology(), SCULPT_do_boundary_brush(), sculpt_expand_get_vertex_index_for_symmetry_pass(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), and SCULPT_geodesic_from_vertex_and_symm().
| void SCULPT_neighbor_color_average | ( | SculptSession * | ss, |
| float | result[4], | ||
| int | index | ||
| ) |
Definition at line 193 of file sculpt_smooth.c.
References add_v4_v4(), copy_v4_v4(), SculptVertexNeighborIter::index, mul_v4_v4fl(), result, SCULPT_vertex_color_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, and SCULPT_VERTEX_NEIGHBORS_ITER_END.
Referenced by color_filter_task_cb(), and do_color_smooth_task_cb_exec().
| void SCULPT_neighbor_coords_average | ( | SculptSession * | ss, |
| float | result[3], | ||
| int | index | ||
| ) |
Definition at line 155 of file sculpt_smooth.c.
References add_v3_v3(), copy_v3_v3(), SculptVertexNeighborIter::index, mul_v3_v3fl(), result, SCULPT_vertex_co_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, and SCULPT_VERTEX_NEIGHBORS_ITER_END.
Referenced by mesh_filter_enhance_details_init_directions(), mesh_filter_sharpen_init(), mesh_filter_task_cb(), SCULPT_enhance_details_brush(), and SCULPT_surface_smooth_laplacian_step().
| void SCULPT_neighbor_coords_average_interior | ( | SculptSession * | ss, |
| float | result[3], | ||
| int | index | ||
| ) |
Definition at line 65 of file sculpt_smooth.c.
References add_v3_v3(), copy_v3_v3(), SculptVertexNeighborIter::index, mul_v3_v3fl(), result, SCULPT_vertex_co_get(), SCULPT_vertex_is_boundary(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, and SCULPT_VERTEX_NEIGHBORS_ITER_END.
Referenced by do_smooth_brush_task_cb_ex(), and mesh_filter_task_cb().
| float SCULPT_neighbor_mask_average | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 175 of file sculpt_smooth.c.
References SculptVertexNeighborIter::index, SCULPT_vertex_mask_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, and SCULPT_VERTEX_NEIGHBORS_ITER_END.
Referenced by do_smooth_brush_task_cb_ex(), and mask_filter_task_cb().
| void SCULPT_orig_vert_data_init | ( | SculptOrigVertData * | data, |
| Object * | ob, | ||
| PBVHNode * | node | ||
| ) |
Initialize a SculptOrigVertData for accessing original vertex data; handles BMesh, Mesh, and multi-resolution.
Definition at line 1300 of file sculpt.c.
References data, node, SCULPT_orig_vert_data_unode_init(), SCULPT_UNDO_COORDS, and SCULPT_undo_push_node().
Referenced by color_filter_task_cb(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_draw_sharp_brush_task_cb_ex(), do_elastic_deform_brush_task_cb_ex(), do_grab_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_paint_brush_task_cb_ex(), do_pose_brush_task_cb_ex(), do_rotate_brush_task_cb_ex(), do_thumb_brush_task_cb_ex(), do_topology_relax_task_cb_ex(), do_topology_slide_task_cb_ex(), mesh_filter_task_cb(), SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex(), and sculpt_transform_task_cb().
| void SCULPT_orig_vert_data_unode_init | ( | SculptOrigVertData * | data, |
| Object * | ob, | ||
| SculptUndoNode * | unode | ||
| ) |
Initialize a SculptOrigVertData for accessing original vertex data; handles BMesh, Mesh, and multi-resolution.
Definition at line 1277 of file sculpt.c.
References SculptSession::bm, bm, SculptSession::bm_log, data, and Object::sculpt.
Referenced by paint_mesh_restore_co_task_cb(), and SCULPT_orig_vert_data_init().
| void SCULPT_orig_vert_data_update | ( | SculptOrigVertData * | orig_data, |
| PBVHVertexIter * | iter | ||
| ) |
Update a SculptOrigVertData for a particular vertex from the PBVH iterator.
Definition at line 1310 of file sculpt.c.
References SculptOrigVertData::bm_log, BM_log_original_mask(), BM_log_original_vert_data(), PBVHVertexIter::bm_vert, SculptOrigVertData::co, SculptOrigVertData::col, SculptOrigVertData::colors, SculptOrigVertData::coords, PBVHVertexIter::i, SculptOrigVertData::mask, SculptOrigVertData::no, SculptOrigVertData::normals, SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_MASK, SculptUndoNode::type, SculptOrigVertData::unode, and SculptOrigVertData::vmasks.
Referenced by color_filter_task_cb(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_draw_sharp_brush_task_cb_ex(), do_elastic_deform_brush_task_cb_ex(), do_grab_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_paint_brush_task_cb_ex(), do_pose_brush_task_cb_ex(), do_rotate_brush_task_cb_ex(), do_thumb_brush_task_cb_ex(), do_topology_relax_task_cb_ex(), do_topology_slide_task_cb_ex(), mesh_filter_task_cb(), paint_mesh_restore_co_task_cb(), SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex(), and sculpt_transform_task_cb().
| void SCULPT_OT_cloth_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 1642 of file sculpt_cloth.c.
References CLOTH_FILTER_FORCE_X, CLOTH_FILTER_FORCE_Y, CLOTH_FILTER_FORCE_Z, CLOTH_FILTER_GRAVITY, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_cloth_filter_force_axis_items, prop_cloth_filter_orientation_items, prop_cloth_filter_type, RNA_def_boolean(), RNA_def_enum(), RNA_def_enum_flag(), RNA_def_float(), sculpt_cloth_filter_invoke(), sculpt_cloth_filter_modal(), SCULPT_FILTER_ORIENTATION_LOCAL, SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_color_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 315 of file sculpt_filter_color.c.
References COLOR_FILTER_HUE, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_color_filter_types, PROP_COLOR_GAMMA, RNA_def_enum(), RNA_def_float(), RNA_def_float_color(), RNA_def_property_subtype(), sculpt_color_filter_invoke(), sculpt_color_filter_modal(), SCULPT_vertex_colors_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_detail_flood_fill | ( | struct wmOperatorType * | ot | ) |
Definition at line 136 of file sculpt_detail.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, sculpt_and_constant_or_manual_detail_poll(), and sculpt_detail_flood_fill_exec().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_dirty_mask | ( | struct wmOperatorType * | ot | ) |
Definition at line 482 of file sculpt_filter_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, RNA_def_boolean(), sculpt_dirty_mask_exec(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_dynamic_topology_toggle | ( | struct wmOperatorType * | ot | ) |
Definition at line 442 of file sculpt_dyntopo.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, sculpt_dynamic_topology_toggle_exec(), sculpt_dynamic_topology_toggle_invoke(), and SCULPT_mode_poll().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_dyntopo_detail_size_edit | ( | struct wmOperatorType * | ot | ) |
Definition at line 747 of file sculpt_detail.c.
References wmOperatorType::cancel, wmOperatorType::description, dyntopo_detail_size_edit_cancel(), dyntopo_detail_size_edit_invoke(), dyntopo_detail_size_edit_modal(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and sculpt_and_dynamic_topology_poll().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_expand | ( | struct wmOperatorType * | ot | ) |
Definition at line 2204 of file sculpt_expand.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), RNA_def_int(), sculpt_expand_cancel(), SCULPT_EXPAND_FALLOFF_ACTIVE_FACE_SET, SCULPT_EXPAND_FALLOFF_BOUNDARY_FACE_SET, SCULPT_EXPAND_FALLOFF_BOUNDARY_TOPOLOGY, SCULPT_EXPAND_FALLOFF_GEODESIC, SCULPT_EXPAND_FALLOFF_NORMALS, SCULPT_EXPAND_FALLOFF_SPHERICAL, SCULPT_EXPAND_FALLOFF_TOPOLOGY, SCULPT_EXPAND_FALLOFF_TOPOLOGY_DIAGONALS, sculpt_expand_invoke(), sculpt_expand_modal(), SCULPT_EXPAND_TARGET_COLORS, SCULPT_EXPAND_TARGET_FACE_SETS, SCULPT_EXPAND_TARGET_MASK, SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_face_set_box_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1723 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, face_set_gesture_box_exec(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_box_invoke(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_face_set_lasso_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1706 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, face_set_gesture_lasso_exec(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_face_sets_change_visibility | ( | struct wmOperatorType * | ot | ) |
Definition at line 976 of file sculpt_face_set.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_sculpt_face_sets_change_visibility_types, RNA_def_enum(), SCULPT_FACE_SET_VISIBILITY_TOGGLE, sculpt_face_sets_change_visibility_exec(), sculpt_face_sets_change_visibility_invoke(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_face_sets_create | ( | struct wmOperatorType * | ot | ) |
Definition at line 422 of file sculpt_face_set.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_sculpt_face_set_create_types, RNA_def_enum(), sculpt_face_set_create_exec(), SCULPT_FACE_SET_MASKED, SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_face_sets_edit | ( | struct wmOperatorType * | ot | ) |
Definition at line 1444 of file sculpt_face_set.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_sculpt_face_sets_edit_types, RNA_def_boolean(), RNA_def_enum(), SCULPT_FACE_SET_EDIT_GROW, sculpt_face_set_edit_invoke(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_face_sets_init | ( | struct wmOperatorType * | ot | ) |
Definition at line 774 of file sculpt_face_set.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_sculpt_face_sets_init_types, RNA_def_enum(), RNA_def_float(), sculpt_face_set_init_exec(), SCULPT_FACE_SET_MASKED, SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_face_sets_randomize_colors | ( | struct wmOperatorType * | ot | ) |
Definition at line 1035 of file sculpt_face_set.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, sculpt_face_sets_randomize_colors_exec(), and SCULPT_mode_poll().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_mask_expand | ( | struct wmOperatorType * | ot | ) |
Definition at line 477 of file sculpt_mask_expand.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_int(), sculpt_mask_expand_cancel(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_mask_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 282 of file sculpt_filter_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, MASK_FILTER_SMOOTH, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, prop_mask_filter_types, RNA_def_boolean(), RNA_def_enum(), RNA_def_int(), sculpt_mask_filter_exec(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_mask_init | ( | struct wmOperatorType * | ot | ) |
Definition at line 177 of file sculpt_mask_init.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_sculpt_mask_init_mode_types, RNA_def_enum(), sculpt_mask_init_exec(), SCULPT_MASK_INIT_RANDOM_PER_VERTEX, SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_mesh_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 753 of file sculpt_filter_mesh.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MESH_FILTER_DEFORM_X, MESH_FILTER_DEFORM_Y, MESH_FILTER_DEFORM_Z, MESH_FILTER_INFLATE, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_mesh_filter_deform_axis_items, prop_mesh_filter_orientation_items, prop_mesh_filter_types, RNA_def_enum(), RNA_def_enum_flag(), RNA_def_float(), RNA_def_int(), SCULPT_FILTER_ORIENTATION_LOCAL, sculpt_mesh_filter_invoke(), sculpt_mesh_filter_modal(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_project_line_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1784 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, project_gesture_line_exec(), sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_CURSOR_EDIT, WM_gesture_straightline_active_side_invoke(), WM_gesture_straightline_oneshot_modal(), and WM_operator_properties_gesture_straightline().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_sample_detail_size | ( | struct wmOperatorType * | ot | ) |
Definition at line 334 of file sculpt_detail.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_sculpt_sample_detail_mode_types, RNA_def_enum(), RNA_def_int_array(), SAMPLE_DETAIL_DYNTOPO, SCULPT_mode_poll(), sculpt_sample_detail_size_exec(), sculpt_sample_detail_size_invoke(), sculpt_sample_detail_size_modal(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_set_detail_size | ( | struct wmOperatorType * | ot | ) |
Definition at line 417 of file sculpt_detail.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, sculpt_and_dynamic_topology_poll(), and sculpt_set_detail_size_exec().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_set_pivot_position | ( | struct wmOperatorType * | ot | ) |
Definition at line 395 of file sculpt_transform.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_sculpt_pivot_position_types, RNA_def_enum(), RNA_def_float(), SCULPT_mode_poll(), SCULPT_PIVOT_POSITION_UNMASKED, sculpt_set_pivot_position_exec(), sculpt_set_pivot_position_invoke(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_trim_box_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1763 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), sculpt_trim_gesture_box_exec(), sculpt_trim_gesture_box_invoke(), sculpt_trim_gesture_operator_properties(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_sculpt().
| void SCULPT_OT_trim_lasso_gesture | ( | struct wmOperatorType * | ot | ) |
Definition at line 1742 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), sculpt_trim_gesture_lasso_exec(), sculpt_trim_gesture_lasso_invoke(), sculpt_trim_gesture_operator_properties(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by ED_operatortypes_sculpt().
| bool SCULPT_pbvh_calc_area_normal | ( | const struct Brush * | brush, |
| Object * | ob, | ||
| PBVHNode ** | nodes, | ||
| int | totnode, | ||
| bool | use_threading, | ||
| float | r_area_no[3] | ||
| ) |
| void SCULPT_pbvh_clear | ( | Object * | ob | ) |
Definition at line 87 of file sculpt_dyntopo.c.
References BKE_object_free_derived_caches(), BKE_pbvh_free(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, MEM_freeN, NULL, SculptSession::pbvh, SculptSession::pmap, SculptSession::pmap_mem, and Object::sculpt.
Referenced by sculpt_detail_flood_fill_exec(), SCULPT_dynamic_topology_disable_ex(), SCULPT_dynamic_topology_enable_ex(), sculpt_optimize_exec(), sculpt_symmetrize_exec(), sculpt_undo_bmesh_enable(), sculpt_undo_bmesh_restore_generic(), and sculpt_undo_geometry_restore().
Definition at line 4875 of file sculpt.c.
References plane_point_side_v3().
Referenced by do_fill_brush_task_cb_ex(), do_multiplane_scrape_brush_task_cb_ex(), and do_scrape_brush_task_cb_ex().
| int SCULPT_plane_trim | ( | const struct StrokeCache * | cache, |
| const struct Brush * | brush, | ||
| const float | val[3] | ||
| ) |
| bool SCULPT_poll | ( | struct bContext * | C | ) |
Definition at line 6625 of file sculpt.c.
References C, paint_poll(), and SCULPT_mode_poll().
Referenced by SCULPT_OT_brush_stroke(), and SCULPT_poll_view3d().
| bool SCULPT_poll_view3d | ( | struct bContext * | C | ) |
Definition at line 6620 of file sculpt.c.
References C, CTX_wm_region_view3d(), and SCULPT_poll().
| void SCULPT_pose_brush_init | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct SculptSession * | ss, | ||
| struct Brush * | br | ||
| ) |
Definition at line 980 of file sculpt_pose.c.
References BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), SculptSession::cache, data, MEM_SAFE_FREE, NULL, SculptSession::pbvh, pose_brush_init_task_cb_ex(), StrokeCache::pose_ik_chain, Brush::pose_smooth_iterations, StrokeCache::radius, Object::sculpt, SCULPT_pose_ik_chain_init(), SculptPoseIKChain::segments, SculptPoseIKChain::tot_segments, StrokeCache::true_location, and SculptPoseIKChainSegment::weights.
Referenced by do_brush_action().
| void SCULPT_pose_calc_pose_data | ( | Sculpt * | sd, |
| Object * | ob, | ||
| SculptSession * | ss, | ||
| float | initial_location[3], | ||
| float | radius, | ||
| float | pose_offset, | ||
| float * | r_pose_origin, | ||
| float * | r_pose_factor | ||
| ) |
Calculate the pose origin and (Optionally the pose factor) that is used when using the pose brush.
| r_pose_origin | Must be a valid pointer. |
| r_pose_factor | Optional, when set to NULL it won't be calculated. |
Definition at line 550 of file sculpt_pose.c.
References copy_v3_v3(), PoseFloodFillData::fallback_floodfill_origin, madd_v3_v3fl(), mul_v3_fl(), normalize_v3(), NULL, PoseFloodFillData::pose_initial_co, PoseFloodFillData::pose_origin, pose_topology_floodfill_cb(), PoseFloodFillData::radius, SCULPT_floodfill_add_active(), SCULPT_floodfill_execute(), SCULPT_floodfill_free(), SCULPT_floodfill_init(), SCULPT_mesh_symmetry_xyz_get(), sculpt_pose_grow_pose_factor(), SCULPT_vertex_random_access_ensure(), sub_v3_v3v3(), PoseFloodFillData::tot_co, and zero_v3().
Referenced by pose_ik_chain_init_topology().
| void SCULPT_pose_ik_chain_free | ( | struct SculptPoseIKChain * | ik_chain | ) |
Definition at line 1233 of file sculpt_pose.c.
References MEM_SAFE_FREE, SculptPoseIKChain::segments, SculptPoseIKChain::tot_segments, and SculptPoseIKChainSegment::weights.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive(), and SCULPT_cache_free().
| struct SculptPoseIKChain* SCULPT_pose_ik_chain_init | ( | struct Sculpt * | sd, |
| struct Object * | ob, | ||
| struct SculptSession * | ss, | ||
| struct Brush * | br, | ||
| const float | initial_location[3], | ||
| const float | radius | ||
| ) |
Definition at line 945 of file sculpt_pose.c.
References BRUSH_POSE_ORIGIN_FACE_SETS, BRUSH_POSE_ORIGIN_FACE_SETS_FK, BRUSH_POSE_ORIGIN_TOPOLOGY, BRUSH_USE_CONNECTED_ONLY, Brush::disconnected_distance_max, Brush::flag2, NULL, pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), pose_ik_chain_init_topology(), Brush::pose_origin_type, SCULPT_fake_neighbors_disable(), SCULPT_fake_neighbors_enable(), and SCULPT_fake_neighbors_ensure().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive(), and SCULPT_pose_brush_init().
| float SCULPT_raycast_init | ( | struct ViewContext * | vc, |
| const float | mouse[2], | ||
| float | ray_start[3], | ||
| float | ray_end[3], | ||
| float | ray_normal[3], | ||
| bool | original | ||
| ) |
Definition at line 7412 of file sculpt.c.
References BKE_pbvh_raycast_project_ray_root(), ViewContext::depsgraph, ED_view3d_win_to_segment_clipped(), invert_m4_m4(), RegionView3D::is_persp, mul_m4_v3(), normalize_v3(), ViewContext::obact, Object::obmat, SculptSession::pbvh, ViewContext::region, ARegion::regiondata, RV3D_CLIPPING_ENABLED, Object::sculpt, sub_v3_v3v3(), and ViewContext::v3d.
Referenced by sample_detail_dyntopo(), SCULPT_cursor_geometry_info_update(), and SCULPT_stroke_get_location().
| void SCULPT_relax_vertex | ( | struct SculptSession * | ss, |
| struct PBVHVertexIter * | vd, | ||
| float | factor, | ||
| bool | filter_boundary_face_sets, | ||
| float * | r_final_pos | ||
| ) |
Definition at line 3506 of file sculpt.c.
References add_v3_v3(), add_v3_v3v3(), closest_to_plane_v3(), PBVHVertexIter::co, copy_v3_v3(), PBVHVertexIter::index, SculptVertexNeighborIter::index, is_zero_v3(), mul_v3_fl(), normalize_v3(), normalize_v3_v3(), plane_from_point_normal_v3(), SCULPT_vertex_co_get(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, SCULPT_vertex_normal_get(), sub_v3_v3v3(), and zero_v3().
Referenced by do_relax_face_sets_brush_task_cb_ex(), do_topology_relax_task_cb_ex(), and mesh_filter_task_cb().
| bool SCULPT_search_circle_cb | ( | PBVHNode * | node, |
| void * | data_v | ||
| ) |
Definition at line 2608 of file sculpt.c.
References BKE_pbvh_node_fully_masked_get(), BKE_pbvh_node_get_BB(), BKE_pbvh_node_get_original_BB(), data, dist_squared_ray_to_aabb_v3(), and node.
Referenced by sculpt_pbvh_gather_generic(), and vwpaint_pbvh_gather_generic().
| bool SCULPT_search_sphere_cb | ( | PBVHNode * | node, |
| void * | data_v | ||
| ) |
Definition at line 2561 of file sculpt.c.
References BKE_pbvh_node_fully_hidden_get(), BKE_pbvh_node_fully_masked_get(), BKE_pbvh_node_get_BB(), BKE_pbvh_node_get_original_BB(), center, data, len_squared_v3(), node, sub_v3_v3v3(), and t.
Referenced by SCULPT_cloth_brush_affected_nodes_gather(), SCULPT_fake_neighbor_search(), SCULPT_filter_cache_init(), SCULPT_nearest_vertex_get(), sculpt_pbvh_gather_cursor_update(), sculpt_pbvh_gather_generic(), and vwpaint_pbvh_gather_generic().
| void SCULPT_smooth | ( | Sculpt * | sd, |
| Object * | ob, | ||
| PBVHNode ** | nodes, | ||
| const int | totnode, | ||
| float | bstrength, | ||
| const bool | smooth_mask | ||
| ) |
Definition at line 348 of file sculpt_smooth.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_type(), BLI_assert, BLI_task_parallel_range(), CLAMP, count, data, do_smooth_brush_task_cb_ex(), fract(), Sculpt::paint, SculptSession::pbvh, PBVH_FACES, SculptSession::pmap, Object::sculpt, SCULPT_boundary_info_ensure(), SCULPT_vertex_random_access_ensure(), and type.
Referenced by do_brush_action(), do_mask_brush(), and SCULPT_do_smooth_brush().
Definition at line 7584 of file sculpt.c.
References add_v3_v3(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_pbvh_find_nearest_to_ray(), BKE_pbvh_raycast(), BKE_pbvh_type(), SculptSession::bm, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, C, SculptSession::cache, copy_v3_v3(), CTX_data_depsgraph_pointer(), depsgraph, SculptRaycastData::depth, SculptFindNearestToRayData::depth, ED_view3d_viewcontext_init(), ELEM, SculptRaycastData::face_normal, Brush::falloff_shape, SculptRaycastData::hit, SculptFindNearestToRayData::hit, SculptRaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), mul_v3_fl(), ViewContext::obact, SculptRaycastData::original, SculptFindNearestToRayData::original, StrokeCache::original, PAINT_FALLOFF_SHAPE_TUBE, SculptSession::pbvh, PBVH_BMESH, SculptRaycastData::ray_normal, SculptRaycastData::ray_start, Object::sculpt, sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), SCULPT_raycast_init(), SCULPT_stroke_modifiers_check(), and SculptRaycastData::ss.
Referenced by over_mesh(), 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(), sculpt_set_pivot_position_exec(), vpaint_exec(), vpaint_invoke(), wpaint_exec(), and wpaint_invoke().
| bool SCULPT_stroke_is_dynamic_topology | ( | const SculptSession * | ss, |
| const Brush * | brush | ||
| ) |
Definition at line 1448 of file sculpt.c.
References StrokeCache::alt_smooth, BKE_pbvh_type(), BRUSH_ANCHORED, BRUSH_DRAG_DOT, SculptSession::cache, Brush::flag, SculptSession::pbvh, PBVH_BMESH, Brush::sculpt_tool, and SCULPT_TOOL_HAS_DYNTOPO.
Referenced by calc_area_center(), calc_area_normal_and_center(), sculpt_brush_stroke_cancel(), SCULPT_is_automasking_enabled(), SCULPT_pbvh_calc_area_normal(), and sculpt_stroke_update_step().
| bool SCULPT_stroke_is_first_brush_step | ( | StrokeCache * | cache | ) |
Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes enabled.
This should be used for functionality that needs to be computed once per stroke of a particular tool (allocating memory, updating random seeds...).
Definition at line 926 of file sculpt.c.
References StrokeCache::first_time, StrokeCache::mirror_symmetry_pass, StrokeCache::radial_symmetry_pass, and StrokeCache::tile_pass.
Referenced by do_brush_action(), SCULPT_do_cloth_brush(), SCULPT_do_paint_brush(), SCULPT_do_smear_brush(), and SCULPT_enhance_details_brush().
| bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass | ( | StrokeCache * | cache | ) |
Returns true on the first brush step of each symmetry pass.
Definition at line 935 of file sculpt.c.
References StrokeCache::first_time.
Referenced by calc_sculpt_plane(), do_clay_strips_brush(), do_clay_thumb_brush(), do_pinch_brush(), do_slide_relax_brush(), paint_cursor_cursor_draw_3d_view_brush_cursor_active(), SCULPT_calc_brush_plane(), SCULPT_do_boundary_brush(), SCULPT_do_cloth_brush(), SCULPT_do_multiplane_scrape_brush(), SCULPT_do_paint_brush(), sculpt_update_brush_delta(), sculpt_update_cache_variants(), and update_sculpt_normal().
| bool SCULPT_stroke_is_main_symmetry_pass | ( | StrokeCache * | cache | ) |
Returns true when the step belongs to the stroke that is directly performed by the brush and not by one of the symmetry passes.
Definition at line 913 of file sculpt.c.
References StrokeCache::mirror_symmetry_pass, StrokeCache::radial_symmetry_pass, and StrokeCache::tile_pass.
Referenced by calc_sculpt_plane(), do_brush_action(), do_clay_thumb_brush(), and SCULPT_calc_brush_plane().
Definition at line 7327 of file sculpt.c.
References BKE_sculpt_update_object_for_edit(), BKE_sculptsession_use_pbvh_draw(), C, CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), CTX_wm_view3d(), SculptSession::deform_modifiers_active, depsgraph, Object::sculpt, ToolSettings::sculpt, sculpt_needs_connectivity_info(), and SculptSession::shapekey_active.
Referenced by sample_detail_dyntopo(), SCULPT_cursor_geometry_info_update(), sculpt_stroke_done(), SCULPT_stroke_get_location(), and sculpt_stroke_update_step().
| void SCULPT_surface_smooth_displace_step | ( | SculptSession * | ss, |
| float * | co, | ||
| float(*) | laplacian_disp[3], | ||
| const int | v_index, | ||
| const float | beta, | ||
| const float | fade | ||
| ) |
Definition at line 436 of file sculpt_smooth.c.
References add_v3_v3(), beta(), clamp_f(), fade(), SculptVertexNeighborIter::index, madd_v3_v3fl(), mul_v3_fl(), mul_v3_v3fl(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, and sub_v3_v3().
Referenced by mesh_filter_surface_smooth_displace_task_cb(), and SCULPT_do_surface_smooth_brush_displace_task_cb_ex().
| void SCULPT_surface_smooth_laplacian_step | ( | SculptSession * | ss, |
| float * | disp, | ||
| const float | co[3], | ||
| float(*) | laplacian_disp[3], | ||
| const int | v_index, | ||
| const float | origco[3], | ||
| const float | alpha | ||
| ) |
Definition at line 416 of file sculpt_smooth.c.
References add_v3_v3v3(), alpha, mul_v3_v3fl(), SCULPT_neighbor_coords_average(), and sub_v3_v3v3().
Referenced by mesh_filter_task_cb(), and SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex().
| void SCULPT_tag_update_overlays | ( | bContext * | C | ) |
Definition at line 1066 of file sculpt.c.
References BKE_sculptsession_use_pbvh_draw(), C, CTX_data_active_object(), CTX_wm_region(), CTX_wm_view3d(), DEG_id_tag_update(), ED_region_tag_redraw(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SHADING, NC_OBJECT, ND_DRAW, and WM_event_add_notifier().
Referenced by mask_flood_fill_exec(), sculpt_expand_restore_original_state(), sculpt_face_set_create_exec(), sculpt_face_set_edit_invoke(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_face_sets_randomize_colors_exec(), sculpt_gesture_apply(), sculpt_mask_filter_exec(), and sculpt_mask_init_exec().
| void SCULPT_tilt_apply_to_normal | ( | float | r_normal[3], |
| struct StrokeCache * | cache, | ||
| const float | tilt_strength | ||
| ) |
Definition at line 2849 of file sculpt.c.
References Object::imat, M_PI_2, mul_v3_mat3_m4v3(), normalize_v3(), ViewContext::obact, Object::obmat, rotate_v3_v3v3fl(), ViewContext::rv3d, SCULPT_TILT_SENSITIVITY, StrokeCache::vc, RegionView3D::viewinv, StrokeCache::x_tilt, and StrokeCache::y_tilt.
Referenced by do_clay_strips_brush(), do_fill_brush(), do_flatten_brush(), do_scrape_brush(), and SCULPT_tilt_effective_normal_get().
| void SCULPT_tilt_effective_normal_get | ( | const SculptSession * | ss, |
| const Brush * | brush, | ||
| float | r_no[3] | ||
| ) |
Definition at line 2865 of file sculpt.c.
References SculptSession::cache, copy_v3_v3(), StrokeCache::sculpt_normal_symm, SCULPT_tilt_apply_to_normal(), and Brush::tilt_strength_factor.
Referenced by do_draw_brush(), and do_draw_sharp_brush().
| BLI_INLINE bool SCULPT_tool_needs_all_pbvh_nodes | ( | const Brush * | brush | ) |
Definition at line 458 of file sculpt_intern.h.
References BRUSH_SNAKE_HOOK_DEFORM_ELASTIC, Brush::sculpt_tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_POSE, SCULPT_TOOL_SNAKE_HOOK, and Brush::snake_hook_deform_type.
Referenced by do_brush_action().
| SculptUndoNode* SCULPT_undo_get_first_node | ( | void | ) |
Definition at line 941 of file sculpt_undo.c.
References ListBase::first, UndoSculpt::nodes, NULL, and sculpt_undo_get_nodes().
Referenced by sculpt_restore_mesh().
| SculptUndoNode* SCULPT_undo_get_node | ( | PBVHNode * | node | ) |
Definition at line 930 of file sculpt_undo.c.
References BLI_findptr(), node, UndoSculpt::nodes, NULL, and sculpt_undo_get_nodes().
Referenced by paint_mesh_restore_co_task_cb(), sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), and SCULPT_undo_push_node().
| void SCULPT_undo_push_begin | ( | struct Object * | ob, |
| const char * | name | ||
| ) |
Definition at line 1383 of file sculpt_undo.c.
References BKE_undosys_step_push_init_with_type(), BKE_UNDOSYS_TYPE_SCULPT, C, Object::data, ED_undo_stack_get(), ED_undosys_stack_memfile_id_changed_tag(), Object::id, and NULL.
Referenced by ED_object_sculptmode_enter_ex(), ED_sculpt_init_transform(), ED_sculpt_undo_geometry_begin(), ED_sculpt_undo_push_multires_mesh_begin(), hide_show_exec(), mask_flood_fill_exec(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), sculpt_detail_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_dynamic_topology_disable_with_undo(), sculpt_dynamic_topology_enable_with_undo(), sculpt_expand_invoke(), sculpt_face_set_create_exec(), sculpt_face_set_edit_modify_coordinates(), sculpt_face_set_edit_modify_face_sets(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_gesture_apply(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), sculpt_mask_init_exec(), sculpt_mesh_filter_invoke(), sculpt_mode_toggle_exec(), sculpt_stroke_test_start(), and sculpt_symmetrize_exec().
| void SCULPT_undo_push_end | ( | void | ) |
Definition at line 1400 of file sculpt_undo.c.
References SCULPT_undo_push_end_ex().
Referenced by ED_object_sculptmode_enter_ex(), ED_sculpt_undo_geometry_end(), ED_sculpt_undo_push_multires_mesh_end(), hide_show_exec(), mask_flood_fill_exec(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_detail_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_dynamic_topology_disable_with_undo(), sculpt_dynamic_topology_enable_with_undo(), sculpt_expand_cancel(), sculpt_expand_finish(), sculpt_face_set_create_exec(), sculpt_face_set_edit_modify_coordinates(), sculpt_face_set_edit_modify_face_sets(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_gesture_apply(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_cancel(), sculpt_mask_expand_modal(), sculpt_mask_filter_exec(), sculpt_mask_init_exec(), sculpt_mesh_filter_modal(), sculpt_stroke_done(), and sculpt_symmetrize_exec().
| void SCULPT_undo_push_end_ex | ( | const bool | use_nested_undo | ) |
Definition at line 1405 of file sculpt_undo.c.
References BKE_undosys_stack_limit_steps_and_memory_defaults, BKE_undosys_step_push(), ED_undo_stack_get(), ListBase::first, G_MAIN, MEM_allocN_len, MEM_freeN, SculptUndoNode::next, SculptUndoNode::no, UndoSculpt::nodes, NULL, wmWindowManager::op_undo_depth, sculpt_undo_get_nodes(), UndoSculpt::undo_size, and WM_file_tag_modified().
Referenced by ED_sculpt_end_transform(), and SCULPT_undo_push_end().
| SculptUndoNode* SCULPT_undo_push_node | ( | Object * | ob, |
| PBVHNode * | node, | ||
| SculptUndoType | type | ||
| ) |
Definition at line 1292 of file sculpt_undo.c.
References BKE_pbvh_node_get_grids(), BKE_pbvh_node_get_verts(), BKE_pbvh_node_num_verts(), BLI_assert, BLI_strncpy(), BLI_thread_lock(), BLI_thread_unlock(), SculptSession::bm, copy_v3_v3(), ELEM, SculptUndoNode::grids, SculptUndoNode::index, LOCK_CUSTOM1, KeyBlock::name, SculptSession::needs_flush_to_id, node, NULL, SculptSession::pbvh, SculptSession::pivot_pos, SculptUndoNode::pivot_pos, SculptSession::pivot_rot, SculptUndoNode::pivot_rot, Object::sculpt, sculpt_undo_alloc_node(), sculpt_undo_bmesh_push(), SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_UNDO_DYNTOPO_END, SCULPT_UNDO_DYNTOPO_SYMMETRIZE, SCULPT_UNDO_FACE_SETS, sculpt_undo_face_sets_push(), SCULPT_UNDO_GEOMETRY, sculpt_undo_geometry_push(), SCULPT_undo_get_node(), SCULPT_UNDO_HIDDEN, SCULPT_UNDO_MASK, sculpt_undo_store_color(), sculpt_undo_store_coords(), sculpt_undo_store_hidden(), sculpt_undo_store_mask(), SculptSession::shapekey_active, SculptUndoNode::shapeName, SculptUndoNode::totvert, and type.
Referenced by calc_area_normal_and_center_task_cb(), do_brush_action(), do_brush_action_task_cb(), do_mask_by_color_contiguous_update_nodes_cb(), do_mask_by_color_task_cb(), ED_object_sculptmode_enter_ex(), ED_sculpt_undo_geometry_begin(), ED_sculpt_undo_geometry_end(), ED_sculpt_undo_push_multires_mesh_begin(), ED_sculpt_undo_push_multires_mesh_end(), filter_cache_init_task_cb(), mask_flood_fill_task_cb(), mask_gesture_apply_task_cb(), mask_init_task_cb(), paint_mesh_restore_co_task_cb(), partialvis_update_bmesh(), partialvis_update_grids(), partialvis_update_mesh(), project_line_gesture_apply_task_cb(), sculpt_combine_proxies_task_cb(), sculpt_detail_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_dynamic_topology_disable_with_undo(), sculpt_dynamic_topology_enable_with_undo(), sculpt_expand_undo_push(), sculpt_face_set_create_exec(), sculpt_face_set_edit_modify_coordinates(), sculpt_face_set_edit_modify_face_sets(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_gesture_face_set_begin(), sculpt_gesture_trim_begin(), sculpt_gesture_trim_end(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), SCULPT_orig_vert_data_init(), sculpt_symmetrize_exec(), sculpt_topology_update(), sculpt_transform_task_cb(), and sculpt_undo_push_all_grids().
| void SCULPT_update_object_bounding_box | ( | struct Object * | ob | ) |
Definition at line 7749 of file sculpt.c.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BKE_pbvh_bounding_box(), SculptSession::pbvh, Object::runtime, and Object::sculpt.
Referenced by SCULPT_flush_update_step(), and sculpt_undo_restore_list().
Definition at line 5763 of file sculpt.c.
References Freestyle::a, BKE_keyblock_convert_to_vertcos(), BKE_keyblock_is_basis(), BKE_keyblock_update_from_offset(), BKE_keyblock_update_from_vertcos(), BKE_mesh_calc_normals(), Key::block, MVert::co, copy_v3_v3(), Object::data, ListBase::first, Mesh::key, MEM_freeN, Mesh::mvert, KeyBlock::next, NULL, Key::refkey, KeyBlock::relative, Object::shapenr, sub_v3_v3v3(), and Mesh::totvert.
Referenced by SCULPT_flush_stroke_deform(), sculpt_undo_restore_coords(), and sculpt_update_keyblock().
| bool SCULPT_vertex_all_face_sets_visible_get | ( | const SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 465 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by SCULPT_vertex_is_boundary().
| bool SCULPT_vertex_any_face_set_visible_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 445 of file sculpt.c.
References BKE_pbvh_type(), MeshElemMap::count, SculptSession::face_sets, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::pmap.
| const float* SCULPT_vertex_co_for_grab_active_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 207 of file sculpt.c.
References BKE_pbvh_get_verts(), MVert::co, SculptSession::mvert, SculptSession::pbvh, SCULPT_vertex_co_get(), and SculptSession::shapekey_active.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive(), sculpt_geometry_preview_lines_draw(), SCULPT_geometry_preview_lines_update(), and sculpt_update_brush_delta().
| const float* SCULPT_vertex_co_get | ( | struct SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 134 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_key(), BKE_pbvh_get_grids(), BKE_pbvh_get_verts(), BKE_pbvh_type(), BM_vert_at_index(), CCG_elem_co(), CCG_elem_offset(), BMVert::co, MVert::co, SculptSession::deform_modifiers_active, CCGKey::grid_area, SculptSession::mvert, NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::shapekey_active.
Referenced by automask_floodfill_cb(), boundary_floodfill_cb(), boundary_initial_vertex_floodfill_cb(), cloth_brush_add_length_constraint(), do_boundary_brush_smooth_task_cb_ex(), do_displacement_smear_brush(), do_displacement_smear_store_prev_disp_task_cb_ex(), do_smear_brush_task_cb_exec(), do_topology_slide_task_cb_ex(), dyntopo_detail_size_sample_from_surface(), mesh_filter_enhance_details_init_directions(), mesh_filter_sharpen_init(), mesh_filter_task_cb(), neighbor_dirty_mask(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_preview_boundary_data_pivot_draw(), pose_face_sets_floodfill_cb(), pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), pose_topology_floodfill_cb(), sample_detail_voxel(), SCULPT_active_vertex_co_get(), sculpt_boundary_bend_data_init(), SCULPT_boundary_edges_preview_draw(), sculpt_boundary_edit_data_init(), sculpt_boundary_indices_init(), SCULPT_boundary_pivot_line_preview_draw(), sculpt_boundary_slide_data_init(), sculpt_boundary_twist_data_init(), SCULPT_cloth_brush_simulation_init(), SCULPT_cloth_brush_store_simulation_state(), sculpt_cloth_filter_modal(), SCULPT_enhance_details_brush(), sculpt_expand_falloff_value_vertex_get(), sculpt_expand_get_vertex_index_for_symmetry_pass(), sculpt_expand_reposition_pivot(), sculpt_expand_spherical_falloff_create(), SCULPT_fake_neighbor_search(), SCULPT_floodfill_add_initial_with_symmetry(), SCULPT_geodesic_fallback_create(), SCULPT_geodesic_from_vertex_and_symm(), sculpt_gesture_trim_calculate_depth(), SCULPT_neighbor_coords_average(), SCULPT_neighbor_coords_average_interior(), SCULPT_relax_vertex(), sculpt_set_persistent_base_exec(), SCULPT_vertex_co_for_grab_active_get(), SCULPT_vertex_limit_surface_get(), and SCULPT_vertex_persistent_co_get().
| const float* SCULPT_vertex_color_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 157 of file sculpt.c.
References BKE_pbvh_type(), MPropCol::color, NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::vcol.
Referenced by do_mask_by_color_task_cb(), do_smear_store_prev_colors_task_cb_exec(), SCULPT_do_smear_brush(), sculpt_expand_original_state_store(), sculpt_mask_by_color_contiguous(), sculpt_mask_by_color_contiguous_floodfill_cb(), SCULPT_neighbor_color_average(), and sculpt_sample_color_invoke().
| bool SCULPT_vertex_colors_poll | ( | struct bContext * | C | ) |
Definition at line 6607 of file sculpt.c.
References C, and SCULPT_mode_poll().
Referenced by SCULPT_OT_color_filter(), SCULPT_OT_loop_to_vertex_colors(), SCULPT_OT_mask_by_color(), SCULPT_OT_sample_color(), and SCULPT_OT_vertex_to_loop_colors().
| int SCULPT_vertex_count_get | ( | struct SculptSession * | ss | ) |
Definition at line 120 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_num_vertices(), BKE_pbvh_type(), BM_mesh_elem_count(), BM_VERT, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totvert.
Referenced by cloth_brush_apply_brush_foces(), do_brush_action(), do_displacement_smear_brush(), do_layer_brush(), mesh_filter_enhance_details_init_directions(), mesh_filter_init_limit_surface_co(), mesh_filter_sharpen_init(), mesh_filter_surface_smooth_init(), pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), pose_ik_chain_init_topology(), SCULPT_automasking_cache_init(), SCULPT_boundary_automasking_init(), sculpt_boundary_bend_data_init(), sculpt_boundary_edit_data_init(), sculpt_boundary_falloff_factor_init(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), sculpt_boundary_slide_data_init(), SCULPT_cloth_brush_simulation_create(), SCULPT_cloth_brush_simulation_init(), SCULPT_cloth_brush_store_simulation_state(), sculpt_cloth_filter_modal(), SCULPT_connected_components_ensure(), SCULPT_do_smear_brush(), SCULPT_enhance_details_brush(), sculpt_expand_bitmap_from_enabled(), sculpt_expand_boundary_from_enabled(), sculpt_expand_boundary_topology_falloff_create(), sculpt_expand_diagonals_falloff_create(), sculpt_expand_geodesics_from_state_boundary(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_expand_invoke(), sculpt_expand_modal(), sculpt_expand_normal_falloff_create(), sculpt_expand_original_state_store(), sculpt_expand_reposition_pivot(), sculpt_expand_spherical_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_expand_update_max_vert_falloff_value(), sculpt_face_set_create_exec(), sculpt_face_set_edit_fair_face_set(), sculpt_face_sets_automasking_init(), sculpt_face_sets_change_visibility_exec(), SCULPT_fake_neighbor_init(), SCULPT_fake_neighbors_ensure(), SCULPT_floodfill_init(), SCULPT_geometry_preview_lines_update(), sculpt_gesture_trim_calculate_depth(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), sculpt_pose_grow_pose_factor(), sculpt_set_persistent_base_exec(), and SCULPT_topology_automasking_init().
| int SCULPT_vertex_face_set_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 514 of file sculpt.c.
References abs(), BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by mask_init_task_cb(), pose_face_sets_fk_find_masked_floodfill_cb(), pose_face_sets_floodfill_cb(), and sculpt_expand_state_get().
| void SCULPT_vertex_face_set_set | ( | SculptSession * | ss, |
| int | index, | ||
| int | face_set | ||
| ) |
Definition at line 489 of file sculpt.c.
References abs(), BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by do_draw_face_sets_brush_task_cb_ex(), face_set_gesture_apply_task_cb(), sculpt_expand_task_cb(), and sculpt_face_set_create_exec().
| bool SCULPT_vertex_has_face_set | ( | SculptSession * | ss, |
| int | index, | ||
| int | face_set | ||
| ) |
Definition at line 539 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by cloth_filter_apply_forces_task_cb(), pose_face_sets_fk_find_masked_floodfill_cb(), pose_face_sets_fk_set_weights_floodfill_cb(), pose_face_sets_floodfill_cb(), pose_ik_chain_init_face_sets_fk(), SCULPT_automasking_factor_get(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_face_set_edit_fair_face_set(), and sculpt_face_sets_automasking_init().
| bool SCULPT_vertex_has_unique_face_set | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 669 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_coarse_mesh_adjacency_info_get(), CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, SculptSession::mloop, SculptSession::mpoly, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, sculpt_check_unique_face_set_for_edge_in_base_mesh(), sculpt_check_unique_face_set_in_base_mesh(), SculptSession::subdiv_ccg, SUBDIV_CCG_ADJACENT_EDGE, SUBDIV_CCG_ADJACENT_NONE, SUBDIV_CCG_ADJACENT_VERTEX, v1, and v2.
Referenced by do_relax_face_sets_brush_task_cb_ex(), mesh_filter_task_cb(), pose_face_sets_fk_find_masked_floodfill_cb(), pose_face_sets_floodfill_cb(), SCULPT_automasking_factor_get(), SCULPT_boundary_automasking_init(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_face_set_edit_fair_face_set(), and SCULPT_relax_vertex().
| bool SCULPT_vertex_is_boundary | ( | const SculptSession * | ss, |
| const int | index | ||
| ) |
Definition at line 868 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_coarse_mesh_adjacency_info_get(), SculptSession::bm, BM_vert_at_index(), BM_vert_is_boundary(), CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, SculptSession::mloop, SculptSession::mpoly, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, sculpt_check_boundary_vertex_in_base_mesh(), SCULPT_vertex_all_face_sets_visible_get(), SculptSession::subdiv_ccg, SUBDIV_CCG_ADJACENT_EDGE, SUBDIV_CCG_ADJACENT_NONE, SUBDIV_CCG_ADJACENT_VERTEX, v, v1, and v2.
Referenced by boundary_floodfill_cb(), boundary_initial_vertex_floodfill_cb(), SCULPT_automasking_factor_get(), SCULPT_boundary_automasking_init(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_is_vertex_in_editable_boundary(), sculpt_expand_boundary_from_enabled(), sculpt_expand_invoke(), sculpt_face_set_edit_fair_face_set(), SCULPT_neighbor_coords_average_interior(), and SCULPT_relax_vertex().
| void SCULPT_vertex_limit_surface_get | ( | SculptSession * | ss, |
| int | index, | ||
| float | r_co[3] | ||
| ) |
Definition at line 224 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_eval_limit_point(), copy_v3_v3(), CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SCULPT_vertex_co_get(), and SculptSession::subdiv_ccg.
Referenced by do_displacement_eraser_brush_task_cb_ex(), do_displacement_smear_brush(), do_displacement_smear_brush_task_cb_ex(), and mesh_filter_init_limit_surface_co().
| float SCULPT_vertex_mask_get | ( | struct SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 254 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_key(), BKE_pbvh_get_grids(), BKE_pbvh_type(), SculptSession::bm, BM_ELEM_CD_GET_VOID_P, BM_vert_at_index(), CCG_elem_mask(), CCG_elem_offset(), CD_PAINT_MASK, CustomData_get_offset(), CCGKey::grid_area, mask(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, v, BMesh::vdata, and SculptSession::vmask.
Referenced by cloth_brush_satisfy_constraints(), sculpt_expand_original_state_store(), sculpt_face_set_create_exec(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), and SCULPT_neighbor_mask_average().
| void SCULPT_vertex_neighbors_get | ( | struct SculptSession * | ss, |
| const int | index, | ||
| const bool | include_duplicates, | ||
| SculptVertexNeighborIter * | iter | ||
| ) |
Definition at line 844 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, sculpt_vertex_neighbors_get_bmesh(), sculpt_vertex_neighbors_get_faces(), and sculpt_vertex_neighbors_get_grids().
| void SCULPT_vertex_normal_get | ( | SculptSession * | ss, |
| int | index, | ||
| float | no[3] | ||
| ) |
Definition at line 172 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_key(), BKE_pbvh_get_grids(), BKE_pbvh_get_verts(), BKE_pbvh_type(), BM_vert_at_index(), CCG_elem_no(), CCG_elem_offset(), copy_v3_v3(), SculptSession::deform_modifiers_active, CCGKey::grid_area, SculptSession::mvert, BMVert::no, MVert::no, normal_short_to_float_v3(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::shapekey_active.
Referenced by cloth_filter_apply_forces_task_cb(), mask_expand_floodfill_cb(), mask_expand_normal_floodfill_cb(), SCULPT_active_vertex_normal_get(), sculpt_boundary_bend_data_init(), sculpt_expand_normal_falloff_create(), sculpt_gesture_is_vertex_effected(), SCULPT_relax_vertex(), sculpt_set_persistent_base_exec(), and SCULPT_vertex_persistent_normal_get().
| const float* SCULPT_vertex_persistent_co_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 199 of file sculpt.c.
References SculptPersistentBase::co, SculptSession::persistent_base, and SCULPT_vertex_co_get().
Referenced by cloth_brush_add_length_constraint(), and do_layer_brush_task_cb_ex().
| void SCULPT_vertex_persistent_normal_get | ( | SculptSession * | ss, |
| int | index, | ||
| float | no[3] | ||
| ) |
Definition at line 245 of file sculpt.c.
References copy_v3_v3(), SculptPersistentBase::no, SculptSession::persistent_base, and SCULPT_vertex_normal_get().
Referenced by do_layer_brush_task_cb_ex().
| void SCULPT_vertex_random_access_ensure | ( | struct SculptSession * | ss | ) |
Definition at line 112 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::bm, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, SculptSession::pbvh, and PBVH_BMESH.
Referenced by dyntopo_detail_size_edit_invoke(), ED_sculpt_init_transform(), ED_sculpt_update_modal_transform(), sample_detail_voxel(), SCULPT_automasking_cache_init(), SCULPT_boundary_data_init(), sculpt_cloth_filter_invoke(), sculpt_cloth_filter_modal(), SCULPT_cursor_geometry_info_update(), sculpt_dirty_mask_exec(), SCULPT_enhance_details_brush(), sculpt_expand_ensure_sculptsession_data(), sculpt_face_sets_change_visibility_invoke(), SCULPT_floodfill_init(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), sculpt_mesh_filter_invoke(), sculpt_mesh_filter_modal(), SCULPT_pose_calc_pose_data(), sculpt_set_persistent_base_exec(), SCULPT_smooth(), sculpt_trim_gesture_box_invoke(), and sculpt_trim_gesture_lasso_invoke().
| bool SCULPT_vertex_visible_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 362 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_get_grid_visibility(), BKE_pbvh_type(), BLI_BITMAP_TEST, SculptSession::bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_vert_at_index(), MVert::flag, CCGKey::grid_area, ME_HIDE, SculptSession::mvert, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, and PBVH_GRIDS.
Referenced by boundary_initial_vertex_floodfill_cb(), sculpt_boundary_edit_data_init(), sculpt_boundary_is_vertex_in_editable_boundary(), sculpt_expand_state_get(), sculpt_face_set_create_exec(), sculpt_face_sets_change_visibility_exec(), SCULPT_floodfill_execute(), SCULPT_visibility_sync_all_vertex_to_face_sets(), and sculpt_visibility_sync_vertex_to_face_sets().
| void SCULPT_vertex_visible_set | ( | SculptSession * | ss, |
| int | index, | ||
| bool | visible | ||
| ) |
Definition at line 347 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::bm, BM_elem_flag_set, BM_ELEM_HIDDEN, BM_vert_at_index(), MVert::flag, ME_HIDE, ME_VERT_PBVH_UPDATE, SculptSession::mvert, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SET_FLAG_FROM_TEST.
| void SCULPT_visibility_sync_all_face_sets_to_vertices | ( | struct Object * | ob | ) |
Definition at line 563 of file sculpt.c.
References BKE_object_get_original_mesh(), BKE_pbvh_type(), BKE_sculpt_sync_face_sets_visibility_to_base_mesh(), BKE_sculpt_sync_face_sets_visibility_to_grids(), mesh, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, Object::sculpt, and SculptSession::subdiv_ccg.
Referenced by face_set_edit_do_post_visibility_updates(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), and sculpt_undo_restore_list().
| void SCULPT_visibility_sync_all_vertex_to_face_sets | ( | struct SculptSession * | ss | ) |
Definition at line 598 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, l, MPoly::loopstart, SculptSession::mloop, SculptSession::mpoly, SculptSession::pbvh, PBVH_FACES, SCULPT_vertex_visible_get(), SculptSession::totfaces, MPoly::totloop, and MLoop::v.
Referenced by hide_show_exec(), and sculpt_undo_restore_list().