Blender
V3.3
|
#include "DNA_brush_types.h"
#include "DNA_key_types.h"
#include "DNA_listBase.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
#include "DNA_vec_types.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BLI_bitmap.h"
#include "BLI_compiler_attrs.h"
#include "BLI_compiler_compat.h"
#include "BLI_gsqueue.h"
#include "BLI_threads.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 | FilterCache |
struct | StrokeCache |
struct | ExpandCache |
Dynamic topology | |
enum | eDynTopoWarnFlag { DYNTOPO_WARN_VDATA = (1 << 0) , DYNTOPO_WARN_EDATA = (1 << 1) , DYNTOPO_WARN_LDATA = (1 << 2) , DYNTOPO_WARN_MODIFIER = (1 << 3) } |
void | SCULPT_dynamic_topology_enable_ex (struct Main *bmain, struct Depsgraph *depsgraph, Scene *scene, Object *ob) |
void | SCULPT_dynamic_topology_disable (bContext *C, struct SculptUndoNode *unode) |
void | sculpt_dynamic_topology_disable_with_undo (struct Main *bmain, struct Depsgraph *depsgraph, Scene *scene, Object *ob) |
bool | SCULPT_stroke_is_dynamic_topology (const SculptSession *ss, const Brush *brush) |
void | SCULPT_dynamic_topology_triangulate (struct BMesh *bm) |
void | SCULPT_dyntopo_node_layers_add (struct SculptSession *ss) |
enum eDynTopoWarnFlag | SCULPT_dynamic_topology_check (Scene *scene, Object *ob) |
#define EXPAND_SYMM_AREAS 8 |
Definition at line 663 of file sculpt_intern.h.
#define FAKE_NEIGHBOR_NONE -1 |
Definition at line 978 of file sculpt_intern.h.
#define SCULPT_CLAY_STABILIZER_LEN 10 |
Definition at line 391 of file sculpt_intern.h.
#define SCULPT_RAKE_BRUSH_FACTOR 0.25f |
Definition at line 201 of file sculpt_intern.h.
#define SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN | ( | ss, | |
v_index, | |||
neighbor_iterator | |||
) |
Iterate over neighboring and duplicate vertices (for PBVH_GRIDS). Duplicates come first since they are nearest for floodfill.
Definition at line 953 of file sculpt_intern.h.
#define SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY 256 |
Definition at line 58 of file sculpt_intern.h.
#define SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN | ( | ss, | |
v_index, | |||
neighbor_iterator | |||
) |
Iterator over neighboring vertices.
Definition at line 945 of file sculpt_intern.h.
#define SCULPT_VERTEX_NEIGHBORS_ITER_END | ( | neighbor_iterator | ) |
Definition at line 961 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 355 of file sculpt_intern.h.
typedef struct SculptCursorGeometryInfo SculptCursorGeometryInfo |
typedef enum SculptFilterOrientation SculptFilterOrientation |
typedef struct SculptThreadedTaskData SculptThreadedTaskData |
Generic thread data. The size of this struct has gotten a little out of hand; normally we would split it up, but it might be better to see if we can't eliminate it altogether after moving to C++ (where we'll be able to use lambdas).
typedef struct SculptUndoNode SculptUndoNode |
typedef struct SculptUndoNodeGeometry SculptUndoNodeGeometry |
typedef enum SculptUpdateType SculptUpdateType |
typedef struct SculptVertexNeighborIter SculptVertexNeighborIter |
typedef struct StrokeCache StrokeCache |
This structure contains all the temporary data needed for individual brush strokes.
Enumerator | |
---|---|
AUTOMASK_INIT_BOUNDARY_EDGES | |
AUTOMASK_INIT_BOUNDARY_FACE_SETS |
Definition at line 99 of file sculpt_intern.h.
enum eDynTopoWarnFlag |
Enumerator | |
---|---|
DYNTOPO_WARN_VDATA | |
DYNTOPO_WARN_EDATA | |
DYNTOPO_WARN_LDATA | |
DYNTOPO_WARN_MODIFIER |
Definition at line 1238 of file sculpt_intern.h.
Definition at line 641 of file sculpt_intern.h.
Enumerator | |
---|---|
SCULPT_EXPAND_RECURSION_TOPOLOGY | |
SCULPT_EXPAND_RECURSION_GEODESICS |
Definition at line 658 of file sculpt_intern.h.
Enumerator | |
---|---|
SCULPT_EXPAND_TARGET_MASK | |
SCULPT_EXPAND_TARGET_FACE_SETS | |
SCULPT_EXPAND_TARGET_COLORS |
Definition at line 652 of file sculpt_intern.h.
Enumerator | |
---|---|
SCULPT_FILTER_ORIENTATION_LOCAL | |
SCULPT_FILTER_ORIENTATION_WORLD | |
SCULPT_FILTER_ORIENTATION_VIEW |
Definition at line 377 of file sculpt_intern.h.
Enumerator | |
---|---|
SCULPT_TRANSFORM_DISPLACEMENT_ORIGINAL | |
SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL |
Definition at line 384 of file sculpt_intern.h.
enum SculptUndoType |
Definition at line 106 of file sculpt_intern.h.
enum SculptUpdateType |
Enumerator | |
---|---|
SCULPT_UPDATE_COORDS | |
SCULPT_UPDATE_MASK | |
SCULPT_UPDATE_VISIBILITY | |
SCULPT_UPDATE_COLOR | |
SCULPT_UPDATE_IMAGE |
Definition at line 44 of file sculpt_intern.h.
int SCULPT_active_face_set_get | ( | SculptSession * | ss | ) |
Definition at line 325 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 279 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 271 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 284 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 52 of file sculpt_automasking.cc.
References FilterCache::automasking, StrokeCache::automasking, SculptSession::cache, and SculptSession::filter_cache.
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 150 of file sculpt_automasking.cc.
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 324 of file sculpt_automasking.cc.
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, 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 117 of file sculpt_automasking.cc.
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().
For bmesh: Average surrounding verts based on an orthogonality measure. Naturally converges to a quad-like structure.
Definition at line 89 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().
void SCULPT_bmesh_topology_rake | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode, | ||
float | bstrength | ||
) |
Definition at line 2745 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), clamp_f(), count, data, do_topology_rake_bmesh_task_cb_ex(), and Sculpt::paint.
Referenced by do_brush_action().
float* SCULPT_boundary_automasking_init | ( | Object * | ob, |
eBoundaryAutomaskMode | mode, | ||
int | propagation_steps, | ||
float * | automask_factor | ||
) |
Definition at line 256 of file sculpt_automasking.cc.
References AUTOMASK_INIT_BOUNDARY_EDGES, AUTOMASK_INIT_BOUNDARY_FACE_SETS, BLI_assert_msg, EDGE_DISTANCE_INF, float(), SculptVertexNeighborIter::index, MEM_callocN, MEM_SAFE_FREE, 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 515 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, | ||
int | initial_vertex, | ||
float | radius | ||
) |
Main function to get SculptBoundary data both for brush deformation and viewport preview. Can return NULL if there is no boundary from the given vertex using the given radius.
Definition at line 474 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 | ( | uint | gpuattr, |
struct SculptSession * | ss, | ||
const float | outline_col[3], | ||
float | outline_alpha | ||
) |
Definition at line 1010 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().
Definition at line 5848 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, and SculptSession::vertex_info.
Referenced by SCULPT_automasking_cache_init(), SCULPT_boundary_data_init(), SCULPT_do_draw_face_sets_brush(), SCULPT_do_slide_relax_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 | ( | uint | gpuattr, |
struct SculptSession * | ss | ||
) |
Definition at line 1028 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, |
int | deform_target, | ||
PBVHVertexIter * | iter | ||
) |
Returns the pointer to the coordinates that should be edited from a brush tool iterator depending on the given deformation target.
Definition at line 304 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 1703 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_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), 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(), and vpaint_do_draw().
float SCULPT_brush_plane_offset_get | ( | Sculpt * | sd, |
SculptSession * | ss | ||
) |
Definition at line 3002 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 SCULPT_do_clay_brush(), SCULPT_do_clay_strips_brush(), SCULPT_do_clay_thumb_brush(), SCULPT_do_fill_brush(), SCULPT_do_flatten_brush(), SCULPT_do_multiplane_scrape_brush(), and SCULPT_do_scrape_brush().
float SCULPT_brush_strength_factor | ( | struct SculptSession * | ss, |
const struct Brush * | br, | ||
const float | point[3], | ||
float | len, | ||
const float | vno[3], | ||
const float | fno[3], | ||
float | mask, | ||
int | vertex_index, | ||
int | thread_id | ||
) |
Return a multiplier for brush strength on a particular vertex.
bool SCULPT_brush_test_circle_sq | ( | SculptBrushTest * | test, |
const float | co[3] | ||
) |
Definition at line 1621 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], | ||
float | roundness | ||
) |
Definition at line 1639 of file sculpt.c.
References copy_v3_fl(), SculptBrushTest::dist, fabsf, len_v2v2(), 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 | ||
) |
Initialize a point-in-brush test
Definition at line 1532 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(), blender::ed::sculpt_paint::paint::image::init_triangle_brush_test(), and SCULPT_brush_test_init_with_falloff_shape().
SculptBrushTestFn SCULPT_brush_test_init_with_falloff_shape | ( | SculptSession * | ss, |
SculptBrushTest * | test, | ||
char | falloff_shape | ||
) |
Initialize a point-in-brush test with a given falloff shape.
falloff_shape | PAINT_FALLOFF_SHAPE_SPHERE or PAINT_FALLOFF_SHAPE_TUBE. |
Definition at line 1686 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(), calculate_average_color(), 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_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), 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(), SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex(), and vpaint_do_draw().
bool SCULPT_brush_test_sphere | ( | SculptBrushTest * | test, |
const float | co[3] | ||
) |
Definition at line 1583 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 1613 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 1599 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, |
char | symm, | ||
char | axis, | ||
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 3767 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 | ) |
Definition at line 4055 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_colors_vpaint, 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_center | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
float | r_area_co[3] | ||
) |
Definition at line 2054 of file sculpt.c.
References AreaNormalCenterTLSData::area_cos, ARRAY_SIZE, BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::bm, SculptSession::cache, calc_area_normal_and_center_reduce(), calc_area_normal_and_center_task_cb(), copy_v3_v3(), AreaNormalCenterTLSData::count_co, data, TaskParallelSettings::func_reduce, StrokeCache::location, mul_v3_v3fl(), NULL, Sculpt::paint, Object::sculpt, SCULPT_stroke_is_dynamic_topology(), TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, and zero_v3().
Referenced by calc_sculpt_plane(), and SCULPT_calc_brush_plane().
void SCULPT_calc_area_normal | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
float | r_area_no[3] | ||
) |
Definition at line 2103 of file sculpt.c.
References BKE_paint_brush(), Sculpt::paint, and SCULPT_pbvh_calc_area_normal().
Referenced by calc_sculpt_normal(), SCULPT_do_clay_strips_brush(), SCULPT_do_clay_thumb_brush(), SCULPT_do_multiplane_scrape_brush(), and SCULPT_do_paint_brush().
void SCULPT_calc_area_normal_and_center | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
float | r_area_no[3], | ||
float | r_area_co[3] | ||
) |
This calculates flatten center and area normal together, amortizing the memory bandwidth and loop overhead to calculate both at the same time.
Definition at line 2151 of file sculpt.c.
References AreaNormalCenterTLSData::area_cos, AreaNormalCenterTLSData::area_nos, ARRAY_SIZE, BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::bm, SculptSession::cache, calc_area_normal_and_center_reduce(), calc_area_normal_and_center_task_cb(), copy_v3_v3(), AreaNormalCenterTLSData::count_co, data, TaskParallelSettings::func_reduce, StrokeCache::location, mul_v3_v3fl(), normalize_v3_v3(), NULL, Sculpt::paint, Object::sculpt, SCULPT_stroke_is_dynamic_topology(), TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, and zero_v3().
Referenced by calc_sculpt_plane(), and SCULPT_calc_brush_plane().
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 2901 of file sculpt.c.
References add_v3_v3(), ARRAY_SET_ITEMS, BKE_paint_brush(), BRUSH_ORIGINAL_NORMAL, BRUSH_ORIGINAL_PLANE, SculptSession::cache, 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_calc_area_center(), SCULPT_calc_area_normal_and_center(), 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(), SCULPT_do_clay_brush(), SCULPT_do_clay_strips_brush(), SCULPT_do_clay_thumb_brush(), SCULPT_do_fill_brush(), SCULPT_do_flatten_brush(), SCULPT_do_multiplane_scrape_brush(), and SCULPT_do_scrape_brush().
Definition at line 923 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().
float SCULPT_clay_thumb_get_stabilized_pressure | ( | struct StrokeCache * | cache | ) |
Definition at line 643 of file sculpt_brush_types.c.
References StrokeCache::clay_pressure_stabilizer, and SCULPT_CLAY_STABILIZER_LEN.
Referenced by sculpt_brush_dynamic_size_get(), and SCULPT_do_clay_thumb_brush().
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 2540 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 106 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 908 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], | ||
float | radius | ||
) |
Definition at line 1089 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 Object * | ob, |
float | cloth_mass, | ||
float | cloth_damping, | ||
float | cloth_softbody_strength, | ||
bool | use_collisions, | ||
bool | needs_deform_coords | ||
) |
Definition at line 1036 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, Object::sculpt, 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 1126 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 1145 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 | ( | uint | gpuattr, |
struct SculptSession * | ss, | ||
const float | outline_col[3], | ||
float | outline_alpha | ||
) |
Definition at line 1283 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 1153 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 1234 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 | ( | uint | gpuattr, |
const struct Brush * | brush, | ||
const float | location[3], | ||
const float | normal[3], | ||
float | rds, | ||
float | line_width, | ||
const float | outline_col[3], | ||
float | alpha | ||
) |
Cursor drawing function.
Definition at line 3646 of file sculpt.c.
References BKE_pbvh_gather_proxies(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, MEM_SAFE_FREE, SculptSession::pbvh, Object::sculpt, and sculpt_combine_proxies_task_cb().
Referenced by sculpt_transform_radius_elastic().
Definition at line 5815 of file sculpt.c.
References SculptVertexInfo::connected_component, data, MEM_malloc_arrayN, blender::threading::enumerable_thread_specific_utils::next_id, 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 | ||
) |
Gets the normal, location and active vertex location of the geometry under the cursor. This also updates the active vertex and cursor related data of the SculptSession using the mouse position
Definition at line 4835 of file sculpt.c.
References SculptRaycastData::active_face_grid_index, SculptSession::active_face_index, SculptSession::active_grid_index, 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(), MEM_SAFE_FREE, mul_m3_v3(), mul_v3_fl(), normalize_v3_v3(), ViewContext::obact, Object::obmat, SculptRaycastData::original, usdtokens::out(), 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_stroke_test_start(), 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 928 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_clay_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 955 of file sculpt_brush_types.c.
References add_v3_v3(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), StrokeCache::bstrength, SculptSession::cache, calc_clay_surface_reduce(), calc_clay_surface_task_cb(), copy_v3_v3(), data, do_clay_brush_task_cb_ex(), fabsf, TaskParallelSettings::func_reduce, StrokeCache::initial_radius, StrokeCache::location, min_ff(), mul_v3_fl(), mul_v3_v3v3(), NULL, offset, Sculpt::paint, ClaySampleData::plane_dist, StrokeCache::radius, StrokeCache::scale, Object::sculpt, SCULPT_brush_plane_offset_get(), SCULPT_calc_brush_plane(), SculptThreadedTaskData::sd, TaskParallelSettings::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by do_brush_action().
void SCULPT_do_clay_strips_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1081 of file sculpt_brush_types.c.
References add_v3_v3(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), BRUSH_ORIGINAL_NORMAL, StrokeCache::bstrength, SculptSession::cache, copy_v3_v3(), cross_v3_v3v3(), data, do_clay_strips_brush_task_cb_ex(), Brush::flag, StrokeCache::grab_delta_symmetry, invert_m4_m4(), is_zero_v3(), madd_v3_v3v3fl(), mul_m4_m4m4(), mul_v3_fl(), mul_v3_v3v3(), normalize_m4(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, scale_m4_fl(), 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(), SCULPT_tilt_apply_to_normal(), and Brush::tilt_strength_factor.
Referenced by do_brush_action().
void SCULPT_do_clay_thumb_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 652 of file sculpt_brush_types.c.
References add_v3_v3(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), BRUSH_ORIGINAL_NORMAL, StrokeCache::bstrength, SculptSession::cache, clamp_f(), StrokeCache::clay_thumb_front_angle, copy_v3_v3(), cross_v3_v3v3(), data, do_clay_thumb_brush_task_cb_ex(), Brush::flag, StrokeCache::grab_delta_symmetry, invert_m4_m4(), is_zero_v3(), StrokeCache::location, mul_m4_m4m4(), mul_v3_fl(), mul_v3_v3v3(), normalize_m4(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, scale_m4_fl(), Object::sculpt, SCULPT_brush_plane_offset_get(), SCULPT_calc_area_normal(), SCULPT_calc_brush_plane(), SCULPT_clay_thumb_get_stabilized_pressure(), SCULPT_DISP_DIR_AREA, Brush::sculpt_plane, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), and SCULPT_stroke_is_main_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 1179 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().
void SCULPT_do_crease_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1786 of file sculpt_brush_types.c.
References BKE_brush_alpha_get(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), StrokeCache::bstrength, SculptSession::cache, Brush::crease_pinch_factor, data, do_crease_brush_task_cb_ex(), mul_v3_fl(), mul_v3_v3(), mul_v3_v3fl(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, scene, ViewContext::scene, Object::sculpt, StrokeCache::sculpt_normal_symm, sculpt_project_v3_cache_init(), Brush::sculpt_tool, SCULPT_TOOL_BLOB, and StrokeCache::vc.
Referenced by do_brush_action().
void SCULPT_do_displacement_eraser_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2520 of file sculpt_brush_types.c.
References BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), Brush::curve, data, do_displacement_eraser_brush_task_cb_ex(), and Sculpt::paint.
Referenced by do_brush_action().
void SCULPT_do_displacement_smear_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2647 of file sculpt_brush_types.c.
References BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, Brush::curve, data, do_displacement_smear_brush_task_cb_ex(), do_displacement_smear_store_prev_disp_task_cb_ex(), StrokeCache::limit_surface_co, MEM_malloc_arrayN, Sculpt::paint, StrokeCache::prev_displacement, Object::sculpt, SCULPT_vertex_co_get(), SCULPT_vertex_count_get(), SCULPT_vertex_limit_surface_get(), and sub_v3_v3v3().
Referenced by do_brush_action().
void SCULPT_do_draw_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 329 of file sculpt_brush_types.c.
References BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), StrokeCache::bstrength, SculptSession::cache, Brush::curve, data, do_draw_brush_task_cb_ex(), mul_v3_fl(), mul_v3_v3(), mul_v3_v3fl(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, Object::sculpt, and SCULPT_tilt_effective_normal_get().
Referenced by do_brush_action().
Definition at line 224 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().
void SCULPT_do_draw_sharp_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2200 of file sculpt_brush_types.c.
References BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), StrokeCache::bstrength, SculptSession::cache, Brush::curve, data, do_draw_sharp_brush_task_cb_ex(), mul_v3_fl(), mul_v3_v3(), mul_v3_v3fl(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, Object::sculpt, and SCULPT_tilt_effective_normal_get().
Referenced by do_brush_action().
void SCULPT_do_elastic_deform_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2122 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, copy_v3_v3(), data, do_elastic_deform_brush_task_cb_ex(), StrokeCache::grab_delta_symmetry, StrokeCache::normal_weight, Sculpt::paint, Object::sculpt, and sculpt_project_v3_normal_align().
Referenced by do_brush_action().
void SCULPT_do_fill_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 427 of file sculpt_brush_types.c.
References add_v3_v3(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, data, do_fill_brush_task_cb_ex(), mul_v3_fl(), mul_v3_v3v3(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, Object::sculpt, SCULPT_brush_plane_offset_get(), SCULPT_calc_brush_plane(), SCULPT_tilt_apply_to_normal(), and Brush::tilt_strength_factor.
Referenced by do_brush_action().
void SCULPT_do_flatten_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 799 of file sculpt_brush_types.c.
References add_v3_v3(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, data, do_flatten_brush_task_cb_ex(), mul_v3_fl(), mul_v3_v3v3(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, Object::sculpt, SCULPT_brush_plane_offset_get(), SCULPT_calc_brush_plane(), SCULPT_tilt_apply_to_normal(), and Brush::tilt_strength_factor.
Referenced by do_brush_action().
void SCULPT_do_grab_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2014 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, copy_v3_v3(), data, do_grab_brush_task_cb_ex(), StrokeCache::grab_delta_symmetry, StrokeCache::normal_weight, Sculpt::paint, Object::sculpt, and sculpt_project_v3_normal_align().
Referenced by do_brush_action().
void SCULPT_do_inflate_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1633 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, do_inflate_brush_task_cb_ex(), and Sculpt::paint.
Referenced by do_brush_action().
void SCULPT_do_layer_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1560 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, data, do_layer_brush_task_cb_ex(), StrokeCache::layer_displacement_factor, MEM_callocN, NULL, Sculpt::paint, Object::sculpt, and SCULPT_vertex_count_get().
Referenced by do_brush_action().
void SCULPT_do_mask_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2832 of file sculpt_brush_types.c.
References BKE_paint_brush(), BRUSH_MASK_DRAW, BRUSH_MASK_SMOOTH, StrokeCache::bstrength, SculptSession::cache, Brush::mask_tool, Sculpt::paint, Object::sculpt, SCULPT_do_mask_brush_draw(), and SCULPT_smooth().
Referenced by do_brush_action().
void SCULPT_do_mask_brush_draw | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2815 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, do_mask_brush_draw_task_cb_ex(), and Sculpt::paint.
Referenced by SCULPT_do_mask_brush().
Definition at line 211 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, offset, 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().
void SCULPT_do_nudge_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1692 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, copy_v3_v3(), cross_v3_v3v3(), data, do_nudge_brush_task_cb_ex(), StrokeCache::grab_delta_symmetry, Sculpt::paint, Object::sculpt, and StrokeCache::sculpt_normal_symm.
Referenced by do_brush_action().
void SCULPT_do_paint_brush | ( | struct PaintModeSettings * | paint_mode_settings, |
Sculpt * | sd, | ||
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 256 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, float(), 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_do_paint_brush_image(), SCULPT_has_colors(), SCULPT_stroke_is_first_brush_step(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SCULPT_use_image_paint_brush(), SculptThreadedTaskData::sd, Brush::tip_roundness, Brush::tip_scale_x, SampleWetPaintTLSData::tot_samples, TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, StrokeCache::wet_mix, StrokeCache::wet_mix_prev_color, StrokeCache::wet_persistence, and zero_v4().
Referenced by do_brush_action().
void SCULPT_do_paint_brush_image | ( | struct PaintModeSettings * | paint_mode_settings, |
Sculpt * | sd, | ||
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 489 of file sculpt_paint_image.cc.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, blender::ed::sculpt_paint::paint::image::do_mark_dirty_regions(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::paint::image::do_push_undo_tile(), blender::ed::sculpt_paint::paint::image::ImageData::init_active_image(), and Sculpt::paint.
Referenced by SCULPT_do_paint_brush().
void SCULPT_do_pinch_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1905 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, calc_sculpt_plane(), copy_v3_v3(), cross_v3_v3v3(), data, do_pinch_brush_task_cb_ex(), StrokeCache::grab_delta_symmetry, is_zero_v3(), StrokeCache::location, normalize_m4(), normalize_v3_v3(), Sculpt::paint, Object::sculpt, and SCULPT_stroke_is_first_brush_step_of_symmetry_pass().
Referenced by do_brush_action().
void SCULPT_do_pose_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1112 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().
void SCULPT_do_rotate_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1445 of file sculpt_brush_types.c.
References angle(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, data, do_rotate_brush_task_cb_ex(), StrokeCache::mirror_symmetry_pass, Sculpt::paint, Object::sculpt, and StrokeCache::vertex_rotation.
Referenced by do_brush_action().
void SCULPT_do_scrape_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 525 of file sculpt_brush_types.c.
References add_v3_v3(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, data, do_scrape_brush_task_cb_ex(), mul_v3_fl(), mul_v3_v3v3(), offset, Sculpt::paint, StrokeCache::radius, StrokeCache::scale, Object::sculpt, SCULPT_brush_plane_offset_get(), SCULPT_calc_brush_plane(), SCULPT_tilt_apply_to_normal(), and Brush::tilt_strength_factor.
Referenced by do_brush_action().
void SCULPT_do_slide_relax_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 2439 of file sculpt_brush_types.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_topology_relax_task_cb_ex(), do_topology_slide_task_cb_ex(), Sculpt::paint, Object::sculpt, SCULPT_boundary_info_ensure(), and SCULPT_stroke_is_first_brush_step_of_symmetry_pass().
Referenced by do_brush_action().
Definition at line 539 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(), StrokeCache::bstrength, SculptSession::cache, 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_has_colors(), SCULPT_vertex_color_get(), and SCULPT_vertex_count_get().
Referenced by do_brush_action().
Definition at line 381 of file sculpt_smooth.c.
References StrokeCache::bstrength, SculptSession::cache, Object::sculpt, SCULPT_enhance_details_brush(), and SCULPT_smooth().
Referenced by do_brush_action().
void SCULPT_do_snake_hook_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1281 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), StrokeCache::bstrength, SculptSession::cache, copy_v3_v3(), Brush::crease_pinch_factor, data, do_snake_hook_brush_task_cb_ex(), StrokeCache::grab_delta_symmetry, negate_v3(), StrokeCache::normal_weight, Sculpt::paint, Object::sculpt, sculpt_project_v3_cache_init(), and sculpt_project_v3_normal_align().
Referenced by do_brush_action().
Definition at line 526 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().
void SCULPT_do_thumb_brush | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct PBVHNode ** | nodes, | ||
int | totnode | ||
) |
Definition at line 1367 of file sculpt_brush_types.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, copy_v3_v3(), cross_v3_v3v3(), data, do_thumb_brush_task_cb_ex(), StrokeCache::grab_delta_symmetry, Sculpt::paint, Object::sculpt, and StrokeCache::sculpt_normal_symm.
Referenced by do_brush_action().
enum eDynTopoWarnFlag SCULPT_dynamic_topology_check | ( | Scene * | scene, |
Object * | ob | ||
) |
Definition at line 325 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 253 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 262 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 | ||
) |
Enable dynamic topology; mesh will be triangulated
Definition at line 126 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().
Definition at line 63 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 91 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 2111 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 693 of file sculpt.c.
References blender::math::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 376 of file sculpt.c.
References blender::math::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 412 of file sculpt.c.
References blender::math::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 398 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().
Definition at line 5916 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 5909 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 5879 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().
Definition at line 5923 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 164 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::pre_smoothed_color, 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().
Definition at line 104 of file sculpt_filter_mesh.c.
References BKE_pbvh_ensure_node_loops(), 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(), SCULPT_UNDO_COLOR, 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 67 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 51 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 83 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[4], |
ePaintSymmetryFlags | symm, | ||
ePaintSymmetryAreas | symmarea, | ||
const float | pivot[3] | ||
) |
Definition at line 2882 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], |
ePaintSymmetryFlags | symm, | ||
ePaintSymmetryAreas | symmarea, | ||
const float | pivot[3] | ||
) |
Definition at line 2863 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 1118 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 1086 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 1081 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 1092 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 1143 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 1174 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 1072 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().
Flush displacement from deformed PBVH to original layer.
Definition at line 3719 of file sculpt.c.
References 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 5212 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(), Object::data, SculptSession::deform_modifiers_active, DEG_id_tag_update(), ED_area_tag_redraw_regiontype(), 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_IMAGE, sculpt_update_keyblock(), SCULPT_UPDATE_MASK, SculptSession::shapekey_active, SPACE_IMAGE, 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 5144 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(), 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_IMAGE, 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, | ||
float | limit_radius | ||
) |
Returns an array indexed by vertex index containing the geodesic distance to the closest vertex in the initial vertex set. The caller is responsible for freeing the array. Geodesic distances will only work when used with PBVH_FACES, for other types of PBVH it will fallback to euclidean distances to one of the initial vertices in the set.
Definition at line 290 of file sculpt_geodesic.c.
References BKE_pbvh_type(), BLI_assert, blender::geometry::limit_radius(), 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 337 of file sculpt_geodesic.c.
References BLI_gset_add(), BLI_gset_free(), BLI_gset_int_new(), blender::geometry::limit_radius(), NULL, POINTER_FROM_INT, and SCULPT_geodesic_distances_create().
float* SCULPT_geodesic_from_vertex_and_symm | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
int | vertex, | ||
float | limit_radius | ||
) |
Definition at line 306 of file sculpt_geodesic.c.
References BLI_gset_add(), BLI_gset_free(), BLI_gset_int_new(), flip_v3_v3(), blender::geometry::limit_radius(), 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 541 of file sculpt_ops.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 | ||
) |
Get a screen-space rectangle of the modified area.
Definition at line 1489 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 2848 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(), sculpt_transform_radius_elastic(), and sculpt_transform_task_cb().
bool SCULPT_handles_colors_report | ( | struct SculptSession * | ss, |
struct ReportList * | reports | ||
) |
Returns true if sculpt session can handle color attributes (BKE_pbvh_type(ss->pbvh) == PBVH_FACES). If false an error message will be shown to the user. Operators should return OPERATOR_CANCELLED in this case.
NOTE: Does not check if a color attribute actually exists. Calling code must handle this itself; in most cases a call to BKE_sculpt_color_layer_create_if_needed() is sufficient.
Definition at line 5303 of file sculpt.c.
References BKE_pbvh_type(), BKE_report(), BLI_assert_msg, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and RPT_ERROR.
Referenced by sculpt_brush_stroke_invoke(), sculpt_color_filter_invoke(), sculpt_mask_by_color_invoke(), and sculpt_sample_color_invoke().
bool SCULPT_has_colors | ( | const SculptSession * | ss | ) |
Returns true if a color attribute exists in the current sculpt session.
Definition at line 156 of file sculpt.c.
References SculptSession::mcol, and SculptSession::vcol.
Referenced by sculpt_colors_poll(), SCULPT_do_paint_brush(), SCULPT_do_smear_brush(), and sculpt_sample_color_invoke().
Returns true if the active color attribute is on loop (ATTR_DOMAIN_CORNER) domain.
bool SCULPT_is_automasking_enabled | ( | const Sculpt * | sd, |
const SculptSession * | ss, | ||
const Brush * | br | ||
) |
Definition at line 73 of file sculpt_automasking.cc.
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, | ||
eAutomasking_flag | mode | ||
) |
Definition at line 63 of file sculpt_automasking.cc.
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 1398 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 1025 of file sculpt.c.
References ELEM.
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(), sculpt_pose_brush_is_vertex_inside_brush_radius(), and sculpt_transform_radius_elastic().
bool SCULPT_is_vertex_inside_brush_radius_symm | ( | const float | vertex[3], |
const float | br_co[3], | ||
float | radius, | ||
char | symm | ||
) |
Checks if a vertex is inside the brush radius from any of its mirrored axis.
Definition at line 1030 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, | ||
int | totnode, | ||
int | smooth_iterations | ||
) |
Definition at line 247 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 289 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(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), sculpt_face_set_edit_fair_face_set(), and SCULPT_geodesic_mesh_create().
char SCULPT_mesh_symmetry_xyz_get | ( | Object * | object | ) |
Definition at line 317 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(), sculpt_transform_radius_elastic(), vpaint_do_symmetrical_brush_actions(), and wpaint_do_symmetrical_brush_actions().
Definition at line 3957 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_colors_poll(), SCULPT_mode_poll_view3d(), sculpt_no_multires_poll(), SCULPT_OT_cloth_filter(), SCULPT_OT_color_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_by_color(), SCULPT_OT_mask_expand(), SCULPT_OT_mask_filter(), SCULPT_OT_mask_init(), SCULPT_OT_mesh_filter(), SCULPT_OT_optimize(), SCULPT_OT_sample_color(), SCULPT_OT_sample_detail_size(), SCULPT_OT_set_persistent_base(), SCULPT_OT_set_pivot_position(), and SCULPT_poll().
Definition at line 3963 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 | ( | uint | gpuattr, |
Brush * | brush, | ||
SculptSession * | ss, | ||
const float | outline_col[3], | ||
float | outline_alpha | ||
) |
Definition at line 383 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, offset, 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 983 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 175 of file sculpt_smooth.c.
References add_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 137 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 | ||
) |
Mask the mesh boundaries smoothing only the mesh surface without using auto-masking.
Definition at line 49 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 157 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, | ||
SculptUndoType | type | ||
) |
Initialize a SculptOrigVertData for accessing original vertex data; handles BMesh, Mesh, and multi-resolution.
Definition at line 1290 of file sculpt.c.
References data, node, SCULPT_orig_vert_data_unode_init(), SCULPT_undo_push_node(), and type.
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(), sculpt_elastic_transform_task_cb(), and sculpt_transform_task_cb().
void SCULPT_orig_vert_data_unode_init | ( | SculptOrigVertData * | data, |
Object * | ob, | ||
struct SculptUndoNode * | unode | ||
) |
Initialize a SculptOrigVertData for accessing original vertex data; handles BMesh, Mesh, and multi-resolution.
Definition at line 1271 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 1300 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(), sculpt_elastic_transform_task_cb(), and sculpt_transform_task_cb().
void SCULPT_OT_brush_stroke | ( | struct wmOperatorType * | ot | ) |
Definition at line 5624 of file sculpt.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, ot, paint_stroke_operator_properties(), wmOperatorType::poll, RNA_def_boolean(), sculpt_brush_stroke_cancel(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_brush_stroke_modal(), SCULPT_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
void SCULPT_OT_cloth_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 1619 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 370 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_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
void SCULPT_OT_detail_flood_fill | ( | struct wmOperatorType * | ot | ) |
Definition at line 130 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 453 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 420 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 758 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 2179 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 1733 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 1714 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, face_set_gesture_lasso_exec(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, 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 959 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 405 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 1428 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 759 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 1018 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 454 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 264 of file sculpt_filter_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, MASK_FILTER_SMOOTH, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, 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 161 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 738 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 1794 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 337 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 424 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 501 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 1773 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 1752 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, 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_paint_image_canvas_get | ( | struct PaintModeSettings * | paint_mode_settings, |
struct Object * | ob, | ||
struct Image ** | r_image, | ||
struct ImageUser ** | r_image_user | ||
) |
Get the image canvas for painting on the given object.
Definition at line 458 of file sculpt_paint_image.cc.
References blender::ed::sculpt_paint::paint::image::ImageData::image, blender::ed::sculpt_paint::paint::image::ImageData::image_user, and blender::ed::sculpt_paint::paint::image::ImageData::init_active_image().
Referenced by sculpt_needs_pbvh_pixels(), and sculpt_pbvh_update_pixels().
bool SCULPT_pbvh_calc_area_normal | ( | const struct Brush * | brush, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
bool | use_threading, | ||
float | r_area_no[3] | ||
) |
Expose 'calc_area_normal' externally (just for vertex paint).
Definition at line 71 of file sculpt_dyntopo.c.
References BKE_object_free_derived_caches(), BKE_pbvh_free(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, MEM_SAFE_FREE, 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 2996 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] | ||
) |
Checks for a brush, not just sculpt mode.
Definition at line 3973 of file sculpt.c.
References C, PAINT_brush_tool_poll(), and SCULPT_mode_poll().
Referenced by SCULPT_OT_brush_stroke(), and SCULPT_poll_view3d().
Definition at line 3968 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 957 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 | ( | struct Sculpt * | sd, |
struct Object * | ob, | ||
struct 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 527 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 1209 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], | ||
float | radius | ||
) |
Definition at line 922 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 | mval[2], | ||
float | ray_start[3], | ||
float | ray_end[3], | ||
float | ray_normal[3], | ||
bool | original | ||
) |
Definition at line 4798 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 2313 of file sculpt_brush_types.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().
2D projection (distance to line).
Definition at line 2513 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().
Test AABB against sphere.
Definition at line 2467 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, | ||
int | totnode, | ||
float | bstrength, | ||
bool | smooth_mask | ||
) |
Definition at line 334 of file sculpt_smooth.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_type(), BLI_assert_msg, 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(), blender::compositor::smooth_mask(), and type.
Referenced by do_brush_action(), SCULPT_do_mask_brush(), and SCULPT_do_smooth_brush().
bool SCULPT_stroke_get_location | ( | struct bContext * | C, |
float | out[3], | ||
const float | mouse[2], | ||
bool | force_original | ||
) |
Do a ray-cast in the tree to find the 3d brush location (This allows us to ignore the GL depth buffer) Returns 0 if the ray doesn't hit the mesh, non-zero otherwise.
Definition at line 4964 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, usdtokens::out(), 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 | ||
) |
Returns true if the stroke will use dynamic topology, false otherwise.
Factors: some brushes like grab cannot do dynamic topology. Others, like smooth, are better without. Same goes for alt-key smoothing.
Definition at line 1338 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 sculpt_brush_stroke_cancel(), SCULPT_calc_area_center(), SCULPT_calc_area_normal_and_center(), SCULPT_is_automasking_enabled(), SCULPT_pbvh_calc_area_normal(), and sculpt_stroke_update_step().
bool SCULPT_stroke_is_first_brush_step | ( | struct 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 912 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(), and SCULPT_enhance_details_brush().
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass | ( | struct StrokeCache * | cache | ) |
Returns true on the first brush step of each symmetry pass.
Definition at line 918 of file sculpt.c.
References StrokeCache::first_time.
Referenced by calc_sculpt_plane(), paint_cursor_cursor_draw_3d_view_brush_cursor_active(), SCULPT_calc_brush_plane(), SCULPT_do_boundary_brush(), SCULPT_do_clay_strips_brush(), SCULPT_do_clay_thumb_brush(), SCULPT_do_cloth_brush(), SCULPT_do_multiplane_scrape_brush(), SCULPT_do_paint_brush(), SCULPT_do_pinch_brush(), SCULPT_do_slide_relax_brush(), sculpt_update_brush_delta(), sculpt_update_cache_variants(), and update_sculpt_normal().
bool SCULPT_stroke_is_main_symmetry_pass | ( | struct 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 906 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(), SCULPT_calc_brush_plane(), and SCULPT_do_clay_thumb_brush().
Definition at line 4712 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_region_view3d(), SculptSession::deform_modifiers_active, depsgraph, Object::sculpt, ToolSettings::sculpt, sculpt_needs_connectivity_info(), Brush::sculpt_tool, SCULPT_tool_is_paint(), 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], | ||
int | v_index, | ||
float | beta, | ||
float | fade | ||
) |
Definition at line 422 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], | ||
int | v_index, | ||
const float | origco[3], | ||
float | alpha | ||
) |
Definition at line 402 of file sculpt_smooth.c.
References add_v3_v3v3(), 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().
Should be used after modifying the mask or Face Sets IDs.
Definition at line 1048 of file sculpt.c.
References BKE_sculptsession_use_pbvh_draw(), C, CTX_data_active_object(), CTX_wm_region(), CTX_wm_region_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, | ||
float | tilt_strength | ||
) |
Tilts a normal by the x and y tilt values using the view axis.
Definition at line 2751 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 SCULPT_do_clay_strips_brush(), SCULPT_do_fill_brush(), SCULPT_do_flatten_brush(), SCULPT_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] | ||
) |
Get effective surface normal with pen tilt and tilt strength applied to it.
Definition at line 2767 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 SCULPT_do_draw_brush(), and SCULPT_do_draw_sharp_brush().
BLI_INLINE bool SCULPT_tool_is_paint | ( | int | tool | ) |
Definition at line 1812 of file sculpt_intern.h.
References ELEM, SCULPT_TOOL_PAINT, and SCULPT_TOOL_SMEAR.
Referenced by do_brush_action(), do_brush_action_task_cb(), sculpt_brush_stroke_init(), sculpt_brush_stroke_invoke(), sculpt_needs_connectivity_info(), SCULPT_stroke_modifiers_check(), sculpt_stroke_test_start(), and sculpt_stroke_update_step().
BLI_INLINE bool SCULPT_tool_needs_all_pbvh_nodes | ( | const Brush * | brush | ) |
Definition at line 1057 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 1037 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, |
SculptUndoType | type | ||
) |
Definition at line 1020 of file sculpt_undo.c.
References LISTBASE_FOREACH, node, SculptUndoNode::node, UndoSculpt::nodes, NULL, sculpt_undo_get_nodes(), SculptUndoNode::type, and type.
Referenced by paint_mesh_restore_co_task_cb(), sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), and SCULPT_undo_push_node().
NOTE: name
must match operator name for redo panels to work.
Definition at line 1545 of file sculpt_undo.c.
References SculptUndoStep::active_color_end, SculptUndoStep::active_color_start, 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, NULL, sculpt_save_active_attribute(), and SculptAttrRef::was_set.
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(), sculpt_symmetrize_exec(), and vpaint_invoke().
Definition at line 1575 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_mode_toggle_exec(), sculpt_stroke_done(), sculpt_symmetrize_exec(), and vpaint_stroke_done().
Definition at line 1580 of file sculpt_undo.c.
References SculptUndoStep::active_color_end, BKE_undosys_stack_init_or_active_with_type(), BKE_undosys_stack_limit_steps_and_memory_defaults, BKE_undosys_step_push(), BKE_UNDOSYS_TYPE_SCULPT, 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_save_active_attribute(), 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 1419 of file sculpt_undo.c.
References BKE_object_get_original_mesh(), BKE_pbvh_node_get_grids(), BKE_pbvh_node_get_loops(), BKE_pbvh_node_get_verts(), BKE_pbvh_node_num_loops(), BKE_pbvh_node_num_verts(), BLI_assert_msg, BLI_strncpy(), BLI_thread_lock(), BLI_thread_unlock(), SculptSession::bm, copy_v3_v3(), ELEM, SculptUndoNode::grids, SculptUndoNode::index, LOCK_CUSTOM1, SculptUndoNode::loop_index, SculptUndoNode::maxloop, KeyBlock::name, SculptSession::needs_flush_to_id, node, SculptUndoNode::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, Mesh::totloop, 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_elastic_transform_task_cb(), 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(), sculpt_undo_push_all_grids(), and vpaint_paint_leaves().
Copy the PBVH bounding box into the object's bounding box.
Definition at line 5134 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().
bool SCULPT_use_image_paint_brush | ( | struct PaintModeSettings * | settings, |
Object * | ob | ||
) |
Definition at line 476 of file sculpt_paint_image.cc.
References BKE_paint_canvas_image_get(), image(), OB_MESH, and Object::type.
Referenced by sculpt_brush_stroke_init(), SCULPT_do_paint_brush(), sculpt_stroke_done(), sculpt_stroke_test_start(), and sculpt_stroke_update_step().
Definition at line 3097 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_tag_coords_changed(), 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 459 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 439 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 | ||
) |
Coordinates used for manipulating the base mesh when Grab Active Vertex is enabled.
Definition at line 201 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 125 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_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_do_displacement_smear_brush(), 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().
void SCULPT_vertex_color_get | ( | const SculptSession * | ss, |
int | index, | ||
float | r_color[4] | ||
) |
Definition at line 161 of file sculpt.c.
References BKE_pbvh_vertex_color_get(), and SculptSession::pbvh.
Referenced by color_filter_task_cb(), do_color_smooth_task_cb_exec(), do_mask_by_color_task_cb(), do_paint_brush_task_cb_ex(), do_sample_wet_paint_task_cb(), do_smear_brush_task_cb_exec(), do_smear_store_prev_colors_task_cb_exec(), sculpt_color_presmooth_init(), SCULPT_do_smear_brush(), sculpt_expand_colors_update_task_cb(), 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().
void SCULPT_vertex_color_set | ( | SculptSession * | ss, |
int | index, | ||
const float | color[4] | ||
) |
Definition at line 166 of file sculpt.c.
References BKE_pbvh_vertex_color_set(), color, and SculptSession::pbvh.
Referenced by color_filter_task_cb(), do_color_smooth_task_cb_exec(), do_paint_brush_task_cb_ex(), do_smear_brush_task_cb_exec(), paint_mesh_restore_co_task_cb(), sculpt_expand_colors_update_task_cb(), and sculpt_expand_restore_color_data().
int SCULPT_vertex_count_get | ( | struct SculptSession * | ss | ) |
Definition at line 111 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(), 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_color_presmooth_init(), SCULPT_connected_components_ensure(), SCULPT_do_displacement_smear_brush(), SCULPT_do_layer_brush(), 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 508 of file sculpt.c.
References blender::math::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 483 of file sculpt.c.
References blender::math::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 533 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 662 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, |
int | index | ||
) |
Definition at line 865 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] | ||
) |
Returns the info of the limit surface when multi-res is available, otherwise it returns the current coordinate of the vertex.
Definition at line 218 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_task_cb_ex(), mesh_filter_init_limit_surface_co(), and SCULPT_do_displacement_smear_brush().
float SCULPT_vertex_mask_get | ( | struct SculptSession * | ss, |
int | index | ||
) |
Definition at line 248 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, |
int | index, | ||
bool | include_duplicates, | ||
SculptVertexNeighborIter * | iter | ||
) |
Definition at line 841 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] | ||
) |
Get the normal for a given sculpt vertex; do not modify the result
Definition at line 171 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_key(), BKE_pbvh_get_grids(), BKE_pbvh_get_vert_normals(), BKE_pbvh_type(), BM_vert_at_index(), CCG_elem_no(), CCG_elem_offset(), copy_v3_v3(), float(), CCGKey::grid_area, BMVert::no, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, and PBVH_GRIDS.
Referenced by cloth_filter_apply_forces_task_cb(), do_smear_brush_task_cb_exec(), 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 193 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 239 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 | ) |
Ensure random access; required for PBVH_BMESH
Definition at line 103 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 356 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 341 of file sculpt.c.
References BKE_pbvh_type(), BKE_pbvh_vert_tag_update_normal(), SculptSession::bm, BM_elem_flag_set, BM_ELEM_HIDDEN, BM_vert_at_index(), MVert::flag, ME_HIDE, SculptSession::mvert, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SET_FLAG_FROM_TEST.
Definition at line 557 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 591 of file sculpt.c.
References blender::math::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().