Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_dial_2d.h"
#include "BLI_ghash.h"
#include "BLI_gsqueue.h"
#include "BLI_hash.h"
#include "BLI_math.h"
#include "BLI_math_color.h"
#include "BLI_math_color_blend.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "PIL_time.h"
#include "DNA_brush_types.h"
#include "DNA_customdata_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_brush.h"
#include "BKE_ccg.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_kelvinlet.h"
#include "BKE_key.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_mirror.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pbvh.h"
#include "BKE_pointcache.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_subdiv_ccg.h"
#include "BKE_subsurf.h"
#include "DEG_depsgraph.h"
#include "IMB_colormanagement.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_view3d.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "bmesh.h"
#include "bmesh_tools.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Classes | |
struct | SculptProjectVector |
struct | ClaySampleData |
Functions | |
Sculpt Draw Brush | |
static void | do_draw_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_draw_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Fill Brush | |
static void | do_fill_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_fill_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_scrape_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_scrape_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Clay Thumb Brush | |
static void | do_clay_thumb_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
float | SCULPT_clay_thumb_get_stabilized_pressure (StrokeCache *cache) |
void | SCULPT_do_clay_thumb_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Flatten Brush | |
static void | do_flatten_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_flatten_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Crease & Blob Brush | |
static void | do_crease_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_crease_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_pinch_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_pinch_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_grab_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_grab_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_elastic_deform_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
void | SCULPT_do_elastic_deform_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Draw Sharp Brush | |
static void | do_draw_sharp_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_draw_sharp_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Topology Brush | |
static void | do_topology_slide_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_relax_vertex (SculptSession *ss, PBVHVertexIter *vd, float factor, bool filter_boundary_face_sets, float *r_final_pos) |
static void | do_topology_relax_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_slide_relax_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Multires Displacement Eraser Brush | |
static void | do_displacement_eraser_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_displacement_eraser_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Multires Displacement Smear Brush | |
static void | do_displacement_smear_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
static void | do_displacement_smear_store_prev_disp_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
void | SCULPT_do_displacement_smear_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Sculpt Topology Rake (Shared Utility) | |
static void | do_topology_rake_bmesh_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_bmesh_topology_rake (Sculpt *sd, Object *ob, PBVHNode **nodes, const int totnode, float bstrength) |
Sculpt Mask Brush | |
static void | do_mask_brush_draw_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_mask_brush_draw (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
void | SCULPT_do_mask_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
SculptProjectVector | |
Fast-path for project_plane_v3_v3v3 | |
typedef struct SculptProjectVector | SculptProjectVector |
static bool | plane_point_side_flip (const float co[3], const float plane[4], const bool flip) |
static void | sculpt_project_v3_cache_init (SculptProjectVector *spvc, const float plane[3]) |
static void | sculpt_project_v3 (const SculptProjectVector *spvc, const float vec[3], float r_vec[3]) |
static void | calc_sculpt_plane (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float r_area_no[3], float r_area_co[3]) |
static void | sculpt_rake_rotate (const SculptSession *ss, const float sculpt_co[3], const float v_co[3], float factor, float r_delta[3]) |
static void | sculpt_project_v3_normal_align (SculptSession *ss, const float normal_weight, float grab_delta[3]) |
Sculpt Clay Brush | |
typedef struct ClaySampleData | ClaySampleData |
static void | calc_clay_surface_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
static void | calc_clay_surface_reduce (const void *__restrict UNUSED(userdata), void *__restrict chunk_join, void *__restrict chunk) |
static void | do_clay_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_clay_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_clay_strips_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_clay_strips_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_snake_hook_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_snake_hook_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_thumb_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_thumb_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_rotate_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_rotate_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_layer_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_layer_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_inflate_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_inflate_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_nudge_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
void | SCULPT_do_nudge_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
Implements the Sculpt Mode tools.
Definition in file sculpt_brush_types.c.
typedef struct ClaySampleData ClaySampleData |
typedef struct SculptProjectVector SculptProjectVector |
|
static |
Definition at line 892 of file sculpt_brush_types.c.
References MIN2, and ClaySampleData::plane_dist.
Referenced by SCULPT_do_clay_brush().
|
static |
Definition at line 847 of file sculpt_brush_types.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::co, data, dist_signed_to_plane_v3(), fabsf, Brush::falloff_shape, is_zero_v4(), MIN2, Brush::normal_radius_factor, SculptSession::pbvh, PBVH_ITER_UNIQUE, ClaySampleData::plane_dist, plane_from_point_normal_v3(), SculptBrushTest::radius_squared, SCULPT_brush_test_init_with_falloff_shape(), and sqrtf.
Referenced by SCULPT_do_clay_brush().
|
static |
Definition at line 137 of file sculpt_brush_types.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, and StrokeCache::view_normal.
Referenced by SCULPT_do_pinch_brush().
|
static |
Definition at line 902 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, closest_to_plane_normalized_v3(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fabsf, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_from_point_normal_v3(), SculptBrushTest::plane_tool, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_clay_brush().
|
static |
Definition at line 1021 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, closest_to_plane_normalized_v3(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_from_point_normal_v3(), plane_point_side_flip(), SculptBrushTest::plane_tool, StrokeCache::radius, SCULPT_brush_strength_factor(), SCULPT_brush_test_cube(), SCULPT_brush_test_init(), SCULPT_plane_trim(), sub_v3_v3v3(), blender::threading::enumerable_thread_specific_utils::thread_id, and Brush::tip_roundness.
Referenced by SCULPT_do_clay_strips_brush().
|
static |
Definition at line 570 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), SculptSession::cache, StrokeCache::clay_thumb_front_angle, closest_to_plane_normalized_v3(), PBVHProxyNode::co, PBVHVertexIter::co, data, DEG2RADF, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, interp_v3_v3v3(), invert_m4_m4(), PBVHVertexIter::mask, mul_v3_m4v3(), mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_from_point_normal_v3(), SculptBrushTest::plane_tool, rotate_v3_v3v3fl(), SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_clay_thumb_brush().
|
static |
Used for 'SCULPT_TOOL_CREASE' and 'SCULPT_TOOL_BLOB'
Definition at line 1726 of file sculpt_brush_types.c.
References add_v3_v3v3(), BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), SculptSession::cache, PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), Brush::falloff_shape, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, SculptBrushTest::location, PBVHVertexIter::mask, mul_v3_fl(), mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, offset, PAINT_FALLOFF_SHAPE_TUBE, SculptSession::pbvh, PBVH_ITER_UNIQUE, project_plane_v3_v3v3(), SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sculpt_project_v3(), sqrtf, sub_v3_v3v3(), blender::threading::enumerable_thread_specific_utils::thread_id, and StrokeCache::view_normal.
Referenced by SCULPT_do_crease_brush().
|
static |
Definition at line 2476 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, clamp_f(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_vertex_limit_surface_get(), sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_displacement_eraser_brush().
|
static |
Definition at line 2544 of file sculpt_brush_types.c.
References add_v3_v3v3(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), BRUSH_SMEAR_DEFORM_DRAG, BRUSH_SMEAR_DEFORM_EXPAND, BRUSH_SMEAR_DEFORM_PINCH, StrokeCache::bstrength, SculptSession::cache, clamp_f(), PBVHVertexIter::co, copy_v3_v3(), data, SculptBrushTest::dist, dot_v3v3(), fade(), PBVHVertexIter::fno, PBVHVertexIter::index, SculptVertexNeighborIter::index, interp_v3_v3v3(), StrokeCache::last_location, StrokeCache::limit_surface_co, StrokeCache::location, madd_v3_v3fl(), PBVHVertexIter::mask, mul_v3_fl(), mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, normalize_v3_v3(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::prev_displacement, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_vertex_limit_surface_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, Brush::smear_deform_type, sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_displacement_smear_brush().
|
static |
Definition at line 2632 of file sculpt_brush_types.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, SculptSession::cache, data, PBVHVertexIter::index, StrokeCache::limit_surface_co, SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::prev_displacement, SCULPT_vertex_co_get(), and sub_v3_v3v3().
Referenced by SCULPT_do_displacement_smear_brush().
|
static |
Definition at line 286 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, offset, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_draw_brush().
|
static |
Definition at line 2153 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), PBVHProxyNode::co, SculptOrigVertData::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, SculptOrigVertData::no, NULL, offset, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COORDS, sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_draw_sharp_brush().
|
static |
Definition at line 2039 of file sculpt_brush_types.c.
References StrokeCache::automasking, BKE_kelvinlet_grab(), BKE_kelvinlet_grab_biscale(), BKE_kelvinlet_grab_triscale(), BKE_kelvinlet_init_params(), BKE_kelvinlet_scale(), BKE_kelvinlet_twist(), BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BRUSH_ELASTIC_DEFORM_GRAB, BRUSH_ELASTIC_DEFORM_GRAB_BISCALE, BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE, BRUSH_ELASTIC_DEFORM_SCALE, BRUSH_ELASTIC_DEFORM_TWIST, StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, SculptOrigVertData::co, copy_v3_v3(), data, Brush::elastic_deform_type, Brush::elastic_deform_volume_preservation, ELEM, float(), PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::initial_mouse, len_v3(), StrokeCache::location, PBVHVertexIter::mask, StrokeCache::mirror_symmetry_pass, StrokeCache::mouse, mul_v3_fl(), PBVHVertexIter::mvert, params, SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::radius, SCULPT_automasking_factor_get(), StrokeCache::sculpt_normal_symm, SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), and SCULPT_UNDO_COORDS.
Referenced by SCULPT_do_elastic_deform_brush().
|
static |
Definition at line 367 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, closest_to_plane_normalized_v3(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_from_point_normal_v3(), SculptBrushTest::plane_tool, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_plane_point_side(), SCULPT_plane_trim(), sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_fill_brush().
|
static |
Definition at line 744 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, closest_to_plane_normalized_v3(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_from_point_normal_v3(), SculptBrushTest::plane_tool, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_plane_trim(), sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_flatten_brush().
|
static |
Definition at line 1953 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), BRUSH_GRAB_SILHOUETTE, StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, SculptOrigVertData::co, copy_v3_v3(), data, SculptBrushTest::dist, dot_v3v3(), fade(), Brush::flag2, float(), StrokeCache::grab_delta_symmetry, PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::initial_normal, PBVHVertexIter::mask, max_ff(), mul_v3_fl(), mul_v3_v3fl(), PBVHVertexIter::mvert, SculptOrigVertData::no, normalize_v3_v3(), NULL, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COORDS, sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_grab_brush().
|
static |
Definition at line 1582 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, PBVHVertexIter::co, copy_v3_v3(), data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::radius, StrokeCache::scale, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_inflate_brush().
|
static |
Definition at line 1466 of file sculpt_brush_types.c.
References add_v3_v3v3(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), BRUSH_PERSISTENT, StrokeCache::bstrength, SculptSession::cache, clamp_f(), PBVHVertexIter::co, SculptOrigVertData::co, copy_v3_v3(), data, SculptPersistentBase::disp, SculptBrushTest::dist, fabsf, fade(), Brush::flag, PBVHVertexIter::fno, Brush::height, PBVHVertexIter::index, StrokeCache::invert, StrokeCache::layer_displacement_factor, madd_v3_v3v3fl(), PBVHVertexIter::mask, mul_v3_fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptOrigVertData::no, normal, SculptSession::pbvh, PBVH_ITER_UNIQUE, SculptSession::persistent_base, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_clip(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COORDS, SCULPT_vertex_persistent_co_get(), SCULPT_vertex_persistent_normal_get(), sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_layer_brush().
|
static |
Definition at line 2780 of file sculpt_brush_types.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, clamp_f(), PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), PBVHVertexIter::fno, PBVHVertexIter::index, PBVHVertexIter::mask, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_mask_brush_draw().
|
static |
Definition at line 1649 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_nudge_brush().
|
static |
Definition at line 1839 of file sculpt_brush_types.c.
References add_v3_v3v3(), BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, PBVHVertexIter::co, copy_v3_v3(), data, SculptBrushTest::dist, dot_v3v3(), fade(), Brush::falloff_shape, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, SculptBrushTest::location, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, PAINT_FALLOFF_SHAPE_TUBE, SculptSession::pbvh, PBVH_ITER_UNIQUE, project_plane_v3_v3v3(), SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sqrtf, sub_v3_v3v3(), blender::threading::enumerable_thread_specific_utils::thread_id, and StrokeCache::view_normal.
Referenced by SCULPT_do_pinch_brush().
|
static |
Definition at line 1392 of file sculpt_brush_types.c.
References add_v3_v3(), angle(), axis_angle_normalized_to_mat3(), BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, SculptOrigVertData::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::location, PBVHVertexIter::mask, mul_v3_m3v3(), PBVHVertexIter::mvert, SculptOrigVertData::no, NULL, SculptSession::pbvh, PBVH_ITER_UNIQUE, rot, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), StrokeCache::sculpt_normal_symm, SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COORDS, sqrtf, sub_v3_v3(), sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_rotate_brush().
|
static |
Definition at line 466 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, closest_to_plane_normalized_v3(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_from_point_normal_v3(), SculptBrushTest::plane_tool, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_plane_point_side(), SCULPT_plane_trim(), sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_scrape_brush().
|
static |
Definition at line 1174 of file sculpt_brush_types.c.
References add_v3_v3(), StrokeCache::automasking, BKE_kelvinlet_grab_triscale(), BKE_kelvinlet_init_params(), BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), BRUSH_SNAKE_HOOK_DEFORM_ELASTIC, StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, PBVHVertexIter::co, copy_v3_v3(), Brush::crease_pinch_factor, data, SculptBrushTest::dist, fade(), Brush::falloff_shape, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::is_rake_rotation_valid, len_v3(), SculptBrushTest::location, StrokeCache::location, PBVHVertexIter::mask, min_ff(), mul_v3_fl(), mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, PAINT_FALLOFF_SHAPE_TUBE, params, SculptSession::pbvh, PBVH_ITER_UNIQUE, pow2f(), project_plane_v3_v3v3(), StrokeCache::radius, SCULPT_automasking_factor_get(), SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), sculpt_project_v3(), sculpt_rake_rotate(), Brush::snake_hook_deform_type, sqrtf, sub_v3_v3v3(), blender::threading::enumerable_thread_specific_utils::thread_id, and StrokeCache::true_view_normal.
Referenced by SCULPT_do_snake_hook_brush().
|
static |
Definition at line 1319 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, SculptOrigVertData::co, data, SculptBrushTest::dist, fade(), float(), PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, SculptOrigVertData::no, NULL, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COORDS, sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_thumb_brush().
|
static |
Definition at line 2687 of file sculpt_brush_types.c.
References BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), PBVHVertexIter::bm_vert, SculptSession::cache, clamp_f(), PBVHVertexIter::co, copy_v3_v3(), data, SculptBrushTest::dist, dot_v3v3(), fade(), PBVHVertexIter::fno, StrokeCache::grab_delta_symmetry, PBVHVertexIter::index, is_zero_v3(), madd_v3_v3v3fl(), PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, normalize_v3(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::pressure, SCULPT_bmesh_four_neighbor_average(), SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_clip(), StrokeCache::sculpt_normal_symm, sqrtf, sub_v3_v3(), sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_bmesh_topology_rake().
|
static |
Definition at line 2395 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, PBVHVertexIter::co, SculptOrigVertData::co, data, SculptBrushTest::dist, fade(), PBVHVertexIter::index, PBVHVertexIter::mask, PBVHVertexIter::mvert, SculptOrigVertData::no, NULL, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_relax_vertex(), SCULPT_UNDO_COORDS, sqrtf, and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_slide_relax_brush().
|
static |
Definition at line 2238 of file sculpt_brush_types.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), BRUSH_SLIDE_DEFORM_DRAG, BRUSH_SLIDE_DEFORM_EXPAND, BRUSH_SLIDE_DEFORM_PINCH, StrokeCache::bstrength, SculptSession::cache, PBVHProxyNode::co, PBVHVertexIter::co, SculptOrigVertData::co, data, SculptBrushTest::dist, dot_v3v3(), fade(), float(), PBVHVertexIter::i, PBVHVertexIter::index, SculptVertexNeighborIter::index, StrokeCache::last_location, StrokeCache::location, madd_v3_v3fl(), PBVHVertexIter::mask, mul_v3_v3fl(), PBVHVertexIter::mvert, SculptOrigVertData::no, normalize_v3_v3(), NULL, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COORDS, SCULPT_vertex_co_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, Brush::slide_deform_type, sqrtf, sub_v3_v3v3(), and blender::threading::enumerable_thread_specific_utils::thread_id.
Referenced by SCULPT_do_slide_relax_brush().
|
static |
Definition at line 104 of file sculpt_brush_types.c.
References plane_point_side_v3().
Referenced by do_clay_strips_brush_task_cb_ex().
void SCULPT_bmesh_topology_rake | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
const 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_clay_thumb_get_stabilized_pressure | ( | 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().
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().
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().
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().
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 | ( | Sculpt * | sd, |
Object * | ob, | ||
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 | ( | Sculpt * | sd, |
Object * | ob, | ||
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().
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 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().
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().
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().
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().
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().
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().
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().
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().
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 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().
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().
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().
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().
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 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 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().
|
static |
Calculate the projection.
Definition at line 127 of file sculpt_brush_types.c.
References dot_v3v3(), SculptProjectVector::len_sq_inv_neg, madd_v3_v3fl(), SculptProjectVector::plane, and project_plane_v3_v3v3().
Referenced by do_crease_brush_task_cb_ex(), and do_snake_hook_brush_task_cb_ex().
|
static |
plane | Direction, can be any length. |
Definition at line 116 of file sculpt_brush_types.c.
References copy_v3_v3(), SculptProjectVector::is_valid, SculptProjectVector::len_sq, SculptProjectVector::len_sq_inv_neg, len_squared_v3(), and SculptProjectVector::plane.
Referenced by SCULPT_do_crease_brush(), and SCULPT_do_snake_hook_brush().
|
static |
Align the grab delta to the brush normal.
grab_delta | Typically from ss->cache->grab_delta_symmetry . |
Definition at line 257 of file sculpt_brush_types.c.
References SculptSession::cache, dot_v3v3(), fabsf, madd_v3_v3fl(), mul_v3_fl(), project_plane_v3_v3v3(), StrokeCache::sculpt_normal_symm, and StrokeCache::view_normal.
Referenced by SCULPT_do_elastic_deform_brush(), SCULPT_do_grab_brush(), and SCULPT_do_snake_hook_brush().
|
static |
Definition at line 223 of file sculpt_brush_types.c.
References add_v3_v3(), SculptSession::cache, copy_qt_qt(), mul_qt_v3(), mul_v3_fl(), pow_qt_fl_normalized(), StrokeCache::rake_rotation_symmetry, and sub_v3_v3v3().
Referenced by do_snake_hook_brush_task_cb_ex().
void SCULPT_relax_vertex | ( | SculptSession * | ss, |
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().