|
Blender
V2.93
|
#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_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 | NearestVertexTLSData |
| struct | SculptProjectVector |
| struct | AreaNormalCenterTLSData |
| struct | SculptRaycastData |
| struct | SculptFindNearestToRayData |
| struct | ClaySampleData |
| struct | NearestVertexFakeNeighborTLSData |
| struct | SculptTopologyIDFloodFillData |
| struct | MaskByColorContiguousFloodFillData |
Macros | |
| #define | SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY 256 |
| #define | SCULPT_TILT_SENSITIVITY 0.7f |
| #define | PIXEL_INPUT_THRESHHOLD 5 |
| #define | MASK_BY_COLOR_SLOPE 0.25f |
Typedefs | |
| typedef struct NearestVertexTLSData | NearestVertexTLSData |
| typedef enum StrokeFlags | StrokeFlags |
| typedef void(* | BrushActionFunc) (Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSettings *ups) |
| typedef struct NearestVertexFakeNeighborTLSData | NearestVertexFakeNeighborTLSData |
| typedef struct SculptTopologyIDFloodFillData | SculptTopologyIDFloodFillData |
| typedef struct MaskByColorContiguousFloodFillData | MaskByColorContiguousFloodFillData |
Enumerations | |
| enum | StrokeFlags { CLIP_X = 1 , CLIP_Y = 2 , CLIP_Z = 4 } |
| enum | { SCULPT_TOPOLOGY_ID_NONE , SCULPT_TOPOLOGY_ID_DEFAULT } |
SculptProjectVector | |
Fast-path for project_plane_v3_v3v3 | |
| typedef struct SculptProjectVector | SculptProjectVector |
| 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]) |
Calculate Normal and Center | |
Calculate geometry surrounding the brush center. (optionally using original coordinates). Functions are:
| |
| typedef struct AreaNormalCenterTLSData | AreaNormalCenterTLSData |
| static void | calc_area_normal_and_center_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
| static void | calc_area_normal_and_center_reduce (const void *__restrict UNUSED(userdata), void *__restrict chunk_join, void *__restrict chunk) |
| static void | calc_area_center (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float r_area_co[3]) |
| void | SCULPT_calc_area_normal (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float r_area_no[3]) |
| bool | SCULPT_pbvh_calc_area_normal (const Brush *brush, Object *ob, PBVHNode **nodes, int totnode, bool use_threading, float r_area_no[3]) |
| static void | calc_area_normal_and_center (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float r_area_no[3], float r_area_co[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) |
| static void | 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) |
| static void | do_clay_strips_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
| static void | do_fill_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
| static void | 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) |
| static void | do_scrape_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
| #define MASK_BY_COLOR_SLOPE 0.25f |
sculpt_mask_by_color_delta_get returns values in the (0,1) range that are used to generate the mask based on the difference between two colors (the active color and the color of any other vertex). Ideally, a threshold of 0 should mask only the colors that are equal to the active color and threshold of 1 should mask all colors. In order to avoid artifacts and produce softer falloffs in the mask, the MASK_BY_COLOR_SLOPE defines the size of the transition values between masked and unmasked vertices. The smaller this value is, the sharper the generated mask is going to be.
| #define PIXEL_INPUT_THRESHHOLD 5 |
| typedef struct AreaNormalCenterTLSData AreaNormalCenterTLSData |
| typedef void(* BrushActionFunc) (Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSettings *ups) |
| typedef struct ClaySampleData ClaySampleData |
| typedef struct NearestVertexFakeNeighborTLSData NearestVertexFakeNeighborTLSData |
| typedef struct NearestVertexTLSData NearestVertexTLSData |
| typedef struct SculptProjectVector SculptProjectVector |
| typedef struct SculptTopologyIDFloodFillData SculptTopologyIDFloodFillData |
| typedef enum StrokeFlags StrokeFlags |
| anonymous enum |
| enum StrokeFlags |
|
static |
Definition at line 2963 of file sculpt.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().
|
static |
Return modified brush strength. Includes the direction of the brush, positive values pull vertices, negative values push. Uses tablet pressure and a special multiplier found experimentally to scale the strength factor.
Definition at line 2312 of file sculpt.c.
References alpha, BKE_brush_alpha_get(), BKE_brush_use_alpha_pressure(), BKE_paint_brush(), BLI_assert, BRUSH_CLOTH_DEFORM_EXPAND, BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_DIR_IN, BRUSH_INVERT_TO_SCRAPE_FILL, BRUSH_MASK_DRAW, BRUSH_MASK_SMOOTH, Brush::cloth_deform_type, Brush::flag, invert(), StrokeCache::invert, Brush::mask_tool, UnifiedPaintSettings::overlap_factor, Sculpt::paint, StrokeCache::pen_flip, pow4f(), powf, StrokeCache::pressure, scene, ViewContext::scene, Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_CLAY_THUMB, SCULPT_TOOL_CLOTH, SCULPT_TOOL_CREASE, SCULPT_TOOL_DISPLACEMENT_ERASER, SCULPT_TOOL_DISPLACEMENT_SMEAR, SCULPT_TOOL_DRAW, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_DRAW_SHARP, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_GRAB, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER, SCULPT_TOOL_MASK, SCULPT_TOOL_MULTIPLANE_SCRAPE, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PAINT, SCULPT_TOOL_PINCH, SCULPT_TOOL_POSE, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SCRAPE, SCULPT_TOOL_SLIDE_RELAX, SCULPT_TOOL_SMEAR, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, and StrokeCache::vc.
Referenced by do_symmetrical_brush_actions(), do_vpaint_brush_blur_task_cb_ex(), do_vpaint_brush_draw_task_cb_ex(), do_vpaint_brush_smear_task_cb_ex(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), and do_wpaint_brush_smear_task_cb_ex().
|
static |
Definition at line 2148 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().
|
static |
Definition at line 2248 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().
|
static |
Definition at line 2128 of file sculpt.c.
References add_v2_v2_int(), add_v3_v3(), AreaNormalCenterTLSData::area_cos, AreaNormalCenterTLSData::area_nos, AreaNormalCenterTLSData::count_co, and AreaNormalCenterTLSData::count_no.
Referenced by calc_area_center(), calc_area_normal_and_center(), and SCULPT_pbvh_calc_area_normal().
|
static |
Definition at line 1939 of file sculpt.c.
References add_v3_v3(), add_v3_v3v3(), AreaNormalCenterTLSData::area_cos, AreaNormalCenterTLSData::area_nos, BKE_pbvh_node_get_bm_orco_data(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, SculptUndoNode::bm_entry, SculptSession::bm_log, BM_log_original_vert_data(), PBVHVertexIter::bm_vert, BRUSH_AREA_RADIUS_PRESSURE, SculptSession::cache, clamp_f(), closest_on_tri_to_point_v3(), PBVHVertexIter::co, SculptUndoNode::co, copy_v3_v3(), copy_v3_v3_short(), AreaNormalCenterTLSData::count_co, AreaNormalCenterTLSData::count_no, SculptSession::cursor_view_normal, data, SculptBrushTest::dist, dot_v3v3(), ELEM, float(), PBVHVertexIter::fno, PBVHVertexIter::i, SculptBrushTest::location, mul_v3_fl(), PBVHVertexIter::no, SculptUndoNode::no, normal_short_to_float_v3(), normal_tri_v3(), NULL, OB_MODE_SCULPT, StrokeCache::original, SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::pressure, SculptBrushTest::radius, SculptBrushTest::radius_squared, SCULPT_brush_test_init_with_falloff_shape(), SCULPT_TOOL_FILL, SCULPT_TOOL_SCRAPE, SCULPT_UNDO_COORDS, SCULPT_undo_push_node(), sqrtf, sub_v3_v3v3(), UNPACK3, and StrokeCache::view_normal.
Referenced by calc_area_center(), calc_area_normal_and_center(), and SCULPT_pbvh_calc_area_normal().
Definition at line 2805 of file sculpt.c.
References angle(), SculptSession::cache, calc_local_y(), copy_v3_v3(), cross_v3_v3v3(), Object::imat, invert_m4_m4(), StrokeCache::location, Brush::mtex, mul_m4_m4m4(), normalize_m4(), Object::obmat, StrokeCache::radius, MTex::rot, rotate_v3_v3v3fl(), scale_m4_fl(), Object::sculpt, StrokeCache::sculpt_normal, StrokeCache::special_rotation, v, and StrokeCache::vc.
Referenced by update_brush_local_mat().
|
static |
Definition at line 5040 of file sculpt.c.
References MIN2, and ClaySampleData::plane_dist.
Referenced by do_clay_brush().
|
static |
Definition at line 4995 of file sculpt.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 do_clay_brush().
|
static |
Definition at line 2789 of file sculpt.c.
References add_v3_v3(), center, ED_view3d_calc_zfac(), ED_view3d_win_to_delta(), Object::imat, Object::loc, mul_m4_v3(), mul_v3_m4v3(), normalize_v3(), NULL, ViewContext::obact, ViewContext::region, ViewContext::rv3d, and y.
Referenced by calc_brush_local_mat().
|
static |
Definition at line 1858 of file sculpt.c.
References angle(), axis_angle_to_mat3_single(), flip_v3_v3(), len_squared_v3v3(), mul_m3_v3(), StrokeCache::radius, StrokeCache::radius_squared, sqrtf, and StrokeCache::true_location.
Referenced by calc_radial_symmetry_feather(), and calc_symmetry_feather().
|
static |
Definition at line 1879 of file sculpt.c.
References angle(), calc_overlap(), M_PI, and Sculpt::radial_symm.
Referenced by calc_symmetry_feather().
|
static |
Definition at line 2730 of file sculpt.c.
References ARRAY_SET_ITEMS, BKE_paint_brush(), SculptSession::cache, copy_v3_v3(), Sculpt::paint, Object::sculpt, SCULPT_calc_area_normal(), SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, Brush::sculpt_plane, and StrokeCache::true_view_normal.
Referenced by update_sculpt_normal().
|
static |
Definition at line 3663 of file sculpt.c.
References add_v3_v3(), ARRAY_SET_ITEMS, BKE_paint_brush(), BRUSH_ORIGINAL_NORMAL, BRUSH_ORIGINAL_PLANE, SculptSession::cache, calc_area_center(), calc_area_normal_and_center(), copy_v3_v3(), Brush::falloff_shape, Brush::flag, flip_v3(), StrokeCache::last_center, StrokeCache::mirror_symmetry_pass, mul_m4_v3(), normalize_v3(), Sculpt::paint, PAINT_FALLOFF_SHAPE_TUBE, StrokeCache::plane_offset, project_plane_v3_v3v3(), Object::sculpt, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, StrokeCache::sculpt_normal, Brush::sculpt_plane, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SCULPT_stroke_is_main_symmetry_pass(), StrokeCache::symm_rot_mat, StrokeCache::true_view_normal, and StrokeCache::view_normal.
Referenced by do_pinch_brush().
|
static |
Definition at line 1894 of file sculpt.c.
References calc_overlap(), calc_radial_symmetry_feather(), Sculpt::paint, PAINT_SYMMETRY_FEATHER, SCULPT_is_symmetry_iteration_valid(), StrokeCache::symmetry, and Paint::symmetry_flags.
Referenced by do_symmetrical_brush_actions().
|
static |
Definition at line 5906 of file sculpt.c.
References add_v3_v3(), StrokeCache::alt_smooth, StrokeCache::automasking, Brush::autosmooth_factor, UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BKE_pbvh_type(), BLI_assert, BLI_task_parallel_range(), bmesh_topology_rake(), BRUSH_ANCHORED, BRUSH_DEFORM_TARGET_CLOTH_SIM, BRUSH_DIR_IN, BRUSH_INVERSE_SMOOTH_PRESSURE, BRUSH_INVERT_TO_SCRAPE_FILL, MTex::brush_map_mode, BRUSH_ORIGINAL_NORMAL, BRUSH_SMOOTH_DEFORM_LAPLACIAN, BRUSH_SMOOTH_DEFORM_SURFACE, SculptSession::cache, StrokeCache::cloth_sim, copy_v3_v3(), Brush::deform_target, do_brush_action_task_cb(), do_clay_brush(), do_clay_strips_brush(), do_clay_thumb_brush(), do_crease_brush(), do_displacement_eraser_brush(), do_displacement_smear_brush(), do_draw_brush(), do_draw_sharp_brush(), do_elastic_deform_brush(), do_fill_brush(), do_flatten_brush(), do_grab_brush(), do_gravity(), do_inflate_brush(), do_layer_brush(), do_mask_brush(), do_nudge_brush(), do_pinch_brush(), do_rotate_brush(), do_scrape_brush(), do_slide_relax_brush(), do_snake_hook_brush(), do_thumb_brush(), ELEM, Brush::falloff_shape, Brush::flag, Sculpt::gravity_factor, invert(), StrokeCache::invert, UnifiedPaintSettings::last_stroke_valid, StrokeCache::location, MEM_callocN, MEM_SAFE_FREE, Brush::mtex, MTEX_MAP_MODE_AREA, mul_m4_v3(), NULL, Object::obmat, StrokeCache::original, StrokeCache::paint_face_set, PAINT_FALLOFF_SHAPE_SPHERE, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, StrokeCache::pen_flip, StrokeCache::pressure, Object::sculpt, SCULPT_active_face_set_get(), SCULPT_automasking_cache_init(), sculpt_brush_needs_normal(), sculpt_brush_use_topology_rake(), SCULPT_cloth_brush_affected_nodes_gather(), SCULPT_cloth_brush_do_simulation_step(), SCULPT_cloth_brush_ensure_nodes_constraints(), SCULPT_cloth_brush_simulation_create(), SCULPT_cloth_brush_simulation_init(), SCULPT_cloth_brush_store_simulation_state(), SCULPT_cloth_sim_activate_nodes(), SCULPT_do_boundary_brush(), SCULPT_do_cloth_brush(), SCULPT_do_draw_face_sets_brush(), SCULPT_do_multiplane_scrape_brush(), SCULPT_do_paint_brush(), SCULPT_do_pose_brush(), SCULPT_do_smear_brush(), SCULPT_do_smooth_brush(), SCULPT_do_surface_smooth_brush(), SCULPT_face_set_next_available_get(), SCULPT_is_automasking_enabled(), sculpt_pbvh_gather_generic(), SCULPT_pose_brush_init(), SCULPT_smooth(), SCULPT_stroke_is_first_brush_step(), SCULPT_stroke_is_main_symmetry_pass(), Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_CLAY_THUMB, SCULPT_TOOL_CLOTH, SCULPT_TOOL_CREASE, SCULPT_TOOL_DISPLACEMENT_ERASER, SCULPT_TOOL_DISPLACEMENT_SMEAR, SCULPT_TOOL_DRAW, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_DRAW_SHARP, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_GRAB, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER, SCULPT_TOOL_MASK, SCULPT_TOOL_MULTIPLANE_SCRAPE, SCULPT_tool_needs_all_pbvh_nodes(), sculpt_tool_needs_original(), SCULPT_TOOL_NUDGE, SCULPT_TOOL_PAINT, SCULPT_TOOL_PINCH, SCULPT_TOOL_POSE, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SCRAPE, SCULPT_TOOL_SLIDE_RELAX, SCULPT_TOOL_SMEAR, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, SCULPT_UNDO_FACE_SETS, SCULPT_undo_push_node(), SCULPT_vertex_count_get(), SculptThreadedTaskData::sd, Brush::smooth_deform_type, StrokeCache::supports_gravity, StrokeCache::surface_smooth_laplacian_disp, Brush::topology_rake_factor, StrokeCache::true_location, type, update_brush_local_mat(), and update_sculpt_normal().
Referenced by sculpt_stroke_update_step().
|
static |
Definition at line 5876 of file sculpt.c.
References StrokeCache::alt_smooth, BKE_pbvh_node_mark_redraw(), BKE_pbvh_node_mark_update(), BKE_pbvh_node_mark_update_color(), BKE_pbvh_node_mark_update_mask(), SculptSession::cache, data, ELEM, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_MASK, SCULPT_TOOL_PAINT, SCULPT_TOOL_SMEAR, SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_MASK, and SCULPT_undo_push_node().
Referenced by do_brush_action().
Definition at line 5103 of file sculpt.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, 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().
|
static |
Definition at line 5050 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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, and sub_v3_v3v3().
Referenced by do_clay_brush().
|
static |
Definition at line 5229 of file sculpt.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(), 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().
|
static |
Definition at line 5169 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and Brush::tip_roundness.
Referenced by do_clay_strips_brush().
Definition at line 5605 of file sculpt.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(), 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().
|
static |
Definition at line 5523 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, interp_v3_v3v3(), invert_m4_m4(), PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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, and sub_v3_v3v3().
Referenced by do_clay_thumb_brush().
Definition at line 3814 of file sculpt.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(), 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().
|
static |
Used for 'SCULPT_TOOL_CREASE' and 'SCULPT_TOOL_BLOB'
Definition at line 3754 of file sculpt.c.
References add_v3_v3v3(), BKE_pbvh_node_add_proxy(), 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, MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, SculptBrushTest::location, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v3_fl(), 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(), sculpt_project_v3(), sqrtf, sub_v3_v3v3(), and StrokeCache::view_normal.
Referenced by do_crease_brush().
|
static |
Definition at line 3111 of file sculpt.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().
|
static |
Definition at line 3067 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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, and sub_v3_v3v3().
Referenced by do_displacement_eraser_brush().
|
static |
Definition at line 3237 of file sculpt.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().
|
static |
Definition at line 3134 of file sculpt.c.
References add_v3_v3v3(), 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(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::index, SculptVertexNeighborIter::index, interp_v3_v3v3(), StrokeCache::last_location, StrokeCache::limit_surface_co, StrokeCache::location, madd_v3_v3fl(), PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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, and sub_v3_v3v3().
Referenced by do_displacement_smear_brush().
|
static |
Definition at line 3222 of file sculpt.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 do_displacement_smear_brush().
Definition at line 3316 of file sculpt.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(), Sculpt::paint, StrokeCache::radius, StrokeCache::scale, Object::sculpt, and SCULPT_tilt_effective_normal_get().
Referenced by do_brush_action().
|
static |
Definition at line 3273 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), and sqrtf.
Referenced by do_draw_brush().
Definition at line 3395 of file sculpt.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(), Sculpt::paint, StrokeCache::radius, StrokeCache::scale, Object::sculpt, and SCULPT_tilt_effective_normal_get().
Referenced by do_brush_action().
|
static |
Definition at line 3348 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), PBVHProxyNode::co, SculptOrigVertData::co, data, SculptBrushTest::dist, fade(), MVert::flag, float(), PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and sqrtf.
Referenced by do_draw_sharp_brush().
|
static |
Definition at line 4150 of file sculpt.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().
|
static |
Definition at line 4067 of file sculpt.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_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, MVert::flag, float(), PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::initial_mouse, len_v3(), StrokeCache::location, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and SCULPT_orig_vert_data_update().
Referenced by do_elastic_deform_brush().
|
static |
Definition at line 8910 of file sculpt.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::co, NearestVertexFakeNeighborTLSData::current_topology_id, data, SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, SculptSession::fake_neighbors, PBVHVertexIter::index, len_squared_v3v3(), NearestVertexFakeNeighborTLSData::nearest_vertex_distance_squared, NearestVertexFakeNeighborTLSData::nearest_vertex_index, SculptSession::pbvh, PBVH_ITER_UNIQUE, and SCULPT_vertex_get_connected_component().
Referenced by SCULPT_fake_neighbor_search().
Definition at line 5382 of file sculpt.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(), 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().
|
static |
Definition at line 5322 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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, and sub_v3_v3v3().
Referenced by do_fill_brush().
Definition at line 4949 of file sculpt.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(), 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().
|
static |
Definition at line 4894 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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, and sub_v3_v3v3().
Referenced by do_flatten_brush().
Definition at line 4042 of file sculpt.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().
|
static |
Definition at line 3981 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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, data, SculptBrushTest::dist, dot_v3v3(), fade(), MVert::flag, Brush::flag2, float(), StrokeCache::grab_delta_symmetry, PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::initial_normal, PBVHVertexIter::mask, max_ff(), ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), PBVHVertexIter::mvert, SculptOrigVertData::no, normal_short_to_float_v3(), 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(), and sqrtf.
Referenced by do_grab_brush().
|
static |
Definition at line 5735 of file sculpt.c.
References BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, data, do_gravity_task_cb_ex(), StrokeCache::gravity_direction, mul_v3_fl(), mul_v3_v3fl(), mul_v3_v3v3(), Sculpt::paint, StrokeCache::radius_squared, StrokeCache::scale, and Object::sculpt.
Referenced by blo_do_versions_250(), and do_brush_action().
|
static |
Definition at line 5693 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_task_parallel_thread_id(), PBVHProxyNode::co, PBVHVertexIter::co, data, SculptBrushTest::dist, fade(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), and sqrtf.
Referenced by do_gravity().
Definition at line 4844 of file sculpt.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().
|
static |
Definition at line 4793 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, normal_short_to_float_v3(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::radius, StrokeCache::scale, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), and sqrtf.
Referenced by do_inflate_brush().
Definition at line 4771 of file sculpt.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().
|
static |
Definition at line 4677 of file sculpt.c.
References add_v3_v3v3(), 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, data, SculptPersistentBase::disp, SculptBrushTest::dist, fabsf, fade(), Brush::flag, MVert::flag, PBVHVertexIter::fno, Brush::height, PBVHVertexIter::index, StrokeCache::invert, StrokeCache::layer_displacement_factor, madd_v3_v3v3fl(), PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v3_fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptOrigVertData::no, normal, normal_short_to_float_v3(), 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_vertex_persistent_co_get(), SCULPT_vertex_persistent_normal_get(), sqrtf, and sub_v3_v3v3().
Referenced by do_layer_brush().
Definition at line 3048 of file sculpt.c.
References BKE_paint_brush(), BRUSH_MASK_DRAW, BRUSH_MASK_SMOOTH, StrokeCache::bstrength, SculptSession::cache, do_mask_brush_draw(), Brush::mask_tool, Sculpt::paint, Object::sculpt, and SCULPT_smooth().
Referenced by do_brush_action().
Definition at line 3031 of file sculpt.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 do_mask_brush().
|
static |
Definition at line 2992 of file sculpt.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(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), and sqrtf.
Referenced by do_mask_brush_draw().
|
static |
Definition at line 9176 of file sculpt.c.
References BKE_pbvh_node_mark_redraw(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, data, MVert::flag, PBVHVertexIter::index, invert(), PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, PBVHVertexIter::mvert, SculptSession::pbvh, PBVH_ITER_UNIQUE, sculpt_mask_by_color_final_mask_get(), SCULPT_UNDO_MASK, and SCULPT_undo_push_node().
Referenced by sculpt_mask_by_color_contiguous().
|
static |
Definition at line 9279 of file sculpt.c.
References BKE_pbvh_node_mark_redraw(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::col, data, MVert::flag, invert(), PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, PBVHVertexIter::mvert, SculptSession::pbvh, PBVH_ITER_UNIQUE, sculpt_mask_by_color_delta_get(), sculpt_mask_by_color_final_mask_get(), SCULPT_UNDO_MASK, SCULPT_undo_push_node(), and SCULPT_vertex_color_get().
Referenced by sculpt_mask_by_color_full_mesh().
|
static |
Definition at line 964 of file sculpt.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::co, data, PBVHVertexIter::index, len_squared_v3v3(), NearestVertexTLSData::nearest_vertex_distance_squared, NearestVertexTLSData::nearest_vertex_index, SculptSession::pbvh, and PBVH_ITER_UNIQUE.
Referenced by SCULPT_nearest_vertex_get().
Definition at line 4360 of file sculpt.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().
|
static |
Definition at line 4317 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), and sqrtf.
Referenced by do_nudge_brush().
Definition at line 3933 of file sculpt.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().
|
static |
Definition at line 3867 of file sculpt.c.
References add_v3_v3v3(), BKE_pbvh_node_add_proxy(), 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, MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, SculptBrushTest::location, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and StrokeCache::view_normal.
Referenced by do_pinch_brush().
|
static |
Definition at line 6510 of file sculpt.c.
References angle(), SculptSession::cache, do_tiled(), M_PI, Sculpt::radial_symm, StrokeCache::radial_symmetry_pass, Object::sculpt, and SCULPT_cache_calc_brushdata_symm().
Referenced by do_symmetrical_brush_actions().
Definition at line 4656 of file sculpt.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().
|
static |
Definition at line 4603 of file sculpt.c.
References add_v3_v3(), angle(), axis_angle_normalized_to_mat3(), BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::location, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), sqrtf, sub_v3_v3(), and sub_v3_v3v3().
Referenced by do_rotate_brush().
Definition at line 5480 of file sculpt.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(), 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().
|
static |
Definition at line 5421 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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, and sub_v3_v3v3().
Referenced by do_scrape_brush().
|
static |
Definition at line 3632 of file sculpt.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 4492 of file sculpt.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().
|
static |
Definition at line 4385 of file sculpt.c.
References add_v3_v3(), StrokeCache::automasking, BKE_kelvinlet_grab_triscale(), BKE_kelvinlet_init_params(), BKE_pbvh_node_add_proxy(), 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, MVert::flag, float(), PBVHVertexIter::fno, PBVHVertexIter::i, PBVHVertexIter::index, StrokeCache::is_rake_rotation_valid, len_v3(), SculptBrushTest::location, StrokeCache::location, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and StrokeCache::true_view_normal.
Referenced by do_snake_hook_brush().
|
static |
Definition at line 6544 of file sculpt.c.
References BKE_paint_brush(), brush_strength(), StrokeCache::bstrength, SculptSession::cache, calc_symmetry_feather(), do_radial_symmetry(), do_tiled(), StrokeCache::mirror_symmetry_pass, Sculpt::paint, StrokeCache::radial_symmetry_pass, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), and StrokeCache::symmetry.
Referenced by sculpt_stroke_update_step().
Definition at line 4578 of file sculpt.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 |
Definition at line 4530 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and sqrtf.
Referenced by do_thumb_brush().
|
static |
Definition at line 6450 of file sculpt.c.
References BKE_object_boundbox_get(), SculptSession::cache, copy_v3_v3(), copy_v3_v3_int(), StrokeCache::initial_location, StrokeCache::location, Sculpt::paint, PAINT_TILE_X, StrokeCache::plane_offset, StrokeCache::radius, Object::sculpt, Paint::symmetry_flags, Paint::tile_offset, StrokeCache::tile_pass, and BoundBox::vec.
Referenced by do_radial_symmetry(), and do_symmetrical_brush_actions().
|
static |
Definition at line 2905 of file sculpt.c.
References 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(), MVert::flag, PBVHVertexIter::fno, StrokeCache::grab_delta_symmetry, PBVHVertexIter::index, is_zero_v3(), madd_v3_v3v3fl(), PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and sub_v3_v3v3().
Referenced by bmesh_topology_rake().
|
static |
Definition at line 3588 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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(), and sqrtf.
Referenced by do_slide_relax_brush().
|
static |
Definition at line 3431 of file sculpt.c.
References BKE_pbvh_node_add_proxy(), 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(), MVert::flag, float(), PBVHVertexIter::i, PBVHVertexIter::index, SculptVertexNeighborIter::index, StrokeCache::last_location, StrokeCache::location, madd_v3_v3fl(), PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, 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_vertex_co_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, Brush::slide_deform_type, sqrtf, and sub_v3_v3v3().
Referenced by do_slide_relax_brush().
| void ED_object_sculptmode_enter | ( | struct bContext * | C, |
| Depsgraph * | depsgraph, | ||
| ReportList * | reports | ||
| ) |
Definition at line 8479 of file sculpt.c.
References C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), depsgraph, ED_object_sculptmode_enter_ex(), OBACT, and scene.
| void ED_object_sculptmode_enter_ex | ( | Main * | bmain, |
| Depsgraph * | depsgraph, | ||
| Scene * | scene, | ||
| Object * | ob, | ||
| const bool | force_dyntopo, | ||
| ReportList * | reports | ||
| ) |
Definition at line 8391 of file sculpt.c.
References BKE_mesh_from_object(), BKE_paint_get_active_from_paintmode(), BKE_paint_init(), BKE_report(), BKE_reportf(), BKE_sculpt_multires_active(), BLI_assert, DEG_id_tag_update(), depsgraph, DYNTOPO_WARN_EDATA, DYNTOPO_WARN_LDATA, DYNTOPO_WARN_MODIFIER, DYNTOPO_WARN_VDATA, fabsf, ListBase::first, Mesh::flag, Object::id, ID_RECALC_COPY_ON_WRITE, is_negative_m4(), ME_SCULPT_DYNAMIC_TOPOLOGY, Object::mode, NULL, OB_MODE_SCULPT, Object::obmat, PAINT_CURSOR_SCULPT, paint_cursor_start(), PAINT_MODE_SCULPT, RPT_WARNING, Object::scale, scene, SCULPT_dynamic_topology_check(), SCULPT_dynamic_topology_enable_ex(), sculpt_init_session(), SCULPT_mode_poll_view3d(), SCULPT_UNDO_DYNTOPO_BEGIN, SCULPT_undo_push_begin(), SCULPT_undo_push_end(), SCULPT_undo_push_node(), TIP_, Mesh::totloop, Mesh::totpoly, wmWindowManager::undo_stack, and Main::wm.
Referenced by ED_editors_init(), ED_object_sculptmode_enter(), sculpt_mode_toggle_exec(), and sculpt_undosys_step_decode().
Definition at line 8531 of file sculpt.c.
References C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), depsgraph, ED_object_sculptmode_exit_ex(), OBACT, and scene.
Referenced by geometry_extract_apply().
| void ED_object_sculptmode_exit_ex | ( | Main * | bmain, |
| Depsgraph * | depsgraph, | ||
| Scene * | scene, | ||
| Object * | ob | ||
| ) |
Definition at line 8488 of file sculpt.c.
References BKE_mesh_from_object(), BKE_object_free_derived_caches(), BKE_sculpt_multires_active(), BKE_sculptsession_free(), SculptSession::bm, DEG_id_tag_update(), depsgraph, Mesh::flag, Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, ME_SCULPT_DYNAMIC_TOPOLOGY, Object::mode, multires_flush_sculpt_updates(), OB_MODE_SCULPT, paint_cursor_delete_textures(), scene, Object::sculpt, and sculpt_dynamic_topology_disable_with_undo().
Referenced by ed_object_mode_generic_exit_ex(), ED_object_sculptmode_exit(), and sculpt_mode_toggle_exec().
| void ED_operatortypes_sculpt | ( | void | ) |
Definition at line 9426 of file sculpt.c.
References SCULPT_OT_brush_stroke(), SCULPT_OT_cloth_filter(), SCULPT_OT_color_filter(), SCULPT_OT_detail_flood_fill(), SCULPT_OT_dirty_mask(), SCULPT_OT_dynamic_topology_toggle(), SCULPT_OT_dyntopo_detail_size_edit(), SCULPT_OT_expand(), SCULPT_OT_face_set_box_gesture(), SCULPT_OT_face_set_lasso_gesture(), 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_loop_to_vertex_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_project_line_gesture(), SCULPT_OT_sample_color(), SCULPT_OT_sample_detail_size(), SCULPT_OT_sculptmode_toggle(), SCULPT_OT_set_detail_size(), SCULPT_OT_set_persistent_base(), SCULPT_OT_set_pivot_position(), SCULPT_OT_symmetrize(), SCULPT_OT_trim_box_gesture(), SCULPT_OT_trim_lasso_gesture(), SCULPT_OT_vertex_to_loop_colors(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
Definition at line 1592 of file sculpt.c.
References BKE_pbvh_update_bounds(), SculptSession::cache, StrokeCache::current_r, paint_calc_redraw_planes(), SculptSession::pbvh, PBVH_UpdateRedraw, StrokeCache::previous_r, Object::sculpt, and sculpt_extend_redraw_rect_previous().
|
static |
Definition at line 8934 of file sculpt.c.
References NearestVertexFakeNeighborTLSData::nearest_vertex_distance_squared, and NearestVertexFakeNeighborTLSData::nearest_vertex_index.
Referenced by SCULPT_fake_neighbor_search().
|
static |
Definition at line 1853 of file sculpt.c.
References flip_qt_qt().
Referenced by SCULPT_flip_quat_by_symm_area().
|
static |
Definition at line 1848 of file sculpt.c.
References flip_v3_v3(), and v.
Referenced by calc_sculpt_plane(), SCULPT_calc_brush_plane(), SCULPT_flip_v3_by_symm_area(), and update_sculpt_normal().
|
static |
Definition at line 1797 of file sculpt.c.
References BRUSH_FRONTFACE, dot(), dot_v3v3(), Brush::flag, and normal_short_to_float_v3().
Referenced by SCULPT_brush_strength_factor().
|
static |
Definition at line 8742 of file sculpt.c.
References MLoopCol::a, MLoopCol::b, C, CD_MLOOP, CD_MLOOPCOL, CD_MPOLY, CD_PROP_COLOR, MPropCol::color, CTX_data_active_object(), CustomData_get_active_layer(), CustomData_get_layer(), CustomData_get_layer_n(), data, Object::data, DEG_id_tag_update(), MLoopCol::g, Object::id, ID_IS_LINKED, ID_RECALC_GEOMETRY, Mesh::ldata, MPoly::loopstart, mesh, NC_GEOM, ND_DATA, OB_MESH, OPERATOR_CANCELLED, OPERATOR_FINISHED, MLoopCol::r, MPoly::totloop, Mesh::totpoly, Object::type, MLoop::v, and WM_event_add_notifier().
Referenced by SCULPT_OT_loop_to_vertex_colors().
|
static |
Definition at line 984 of file sculpt.c.
References NearestVertexTLSData::nearest_vertex_distance_squared, and NearestVertexTLSData::nearest_vertex_index.
Referenced by SCULPT_nearest_vertex_get().
|
static |
Definition at line 7892 of file sculpt.c.
References C, SCULPT_stroke_get_location(), x, and y.
Referenced by sculpt_brush_stroke_invoke(), and sculpt_stroke_test_start().
Disable multi-threading when dynamic-topology is enabled. Otherwise, new entries might be inserted by SCULPT_undo_push_node() into the GHash used internally by BM_log_original_vert_co() by a different thread. See T33787.
Definition at line 1518 of file sculpt.c.
References BKE_paint_brush(), BKE_pbvh_node_color_buffer_free(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), SculptSession::bm, data, MEM_SAFE_FREE, NULL, Sculpt::paint, paint_mesh_restore_co_task_cb(), SculptSession::pbvh, and Object::sculpt.
Referenced by sculpt_brush_stroke_cancel(), and sculpt_restore_mesh().
|
static |
Definition at line 1463 of file sculpt.c.
References BKE_pbvh_node_mark_update(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, SculptSession::bm, PBVHVertexIter::co, SculptOrigVertData::co, PBVHVertexIter::col, SculptOrigVertData::col, copy_v3_v3(), copy_v3_v3_short(), copy_v4_v4(), data, MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::mask, SculptOrigVertData::mask, ME_VERT_PBVH_UPDATE, PBVHVertexIter::mvert, PBVHVertexIter::no, SculptOrigVertData::no, normal_short_to_float_v3(), SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_orig_vert_data_unode_init(), SCULPT_orig_vert_data_update(), SCULPT_TOOL_MASK, SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_undo_get_node(), SCULPT_UNDO_MASK, SCULPT_undo_push_node(), SculptUndoNode::type, type, and SculptOrigVertData::unode.
Referenced by paint_mesh_restore_co().
|
static |
Definition at line 4866 of file sculpt.c.
References plane_point_side_v3().
Referenced by do_clay_strips_brush_task_cb_ex().
| int SCULPT_active_face_set_get | ( | SculptSession * | ss | ) |
Definition at line 331 of file sculpt.c.
References SculptSession::active_face_index, SculptSession::active_grid_index, BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SCULPT_FACE_SET_NONE, and SculptSession::subdiv_ccg.
Referenced by do_brush_action(), ED_sculpt_face_sets_active_update_and_get(), pose_ik_chain_init_face_sets_fk(), SCULPT_automasking_cache_settings_update(), sculpt_cloth_filter_invoke(), sculpt_expand_set_initial_components_for_mouse(), sculpt_face_set_edit_invoke(), sculpt_face_sets_automasking_init(), and sculpt_face_sets_change_visibility_exec().
| const float* SCULPT_active_vertex_co_get | ( | SculptSession * | ss | ) |
Definition at line 285 of file sculpt.c.
References SCULPT_active_vertex_get(), and SCULPT_vertex_co_get().
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive(), pose_ik_chain_init_face_sets(), sample_detail_voxel(), sculpt_cloth_filter_invoke(), SCULPT_cursor_geometry_info_update(), SCULPT_do_boundary_brush(), sculpt_face_sets_change_visibility_exec(), SCULPT_floodfill_add_active(), SCULPT_geometry_preview_lines_update(), sculpt_mask_expand_invoke(), sculpt_set_pivot_position_exec(), and SCULPT_topology_automasking_init().
| int SCULPT_active_vertex_get | ( | SculptSession * | ss | ) |
Definition at line 277 of file sculpt.c.
References SculptSession::active_vertex_index, BKE_pbvh_type(), ELEM, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, and PBVH_GRIDS.
Referenced by dyntopo_detail_size_sample_from_surface(), paint_cursor_draw_3d_view_brush_cursor_inactive(), pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sample_detail_voxel(), SCULPT_active_vertex_co_get(), SCULPT_active_vertex_normal_get(), SCULPT_do_boundary_brush(), sculpt_expand_set_initial_components_for_mouse(), sculpt_expand_target_vertex_update_and_get(), sculpt_expand_task_cb(), SCULPT_floodfill_add_active(), SCULPT_geometry_preview_lines_update(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), sculpt_sample_color_invoke(), and sculpt_update_brush_delta().
| void SCULPT_active_vertex_normal_get | ( | SculptSession * | ss, |
| float | normal[3] | ||
| ) |
Definition at line 290 of file sculpt.c.
References normal, SCULPT_active_vertex_get(), and SCULPT_vertex_normal_get().
Referenced by sculpt_mask_expand_invoke().
| void SCULPT_boundary_info_ensure | ( | Object * | object | ) |
Definition at line 9039 of file sculpt.c.
References BKE_mesh_from_object(), BLI_BITMAP_NEW, BLI_BITMAP_SET, SculptVertexInfo::boundary, e, MLoop::e, l, MPoly::loopstart, Mesh::medge, MEM_calloc_arrayN, MEM_freeN, Mesh::mloop, Mesh::mpoly, Mesh::totedge, MPoly::totloop, Mesh::totpoly, Mesh::totvert, MEdge::v1, MEdge::v2, and SculptSession::vertex_info.
Referenced by do_slide_relax_brush(), SCULPT_automasking_cache_init(), SCULPT_boundary_data_init(), SCULPT_do_draw_face_sets_brush(), SCULPT_enhance_details_brush(), sculpt_expand_ensure_sculptsession_data(), sculpt_face_set_edit_fair_face_set(), sculpt_mesh_filter_invoke(), and SCULPT_smooth().
| float* SCULPT_brush_deform_target_vertex_co_get | ( | SculptSession * | ss, |
| const int | deform_target, | ||
| PBVHVertexIter * | iter | ||
| ) |
Definition at line 310 of file sculpt.c.
References BRUSH_DEFORM_TARGET_CLOTH_SIM, BRUSH_DEFORM_TARGET_GEOMETRY, SculptSession::cache, StrokeCache::cloth_sim, PBVHVertexIter::co, SculptClothSimulation::deformation_pos, and PBVHVertexIter::index.
Referenced by do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), and do_pose_brush_task_cb_ex().
|
static |
Definition at line 6950 of file sculpt.c.
References max_ff(), pow3f(), powf, StrokeCache::pressure, sculpt_clay_thumb_get_stabilized_pressure(), Brush::sculpt_tool, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS, and SCULPT_TOOL_CLAY_THUMB.
Referenced by sculpt_update_cache_variants().
|
static |
Definition at line 7994 of file sculpt.c.
References BKE_paint_brush(), bNodeTree::execdata, Brush::mtex, Tex::nodetree, ntreeTexEndExecTree(), Sculpt::paint, and MTex::tex.
Referenced by sculpt_brush_stroke_cancel(), and sculpt_stroke_done().
| const float* SCULPT_brush_frontface_normal_from_falloff_shape | ( | SculptSession * | ss, |
| char | falloff_shape | ||
| ) |
Definition at line 1787 of file sculpt.c.
References SculptSession::cache, PAINT_FALLOFF_SHAPE_SPHERE, StrokeCache::sculpt_normal_symm, and StrokeCache::view_normal.
Referenced by do_vpaint_brush_blur_task_cb_ex(), do_vpaint_brush_draw_task_cb_ex(), do_vpaint_brush_smear_task_cb_ex(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_calc_average_weight_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), and do_wpaint_brush_smear_task_cb_ex().
|
static |
Definition at line 7663 of file sculpt.c.
References BKE_paint_brush(), Brush::mtex, Tex::nodetree, ntreeTexBeginExecTree(), Sculpt::paint, scene, sculpt_update_tex(), and MTex::tex.
Referenced by sculpt_brush_stroke_init().
|
static |
Test whether the StrokeCache.sculpt_normal needs update in do_brush_action
Definition at line 1240 of file sculpt.c.
References MTex::brush_map_mode, SculptSession::cache, ELEM, Brush::mtex, MTEX_MAP_MODE_AREA, StrokeCache::normal_weight, sculpt_brush_use_topology_rake(), Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_CLOTH, SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_DRAW_SHARP, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_HAS_NORMAL_WEIGHT, SCULPT_TOOL_LAYER, SCULPT_TOOL_NUDGE, SCULPT_TOOL_ROTATE, and SCULPT_TOOL_THUMB.
Referenced by do_brush_action().
|
static |
Definition at line 1262 of file sculpt.c.
References Brush::rake_factor, Brush::sculpt_tool, and SCULPT_TOOL_HAS_RAKE.
Referenced by sculpt_update_brush_delta().
| float SCULPT_brush_plane_offset_get | ( | Sculpt * | sd, |
| SculptSession * | ss | ||
| ) |
Definition at line 4881 of file sculpt.c.
References BKE_paint_brush(), BRUSH_OFFSET_PRESSURE, SculptSession::cache, Brush::flag, Sculpt::paint, Brush::plane_offset, and StrokeCache::pressure.
Referenced by do_clay_brush(), do_clay_strips_brush(), do_clay_thumb_brush(), do_fill_brush(), do_flatten_brush(), do_scrape_brush(), and SCULPT_do_multiplane_scrape_brush().
| float SCULPT_brush_strength_factor | ( | SculptSession * | ss, |
| const Brush * | br, | ||
| const float | brush_point[3], | ||
| const float | len, | ||
| const short | vno[3], | ||
| const float | fno[3], | ||
| const float | mask, | ||
| const int | vertex_index, | ||
| const int | thread_id | ||
| ) |
Definition at line 2463 of file sculpt.c.
References StrokeCache::automasking, BKE_brush_curve_strength(), BKE_brush_sample_tex_3d(), StrokeCache::brush_local_mat, MTex::brush_map_mode, SculptSession::cache, ED_view3d_project_float_v2_m4(), flip_v3_v3(), frontface(), StrokeCache::hardness, len, mask(), StrokeCache::mirror_symmetry_pass, Brush::mtex, MTEX_MAP_MODE_3D, MTEX_MAP_MODE_AREA, mul_m4_v3(), MTex::ofs, StrokeCache::paint_brush, paint_get_tex_pixel(), StrokeCache::plane_offset, StrokeCache::projection_mat, StrokeCache::radial_symmetry_pass, StrokeCache::radius, ViewContext::region, scene, ViewContext::scene, SCULPT_automasking_factor_get(), MTex::size, sub_v3_v3v3(), StrokeCache::symm_rot_mat_inv, MTex::tex, SculptSession::tex_pool, SculptSession::texcache, Brush::texture_sample_bias, StrokeCache::vc, StrokeCache::view_normal, x, and y.
Referenced by calc_multiplane_scrape_surface_task_cb(), do_clay_brush_task_cb_ex(), do_clay_strips_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_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(), SCULPT_do_surface_smooth_brush_displace_task_cb_ex(), and SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex().
|
static |
Definition at line 8125 of file sculpt.c.
References BKE_paint_brush(), PaintStroke::brush, C, SculptSession::cache, CTX_data_active_object(), CTX_data_tool_settings(), NULL, Sculpt::paint, paint_mesh_restore_co(), paint_stroke_cancel(), Object::sculpt, ToolSettings::sculpt, sculpt_brush_exit_tex(), SCULPT_cache_free(), and SCULPT_stroke_is_dynamic_topology().
Referenced by SCULPT_OT_brush_stroke().
|
static |
Definition at line 8106 of file sculpt.c.
References C, wmOperator::customdata, NULL, OPERATOR_FINISHED, paint_stroke_exec(), paint_stroke_new(), sculpt_brush_stroke_init(), sculpt_stroke_done(), SCULPT_stroke_get_location(), sculpt_stroke_test_start(), and sculpt_stroke_update_step().
Referenced by SCULPT_OT_brush_stroke().
|
static |
Definition at line 7679 of file sculpt.c.
References BKE_paint_brush(), BKE_sculpt_color_layer_create_if_needed(), BKE_sculpt_update_object_for_edit(), BRUSH_DEFORM_TARGET_CLOTH_SIM, C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), Brush::deform_target, depsgraph, ELEM, Sculpt::paint, wmOperator::ptr, RNA_enum_get(), scene, Object::sculpt, ToolSettings::sculpt, sculpt_brush_init_tex(), sculpt_needs_connectivity_info(), Brush::sculpt_tool, SCULPT_TOOL_CLOTH, SCULPT_TOOL_MASK, SCULPT_TOOL_PAINT, SCULPT_TOOL_SMEAR, and view3d_operator_needs_opengl().
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
|
static |
Definition at line 8066 of file sculpt.c.
References BLI_assert, C, wmOperator::customdata, wmOperatorType::modal, NULL, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, over_mesh(), paint_stroke_free(), paint_stroke_new(), wmOperator::ptr, RNA_boolean_get(), sculpt_brush_stroke_init(), sculpt_stroke_done(), SCULPT_stroke_get_location(), sculpt_stroke_test_start(), sculpt_stroke_update_step(), wmOperator::type, wmEvent::type, WM_event_add_modal_handler(), wmEvent::x, and wmEvent::y.
Referenced by SCULPT_OT_brush_stroke().
| bool SCULPT_brush_test_circle_sq | ( | SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1705 of file sculpt.c.
References closest_to_plane_normalized_v3(), SculptBrushTest::dist, len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::plane_view, SculptBrushTest::radius_squared, and sculpt_brush_test_clipping().
Referenced by SCULPT_brush_test_init_with_falloff_shape().
| BLI_INLINE bool sculpt_brush_test_clipping | ( | const SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1653 of file sculpt.c.
References SculptBrushTest::clip_rv3d, ED_view3d_clipping_test(), flip_v3_v3(), SculptBrushTest::mirror_symmetry_pass, mul_m4_v3(), SculptBrushTest::radial_symmetry_pass, and SculptBrushTest::symm_rot_mat_inv.
Referenced by SCULPT_brush_test_circle_sq(), SCULPT_brush_test_cube(), SCULPT_brush_test_sphere(), SCULPT_brush_test_sphere_fast(), and SCULPT_brush_test_sphere_sq().
| bool SCULPT_brush_test_cube | ( | SculptBrushTest * | test, |
| const float | co[3], | ||
| const float | local[4][4], | ||
| const float | roundness | ||
| ) |
Definition at line 1723 of file sculpt.c.
References copy_v3_fl(), SculptBrushTest::dist, fabsf, len_v2v2(), M_SQRT1_2, max_ff(), min_ff(), mul_v3_m4v3(), and sculpt_brush_test_clipping().
Referenced by do_clay_strips_brush_task_cb_ex(), and do_paint_brush_task_cb_ex().
| void SCULPT_brush_test_init | ( | SculptSession * | ss, |
| SculptBrushTest * | test | ||
| ) |
Definition at line 1616 of file sculpt.c.
References SculptSession::cache, SculptBrushTest::clip_rv3d, copy_m4_m4(), copy_v3_v3(), SculptSession::cursor_location, SculptSession::cursor_radius, SculptBrushTest::dist, SculptBrushTest::location, StrokeCache::location, SculptBrushTest::mirror_symmetry_pass, StrokeCache::mirror_symmetry_pass, NULL, SculptBrushTest::plane_tool, SculptBrushTest::plane_view, SculptBrushTest::radial_symmetry_pass, StrokeCache::radial_symmetry_pass, SculptBrushTest::radius, SculptBrushTest::radius_squared, StrokeCache::radius_squared, SculptSession::rv3d, ViewContext::rv3d, RV3D_CLIPPING_ENABLED, sqrtf, SculptBrushTest::symm_rot_mat_inv, StrokeCache::symm_rot_mat_inv, unit_m4(), SculptSession::v3d, ViewContext::v3d, StrokeCache::vc, and zero_v4().
Referenced by do_clay_strips_brush_task_cb_ex(), and SCULPT_brush_test_init_with_falloff_shape().
| SculptBrushTestFn SCULPT_brush_test_init_with_falloff_shape | ( | SculptSession * | ss, |
| SculptBrushTest * | test, | ||
| char | falloff_shape | ||
| ) |
Definition at line 1770 of file sculpt.c.
References SculptSession::cache, SculptBrushTest::location, PAINT_FALLOFF_SHAPE_SPHERE, plane_from_point_normal_v3(), SculptBrushTest::plane_view, SCULPT_brush_test_circle_sq(), SCULPT_brush_test_init(), SCULPT_brush_test_sphere_sq(), and StrokeCache::view_normal.
Referenced by calc_area_normal_and_center_task_cb(), calc_clay_surface_task_cb(), calc_multiplane_scrape_surface_task_cb(), do_clay_brush_task_cb_ex(), do_clay_thumb_brush_task_cb_ex(), do_cloth_brush_apply_forces_task_cb_ex(), do_color_smooth_task_cb_exec(), do_crease_brush_task_cb_ex(), do_displacement_eraser_brush_task_cb_ex(), do_displacement_smear_brush_task_cb_ex(), do_draw_brush_task_cb_ex(), do_draw_face_sets_brush_task_cb_ex(), do_draw_sharp_brush_task_cb_ex(), do_enhance_details_brush_task_cb_ex(), do_fill_brush_task_cb_ex(), do_flatten_brush_task_cb_ex(), do_grab_brush_task_cb_ex(), do_gravity_task_cb_ex(), do_inflate_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_mask_brush_draw_task_cb_ex(), do_multiplane_scrape_brush_task_cb_ex(), do_nudge_brush_task_cb_ex(), do_paint_brush_task_cb_ex(), do_pinch_brush_task_cb_ex(), do_relax_face_sets_brush_task_cb_ex(), do_rotate_brush_task_cb_ex(), do_sample_wet_paint_task_cb(), do_scrape_brush_task_cb_ex(), do_smear_brush_task_cb_exec(), do_smooth_brush_task_cb_ex(), do_snake_hook_brush_task_cb_ex(), do_thumb_brush_task_cb_ex(), do_topology_rake_bmesh_task_cb_ex(), do_topology_relax_task_cb_ex(), do_topology_slide_task_cb_ex(), do_vpaint_brush_blur_task_cb_ex(), do_vpaint_brush_calc_average_color_cb_ex(), do_vpaint_brush_draw_task_cb_ex(), do_vpaint_brush_smear_task_cb_ex(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_calc_average_weight_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), do_wpaint_brush_smear_task_cb_ex(), SCULPT_do_surface_smooth_brush_displace_task_cb_ex(), and SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex().
| bool SCULPT_brush_test_sphere | ( | SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1667 of file sculpt.c.
References SculptBrushTest::dist, len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::radius_squared, sculpt_brush_test_clipping(), and sqrtf.
| bool SCULPT_brush_test_sphere_fast | ( | const SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1697 of file sculpt.c.
References len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::radius_squared, and sculpt_brush_test_clipping().
| bool SCULPT_brush_test_sphere_sq | ( | SculptBrushTest * | test, |
| const float | co[3] | ||
| ) |
Definition at line 1683 of file sculpt.c.
References SculptBrushTest::dist, len_squared_v3v3(), SculptBrushTest::location, SculptBrushTest::radius_squared, and sculpt_brush_test_clipping().
Referenced by SCULPT_brush_test_init_with_falloff_shape().
|
static |
Definition at line 1231 of file sculpt.c.
References SculptSession::bm, NULL, Brush::sculpt_tool, SCULPT_TOOL_HAS_TOPOLOGY_RAKE, and Brush::topology_rake_factor.
Referenced by do_brush_action(), sculpt_brush_needs_normal(), and sculpt_update_brush_delta().
| void SCULPT_cache_calc_brushdata_symm | ( | StrokeCache * | cache, |
| const char | symm, | ||
| const char | axis, | ||
| const float | angle | ||
| ) |
Flip all the edit-data across the axis/axes specified by symm. Used to calculate multiple modifications to the mesh when symmetry is enabled.
Definition at line 6397 of file sculpt.c.
References angle(), flip_qt_qt(), flip_v3_v3(), CCL_NAMESPACE_BEGIN::frac(), StrokeCache::grab_delta, StrokeCache::grab_delta_symmetry, StrokeCache::gravity_direction, StrokeCache::initial_location, StrokeCache::initial_normal, StrokeCache::is_rake_rotation_valid, StrokeCache::last_location, StrokeCache::location, mul_m4_v3(), mul_v3_fl(), Sculpt::paint, PAINT_SYMMETRY_FEATHER, StrokeCache::plane_offset, StrokeCache::rake_rotation, StrokeCache::rake_rotation_symmetry, rotate_m4(), StrokeCache::supports_gravity, StrokeCache::symm_rot_mat, StrokeCache::symm_rot_mat_inv, Paint::symmetry_flags, StrokeCache::true_gravity_direction, StrokeCache::true_initial_location, StrokeCache::true_initial_normal, StrokeCache::true_last_location, StrokeCache::true_location, StrokeCache::true_view_normal, unit_m4(), StrokeCache::view_normal, and zero_v3().
Referenced by do_radial_symmetry(), do_symmetrical_brush_actions(), vpaint_do_paint(), vpaint_do_symmetrical_brush_actions(), wpaint_do_paint(), and wpaint_do_symmetrical_brush_actions().
| void SCULPT_cache_free | ( | StrokeCache * | cache | ) |
Operator for applying a stroke (various attributes including mouse path) using the current brush.
Definition at line 6708 of file sculpt.c.
References StrokeCache::boundaries, StrokeCache::cloth_sim, StrokeCache::detail_directions, StrokeCache::dial, StrokeCache::layer_displacement_factor, StrokeCache::limit_surface_co, MEM_freeN, MEM_SAFE_FREE, PAINT_SYMM_AREAS, StrokeCache::pose_ik_chain, StrokeCache::prev_colors, StrokeCache::prev_displacement, SCULPT_boundary_data_free(), SCULPT_cloth_simulation_free(), SCULPT_pose_ik_chain_free(), and StrokeCache::surface_smooth_laplacian_disp.
Referenced by ed_vwpaintmode_enter_generic(), ed_vwpaintmode_exit_generic(), sculpt_brush_stroke_cancel(), sculpt_stroke_done(), vpaint_cancel(), vpaint_stroke_done(), wpaint_cancel(), and wpaint_stroke_done().
| void SCULPT_calc_area_normal | ( | Sculpt * | sd, |
| Object * | ob, | ||
| PBVHNode ** | nodes, | ||
| int | totnode, | ||
| float | r_area_no[3] | ||
| ) |
Definition at line 2197 of file sculpt.c.
References BKE_paint_brush(), Sculpt::paint, and SCULPT_pbvh_calc_area_normal().
Referenced by calc_sculpt_normal(), do_clay_strips_brush(), do_clay_thumb_brush(), SCULPT_do_multiplane_scrape_brush(), and SCULPT_do_paint_brush().
| void SCULPT_calc_brush_plane | ( | Sculpt * | sd, |
| Object * | ob, | ||
| PBVHNode ** | nodes, | ||
| int | totnode, | ||
| float | r_area_no[3], | ||
| float | r_area_co[3] | ||
| ) |
Definition at line 4228 of file sculpt.c.
References add_v3_v3(), ARRAY_SET_ITEMS, BKE_paint_brush(), BRUSH_ORIGINAL_NORMAL, BRUSH_ORIGINAL_PLANE, SculptSession::cache, calc_area_center(), calc_area_normal_and_center(), copy_v3_v3(), Brush::falloff_shape, Brush::flag, flip_v3(), StrokeCache::last_center, StrokeCache::mirror_symmetry_pass, mul_m4_v3(), normalize_v3(), Sculpt::paint, PAINT_FALLOFF_SHAPE_TUBE, StrokeCache::plane_offset, project_plane_v3_v3v3(), Object::sculpt, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, StrokeCache::sculpt_normal, Brush::sculpt_plane, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SCULPT_stroke_is_main_symmetry_pass(), StrokeCache::symm_rot_mat, StrokeCache::true_view_normal, StrokeCache::view_normal, and zero_v3().
Referenced by cloth_brush_apply_brush_foces(), do_clay_brush(), do_clay_strips_brush(), do_clay_thumb_brush(), do_fill_brush(), do_flatten_brush(), do_scrape_brush(), and SCULPT_do_multiplane_scrape_brush().
|
static |
Definition at line 862 of file sculpt.c.
References BLI_assert, BLI_BITMAP_TEST, SculptVertexInfo::boundary, and SculptSession::vertex_info.
Referenced by SCULPT_vertex_is_boundary().
|
static |
Checks if the face sets of the adjacent faces to the edge between v1 and v2 in the base mesh are equal.
Definition at line 641 of file sculpt.c.
References abs(), MeshElemMap::count, SculptSession::face_sets, MeshElemMap::indices, l, MPoly::loopstart, SculptSession::mloop, SculptSession::mpoly, SculptSession::pmap, MPoly::totloop, MLoop::v, v1, and v2.
Referenced by SCULPT_vertex_has_unique_face_set().
|
static |
Definition at line 620 of file sculpt.c.
References abs(), MeshElemMap::count, SculptSession::face_sets, MeshElemMap::indices, and SculptSession::pmap.
Referenced by SCULPT_vertex_has_unique_face_set().
Definition at line 940 of file sculpt.c.
Referenced by do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), pose_brush_grow_factor_task_cb_ex(), pose_face_sets_floodfill_cb(), pose_topology_floodfill_cb(), sculpt_expand_reposition_pivot(), sculpt_mask_expand_modal(), and sculpt_set_pivot_position_exec().
|
static |
Definition at line 5596 of file sculpt.c.
References StrokeCache::clay_pressure_stabilizer, and SCULPT_CLAY_STABILIZER_LEN.
Referenced by do_clay_thumb_brush(), and sculpt_brush_dynamic_size_get().
| void SCULPT_clip | ( | Sculpt * | sd, |
| SculptSession * | ss, | ||
| float | co[3], | ||
| const float | val[3] | ||
| ) |
Handles clipping against a mirror modifier and SCULPT_LOCK_X/Y/Z axis flags.
Definition at line 2638 of file sculpt.c.
References SculptSession::cache, StrokeCache::clip_mirror_mtx, StrokeCache::clip_tolerance, CLIP_X, fabsf, StrokeCache::flag, Sculpt::flags, invert_m4_m4(), mul_m4_v3(), mul_v3_m4v3(), and SCULPT_LOCK_X.
Referenced by do_enhance_details_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_smooth_brush_task_cb_ex(), do_topology_rake_bmesh_task_cb_ex(), and sculpt_combine_proxies_task_cb().
Definition at line 6261 of file sculpt.c.
References BKE_paint_brush(), BKE_pbvh_gather_proxies(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, data, MEM_SAFE_FREE, Sculpt::paint, SculptSession::pbvh, Object::sculpt, sculpt_combine_proxies_task_cb(), Brush::sculpt_tool, sculpt_tool_is_proxy_used(), and StrokeCache::supports_gravity.
Referenced by sculpt_stroke_update_step().
|
static |
Definition at line 6202 of file sculpt.c.
References add_v3_v3(), BKE_pbvh_node_free_proxies(), BKE_pbvh_node_get_proxies(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, SculptSession::bm, SculptSession::bm_log, BM_log_original_vert_co(), PBVHVertexIter::bm_vert, PBVHVertexIter::co, SculptUndoNode::co, copy_v3_v3(), data, SculptSession::deform_modifiers_active, ELEM, float(), PBVHVertexIter::i, NULL, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_clip(), sculpt_flush_pbvhvert_deform(), SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_GRAB, SCULPT_TOOL_POSE, SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB, SCULPT_UNDO_COORDS, and SCULPT_undo_push_node().
Referenced by sculpt_combine_proxies().
| void SCULPT_connected_components_ensure | ( | Object * | ob | ) |
Definition at line 9007 of file sculpt.c.
References SculptVertexInfo::connected_component, data, MEM_malloc_arrayN, Object::sculpt, SCULPT_connected_components_floodfill_cb(), SCULPT_floodfill_add_initial(), SCULPT_floodfill_execute(), SCULPT_floodfill_free(), SCULPT_floodfill_init(), SCULPT_TOPOLOGY_ID_NONE, SCULPT_vertex_count_get(), and SculptSession::vertex_info.
Referenced by sculpt_expand_ensure_sculptsession_data(), SCULPT_fake_neighbors_ensure(), and sculpt_mask_init_exec().
|
static |
Definition at line 8998 of file sculpt.c.
References SculptVertexInfo::connected_component, data, and SculptSession::vertex_info.
Referenced by SCULPT_connected_components_ensure().
| bool SCULPT_cursor_geometry_info_update | ( | bContext * | C, |
| SculptCursorGeometryInfo * | out, | ||
| const float | mouse[2], | ||
| bool | use_sampled_normal | ||
| ) |
Definition at line 7452 of file sculpt.c.
References SculptRaycastData::active_face_grid_index, SculptSession::active_face_index, SculptSession::active_grid_index, SculptCursorGeometryInfo::active_vertex_co, SculptSession::active_vertex_index, SculptRaycastData::active_vertex_index, add_v3_v3(), BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_use_locked_size(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_pbvh_raycast(), BKE_pbvh_type(), C, copy_m3_m4(), copy_v3_v3(), CTX_data_depsgraph_pointer(), CTX_data_scene(), SculptSession::cursor_location, SculptSession::cursor_normal, SculptSession::cursor_radius, SculptSession::cursor_sampled_normal, SculptSession::cursor_view_normal, depsgraph, SculptRaycastData::depth, ED_view3d_viewcontext_init(), SculptRaycastData::face_normal, SculptRaycastData::hit, Object::imat, invert_m4_m4(), SculptRaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), SculptCursorGeometryInfo::location, MEM_SAFE_FREE, mul_m3_v3(), mul_v3_fl(), SculptCursorGeometryInfo::normal, normalize_v3_v3(), ViewContext::obact, Object::obmat, SculptRaycastData::original, paint_calc_object_space_radius(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::rv3d, ViewContext::rv3d, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_active_vertex_co_get(), SCULPT_pbvh_calc_area_normal(), sculpt_pbvh_gather_cursor_update(), sculpt_raycast_cb(), SCULPT_raycast_init(), SCULPT_stroke_modifiers_check(), SCULPT_vertex_random_access_ensure(), Scene::toolsettings, SculptSession::v3d, ViewContext::v3d, RegionView3D::viewinv, and zero_v3().
Referenced by ED_sculpt_face_sets_active_update_and_get(), paint_cursor_sculpt_session_update_and_init(), sample_detail_voxel(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), sculpt_expand_target_vertex_update_and_get(), sculpt_face_set_edit_invoke(), sculpt_face_sets_change_visibility_invoke(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), sculpt_mesh_filter_invoke(), sculpt_trim_gesture_box_invoke(), and sculpt_trim_gesture_lasso_invoke().
Definition at line 1551 of file sculpt.c.
References BLI_rcti_is_empty(), BLI_rcti_union(), SculptSession::cache, StrokeCache::previous_r, and Object::sculpt.
Referenced by ED_sculpt_redraw_planes_get(), and SCULPT_flush_update_step().
| int SCULPT_face_set_next_available_get | ( | SculptSession * | ss | ) |
Definition at line 700 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totfaces.
Referenced by do_brush_action(), sculpt_face_set_create_exec(), sculpt_init_session(), and sculpt_mask_expand_invoke().
| void SCULPT_face_set_visibility_set | ( | SculptSession * | ss, |
| int | face_set, | ||
| bool | visible | ||
| ) |
Definition at line 382 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totfaces.
Referenced by sculpt_face_sets_change_visibility_exec().
| void SCULPT_face_sets_visibility_all_set | ( | SculptSession * | ss, |
| bool | visible | ||
| ) |
Definition at line 418 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SCULPT_FACE_SET_NONE, and SculptSession::totfaces.
Referenced by sculpt_face_sets_change_visibility_exec().
| void SCULPT_face_sets_visibility_invert | ( | SculptSession * | ss | ) |
Definition at line 404 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::face_sets, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totfaces.
Referenced by sculpt_face_sets_change_visibility_exec().
|
static |
Definition at line 8891 of file sculpt.c.
References SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, and SculptSession::fake_neighbors.
Referenced by SCULPT_fake_neighbors_ensure().
|
static |
Definition at line 8879 of file sculpt.c.
References SculptFakeNeighbors::current_max_distance, SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, SculptSession::fake_neighbors, MEM_malloc_arrayN, and SCULPT_vertex_count_get().
Referenced by SCULPT_fake_neighbors_ensure().
|
static |
Definition at line 8950 of file sculpt.c.
References BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), copy_v3_v3(), NearestVertexFakeNeighborTLSData::current_topology_id, data, do_fake_neighbor_search_task_cb(), fake_neighbor_search_reduce(), TaskParallelSettings::func_reduce, MEM_SAFE_FREE, NearestVertexFakeNeighborTLSData::nearest_vertex_distance_squared, NearestVertexFakeNeighborTLSData::nearest_vertex_index, SculptThreadedTaskData::nearest_vertex_search_co, NULL, SculptSession::pbvh, Object::sculpt, SCULPT_search_sphere_cb(), SCULPT_vertex_co_get(), SCULPT_vertex_get_connected_component(), SculptThreadedTaskData::sd, TaskParallelSettings::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by SCULPT_fake_neighbors_ensure().
| void SCULPT_fake_neighbors_disable | ( | Object * | ob | ) |
Definition at line 9106 of file sculpt.c.
References BLI_assert, SculptFakeNeighbors::fake_neighbor_index, SculptSession::fake_neighbors, NULL, Object::sculpt, and SculptFakeNeighbors::use_fake_neighbors.
Referenced by SCULPT_pose_ik_chain_init().
| void SCULPT_fake_neighbors_enable | ( | Object * | ob | ) |
Definition at line 9099 of file sculpt.c.
References BLI_assert, SculptFakeNeighbors::fake_neighbor_index, SculptSession::fake_neighbors, NULL, Object::sculpt, and SculptFakeNeighbors::use_fake_neighbors.
Referenced by SCULPT_pose_ik_chain_init().
Definition at line 9070 of file sculpt.c.
References SculptFakeNeighbors::current_max_distance, SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, SculptSession::fake_neighbors, Object::sculpt, SCULPT_connected_components_ensure(), SCULPT_fake_neighbor_add(), SCULPT_fake_neighbor_init(), SCULPT_fake_neighbor_search(), and SCULPT_vertex_count_get().
Referenced by SCULPT_pose_ik_chain_init().
| void SCULPT_fake_neighbors_free | ( | Object * | ob | ) |
Definition at line 9113 of file sculpt.c.
References Object::sculpt, and sculpt_pose_fake_neighbors_free().
Referenced by SCULPT_flush_update_done().
Definition at line 7378 of file sculpt.c.
References BKE_pbvh_node_find_nearest_to_ray(), BKE_pbvh_node_get_tmin(), BKE_pbvh_type(), SculptSession::cache, SculptUndoNode::co, SculptFindNearestToRayData::depth, SculptFindNearestToRayData::dist_sq_to_ray, float(), SculptFindNearestToRayData::hit, node, NULL, SculptFindNearestToRayData::original, SculptSession::pbvh, PBVH_BMESH, SculptFindNearestToRayData::ray_normal, SculptFindNearestToRayData::ray_start, SCULPT_undo_get_node(), and SculptFindNearestToRayData::ss.
Referenced by SCULPT_stroke_get_location().
Noise texture gives different values for the same input coord; this can tear a multi-resolution mesh during sculpting so do a stitch in this case.
Definition at line 6533 of file sculpt.c.
References SculptSession::active, BKE_paint_brush(), Brush::mtex, SculptSession::multires, multires_stitch_grids(), Sculpt::paint, Object::sculpt, MTex::tex, TEX_NOISE, and Tex::type.
Referenced by sculpt_stroke_update_step().
| void SCULPT_flip_quat_by_symm_area | ( | float | quat[3], |
| const ePaintSymmetryFlags | symm, | ||
| const ePaintSymmetryAreas | symmarea, | ||
| const float | pivot[3] | ||
| ) |
Definition at line 4209 of file sculpt.c.
References flip_qt().
Referenced by SCULPT_do_pose_brush(), and sculpt_transform_matrices_init().
| void SCULPT_flip_v3_by_symm_area | ( | float | v[3], |
| const ePaintSymmetryFlags | symm, | ||
| const ePaintSymmetryAreas | symmarea, | ||
| const float | pivot[3] | ||
| ) |
Definition at line 4190 of file sculpt.c.
Referenced by SCULPT_do_pose_brush(), sculpt_pose_align_pivot_local_space(), and sculpt_transform_matrices_init().
| void SCULPT_floodfill_add_active | ( | Sculpt * | sd, |
| Object * | ob, | ||
| SculptSession * | ss, | ||
| SculptFloodFill * | flood, | ||
| float | radius | ||
| ) |
Definition at line 1131 of file sculpt.c.
References flip_v3_v3(), SCULPT_active_vertex_co_get(), SCULPT_active_vertex_get(), SCULPT_floodfill_add_initial(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_nearest_vertex_get(), and v.
Referenced by pose_ik_chain_init_face_sets_fk(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
| void SCULPT_floodfill_add_and_skip_initial | ( | SculptFloodFill * | flood, |
| int | index | ||
| ) |
Definition at line 1099 of file sculpt.c.
References BLI_BITMAP_ENABLE, BLI_gsqueue_push(), SculptFloodFill::queue, and SculptFloodFill::visited_vertices.
Referenced by sculpt_expand_topology_from_state_boundary().
| void SCULPT_floodfill_add_initial | ( | SculptFloodFill * | flood, |
| int | index | ||
| ) |
Definition at line 1094 of file sculpt.c.
References BLI_gsqueue_push(), and SculptFloodFill::queue.
Referenced by pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), and sculpt_mask_by_color_contiguous().
| void SCULPT_floodfill_add_initial_with_symmetry | ( | Sculpt * | sd, |
| Object * | ob, | ||
| SculptSession * | ss, | ||
| SculptFloodFill * | flood, | ||
| int | index, | ||
| float | radius | ||
| ) |
Definition at line 1105 of file sculpt.c.
References flip_v3_v3(), SCULPT_floodfill_add_initial(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_nearest_vertex_get(), SCULPT_vertex_co_get(), and v.
Referenced by pose_ik_chain_init_face_sets(), sculpt_expand_normal_falloff_create(), and sculpt_expand_topology_falloff_create().
| void SCULPT_floodfill_execute | ( | SculptSession * | ss, |
| SculptFloodFill * | flood, | ||
| bool(*)(SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata) | func, | ||
| void * | userdata | ||
| ) |
Definition at line 1157 of file sculpt.c.
References BLI_BITMAP_ENABLE, BLI_BITMAP_TEST, BLI_gsqueue_is_empty(), BLI_gsqueue_pop(), BLI_gsqueue_push(), SculptVertexNeighborIter::index, SculptVertexNeighborIter::is_duplicate, SculptFloodFill::queue, SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, SCULPT_vertex_visible_get(), and SculptFloodFill::visited_vertices.
Referenced by pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), sculpt_expand_normal_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
| void SCULPT_floodfill_free | ( | SculptFloodFill * | flood | ) |
Definition at line 1188 of file sculpt.c.
References BLI_gsqueue_free(), MEM_SAFE_FREE, NULL, SculptFloodFill::queue, and SculptFloodFill::visited_vertices.
Referenced by pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), sculpt_expand_normal_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
| void SCULPT_floodfill_init | ( | SculptSession * | ss, |
| SculptFloodFill * | flood | ||
| ) |
Definition at line 1085 of file sculpt.c.
References BLI_BITMAP_NEW, BLI_gsqueue_new(), SculptFloodFill::queue, SCULPT_vertex_count_get(), SCULPT_vertex_random_access_ensure(), and SculptFloodFill::visited_vertices.
Referenced by pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), SCULPT_connected_components_ensure(), sculpt_expand_normal_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), SCULPT_pose_calc_pose_data(), and SCULPT_topology_automasking_init().
|
static |
Definition at line 6183 of file sculpt.c.
References add_v3_v3v3(), PBVHVertexIter::co, MVert::co, copy_v3_v3(), Object::data, SculptSession::deform_cos, SculptSession::deform_imats, PBVHVertexIter::i, mul_m3_v3(), Mesh::mvert, SculptSession::orig_cos, Object::sculpt, SculptSession::shapekey_active, sub_v3_v3v3(), and PBVHVertexIter::vert_indices.
Referenced by sculpt_combine_proxies_task_cb(), and SCULPT_flush_stroke_deform_task_cb().
Definition at line 6340 of file sculpt.c.
References BKE_mesh_calc_normals(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), data, Object::data, SculptSession::deform_modifiers_active, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, NULL, SculptSession::orig_cos, Sculpt::paint, SculptSession::pbvh, Object::sculpt, SCULPT_flush_stroke_deform_task_cb(), sculpt_update_keyblock(), SCULPT_vertcos_to_key(), SculptSession::shapekey_active, and Mesh::totvert.
Referenced by ED_sculpt_update_modal_transform(), sculpt_cloth_filter_modal(), sculpt_face_set_edit_modify_coordinates(), sculpt_gesture_project_end(), sculpt_mesh_filter_modal(), and sculpt_stroke_update_step().
|
static |
Definition at line 6315 of file sculpt.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, copy_v3_v3(), data, float(), PBVHVertexIter::i, SculptSession::orig_cos, SculptSession::pbvh, PBVH_ITER_UNIQUE, sculpt_flush_pbvhvert_deform(), and PBVHVertexIter::vert_indices.
Referenced by SCULPT_flush_stroke_deform().
| void SCULPT_flush_update_done | ( | const bContext * | C, |
| Object * | ob, | ||
| SculptUpdateType | update_flags | ||
| ) |
Definition at line 7819 of file sculpt.c.
References blender::compositor::area(), bScreen::areabase, BKE_pbvh_bmesh_after_stroke(), BKE_pbvh_type(), BKE_pbvh_update_bounds(), BKE_pbvh_update_vertex_data(), BKE_sculptsession_use_pbvh_draw(), C, CTX_wm_manager(), CTX_wm_region_view3d(), CTX_wm_view3d(), Object::data, SculptSession::deform_modifiers_active, DEG_id_tag_update(), ED_region_tag_redraw(), Mesh::id, Object::id, ID_REAL_USERS, ID_RECALC_GEOMETRY, LISTBASE_FOREACH, mesh, SculptSession::pbvh, PBVH_BMESH, PBVH_UpdateColor, PBVH_UpdateMask, PBVH_UpdateOriginalBB, RegionView3D::rflag, RGN_TYPE_WINDOW, RV3D_PAINTING, Object::sculpt, SCULPT_fake_neighbors_free(), SCULPT_UPDATE_COLOR, SCULPT_UPDATE_COORDS, sculpt_update_keyblock(), SCULPT_UPDATE_MASK, SculptSession::shapekey_active, SPACE_VIEW3D, SpaceLink::spacetype, wmWindowManager::windows, and WM_window_get_active_screen().
Referenced by ED_sculpt_end_transform(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_expand_finish(), sculpt_expand_restore_original_state(), sculpt_face_set_edit_modify_coordinates(), sculpt_gesture_project_end(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_cancel(), sculpt_mask_expand_modal(), sculpt_mesh_filter_modal(), and sculpt_stroke_done().
| void SCULPT_flush_update_step | ( | bContext * | C, |
| SculptUpdateType | update_flags | ||
| ) |
Definition at line 7759 of file sculpt.c.
References BKE_pbvh_update_bounds(), BKE_sculptsession_use_pbvh_draw(), C, SculptSession::cache, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), StrokeCache::current_r, DEG_id_tag_update(), depsgraph, ED_region_tag_redraw(), ED_region_tag_redraw_partial(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SHADING, SculptSession::modifier, SculptSession::multires, MULTIRES_COORDS_MODIFIED, multires_mark_as_modified(), NULL, SculptSession::pbvh, PBVH_UpdateBB, r, RegionView3D::rflag, RV3D_PAINTING, Object::sculpt, sculpt_extend_redraw_rect_previous(), SCULPT_get_redraw_rect(), SCULPT_UPDATE_COORDS, SCULPT_update_object_bounding_box(), ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by ED_sculpt_update_modal_transform(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_expand_flush_updates(), sculpt_expand_restore_original_state(), sculpt_face_set_edit_modify_coordinates(), sculpt_gesture_project_end(), sculpt_mask_expand_cancel(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), sculpt_mesh_filter_modal(), and sculpt_stroke_update_step().
| void SCULPT_geometry_preview_lines_update | ( | bContext * | C, |
| SculptSession * | ss, | ||
| float | radius | ||
| ) |
Definition at line 8605 of file sculpt.c.
References BKE_pbvh_type(), BKE_sculpt_update_object_for_edit(), BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, BLI_gsqueue_free(), BLI_gsqueue_is_empty(), BLI_gsqueue_new(), BLI_gsqueue_pop(), BLI_gsqueue_push(), C, copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), SculptSession::deform_modifiers_active, depsgraph, SculptVertexNeighborIter::index, len_squared_v3v3(), MEM_callocN, MEM_freeN, NULL, SculptSession::pbvh, PBVH_GRIDS, SculptSession::pmap, SculptSession::preview_vert_index_count, SculptSession::preview_vert_index_list, SCULPT_active_vertex_co_get(), SCULPT_active_vertex_get(), SCULPT_vertex_co_for_grab_active_get(), SCULPT_vertex_count_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, and SculptVertexNeighborIter::size.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive().
| bool SCULPT_get_redraw_rect | ( | ARegion * | region, |
| RegionView3D * | rv3d, | ||
| Object * | ob, | ||
| rcti * | rect | ||
| ) |
Definition at line 1573 of file sculpt.c.
References BKE_pbvh_redraw_BB(), paint_convert_bb_to_rect(), SculptSession::pbvh, and Object::sculpt.
Referenced by SCULPT_flush_update_step(), and wpaint_stroke_update_step().
| ePaintSymmetryAreas SCULPT_get_vertex_symm_area | ( | const float | co[3] | ) |
Definition at line 4175 of file sculpt.c.
References PAINT_SYMM_AREA_DEFAULT, PAINT_SYMM_AREA_X, PAINT_SYMM_AREA_Y, and PAINT_SYMM_AREA_Z.
Referenced by do_pose_brush_task_cb_ex(), and sculpt_transform_task_cb().
|
static |
Definition at line 6736 of file sculpt.c.
References SculptSession::cache, StrokeCache::clip_mirror_mtx, StrokeCache::clip_tolerance, CLIP_X, eModifierMode_Realtime, eModifierType_Mirror, ListBase::first, StrokeCache::flag, MirrorModifierData::flag, invert_m4_m4(), MirrorModifierData::mirror_ob, MOD_MIR_AXIS_X, MOD_MIR_CLIPPING, ModifierData::mode, Object::modifiers, mul_m4_m4m4(), ModifierData::next, Object::obmat, MirrorModifierData::tolerance, ModifierData::type, and unit_m4().
Referenced by sculpt_update_cache_invariants().
|
static |
Definition at line 8353 of file sculpt.c.
References BKE_scene_graph_evaluated_ensure(), BKE_sculpt_ensure_orig_mesh_data(), BKE_sculpt_toolsettings_data_ensure(), BKE_sculpt_update_object_for_edit(), BKE_sculptsession_free(), depsgraph, SculptSession::face_sets, MEM_callocN, SculptSession::mode_type, NULL, OB_MODE_SCULPT, scene, Object::sculpt, SCULPT_face_set_next_available_get(), SCULPT_FACE_SET_NONE, and SculptSession::totfaces.
Referenced by ED_object_sculptmode_enter_ex().
| bool SCULPT_is_symmetry_iteration_valid | ( | char | i, |
| char | symm | ||
| ) |
Definition at line 1042 of file sculpt.c.
Referenced by calc_symmetry_feather(), do_symmetrical_brush_actions(), sculpt_expand_boundary_topology_falloff_create(), sculpt_expand_diagonals_falloff_create(), sculpt_expand_find_active_connected_components_from_vert(), sculpt_expand_spherical_falloff_create(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), SCULPT_geodesic_from_vertex_and_symm(), sculpt_gesture_apply(), SCULPT_is_vertex_inside_brush_radius_symm(), and sculpt_pose_brush_is_vertex_inside_brush_radius().
| bool SCULPT_is_vertex_inside_brush_radius_symm | ( | const float | vertex[3], |
| const float | br_co[3], | ||
| float | radius, | ||
| char | symm | ||
| ) |
Definition at line 1048 of file sculpt.c.
References flip_v3_v3(), len_squared_v3v3(), and SCULPT_is_symmetry_iteration_valid().
Referenced by automask_floodfill_cb().
|
static |
Definition at line 9225 of file sculpt.c.
References BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), copy_v3_v3(), data, do_mask_by_color_contiguous_update_nodes_cb(), MaskByColorContiguousFloodFillData::initial_color, invert(), MaskByColorContiguousFloodFillData::invert, MEM_calloc_arrayN, MEM_freeN, MEM_SAFE_FREE, MaskByColorContiguousFloodFillData::new_mask, NULL, SculptSession::pbvh, SCULPT_floodfill_add_initial(), SCULPT_floodfill_execute(), SCULPT_floodfill_free(), SCULPT_floodfill_init(), sculpt_mask_by_color_contiguous_floodfill_cb(), SCULPT_vertex_color_get(), SCULPT_vertex_count_get(), and MaskByColorContiguousFloodFillData::threshold.
Referenced by sculpt_mask_by_color_invoke().
|
static |
Definition at line 9207 of file sculpt.c.
References data, len, len_v3v3(), M_SQRT3, sculpt_mask_by_color_delta_get(), and SCULPT_vertex_color_get().
Referenced by sculpt_mask_by_color_contiguous().
|
static |
Definition at line 9130 of file sculpt.c.
References invert(), len, len_v3v3(), M_SQRT3, and MASK_BY_COLOR_SLOPE.
Referenced by do_mask_by_color_task_cb(), and sculpt_mask_by_color_contiguous_floodfill_cb().
|
static |
Definition at line 9155 of file sculpt.c.
References invert(), max_ff(), and min_ff().
Referenced by do_mask_by_color_contiguous_update_nodes_cb(), and do_mask_by_color_task_cb().
|
static |
Definition at line 9314 of file sculpt.c.
References BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), data, do_mask_by_color_task_cb(), invert(), MEM_SAFE_FREE, NULL, and SculptSession::pbvh.
Referenced by sculpt_mask_by_color_invoke().
|
static |
Definition at line 9342 of file sculpt.c.
References BKE_pbvh_type(), BKE_pbvh_update_vertex_data(), BKE_sculpt_update_object_for_edit(), C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), depsgraph, invert(), OPERATOR_CANCELLED, OPERATOR_FINISHED, SculptSession::pbvh, PBVH_FACES, PBVH_UpdateMask, wmOperator::ptr, RNA_boolean_get(), RNA_float_get(), Object::sculpt, SCULPT_active_vertex_get(), SCULPT_cursor_geometry_info_update(), SCULPT_flush_update_done(), sculpt_mask_by_color_contiguous(), sculpt_mask_by_color_full_mesh(), SCULPT_undo_push_begin(), SCULPT_undo_push_end(), SCULPT_UPDATE_MASK, SCULPT_vertex_random_access_ensure(), and SculptSession::vcol.
Referenced by SCULPT_OT_mask_by_color().
| MVert* SCULPT_mesh_deformed_mverts_get | ( | SculptSession * | ss | ) |
Definition at line 295 of file sculpt.c.
References BKE_pbvh_get_verts(), BKE_pbvh_type(), SculptSession::deform_modifiers_active, SculptSession::mvert, NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::shapekey_active.
Referenced by do_draw_face_sets_brush_task_cb_ex(), sculpt_face_set_edit_fair_face_set(), and SCULPT_geodesic_mesh_create().
| char SCULPT_mesh_symmetry_xyz_get | ( | Object * | object | ) |
Definition at line 323 of file sculpt.c.
References BKE_mesh_from_object(), mesh, and Mesh::symmetry.
Referenced by cursor_draw_point_with_symmetry(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_symmetrical_brush_actions(), pose_brush_grow_factor_task_cb_ex(), pose_ik_chain_init_face_sets(), SCULPT_do_pose_brush(), sculpt_expand_boundary_topology_falloff_create(), sculpt_expand_diagonals_falloff_create(), sculpt_expand_find_active_connected_components_from_vert(), sculpt_expand_reposition_pivot(), sculpt_expand_spherical_falloff_create(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), SCULPT_geodesic_from_vertex_and_symm(), sculpt_gesture_context_init_common(), sculpt_mask_expand_modal(), SCULPT_pose_calc_pose_data(), sculpt_set_pivot_position_exec(), SCULPT_topology_automasking_init(), sculpt_transform_all_vertices(), vpaint_do_symmetrical_brush_actions(), and wpaint_do_symmetrical_brush_actions().
| bool SCULPT_mode_poll | ( | bContext * | C | ) |
Definition at line 6601 of file sculpt.c.
References C, CTX_data_active_object(), Object::mode, and OB_MODE_SCULPT.
Referenced by ED_keymap_paint(), PAINT_OT_mask_flood_fill(), sculpt_and_constant_or_manual_detail_poll(), sculpt_and_dynamic_topology_poll(), SCULPT_mode_poll_view3d(), sculpt_no_multires_poll(), SCULPT_OT_cloth_filter(), SCULPT_OT_dirty_mask(), SCULPT_OT_dynamic_topology_toggle(), SCULPT_OT_expand(), SCULPT_OT_face_sets_change_visibility(), SCULPT_OT_face_sets_create(), SCULPT_OT_face_sets_edit(), SCULPT_OT_face_sets_init(), SCULPT_OT_face_sets_randomize_colors(), SCULPT_OT_mask_expand(), SCULPT_OT_mask_filter(), SCULPT_OT_mask_init(), SCULPT_OT_mesh_filter(), SCULPT_OT_optimize(), SCULPT_OT_sample_detail_size(), SCULPT_OT_set_persistent_base(), SCULPT_OT_set_pivot_position(), SCULPT_poll(), and SCULPT_vertex_colors_poll().
| bool SCULPT_mode_poll_view3d | ( | bContext * | C | ) |
Definition at line 6615 of file sculpt.c.
References C, CTX_wm_region_view3d(), and SCULPT_mode_poll().
Referenced by ED_object_sculptmode_enter_ex(), PAINT_OT_hide_show(), PAINT_OT_mask_box_gesture(), PAINT_OT_mask_lasso_gesture(), PAINT_OT_mask_line_gesture(), SCULPT_OT_face_set_box_gesture(), SCULPT_OT_face_set_lasso_gesture(), SCULPT_OT_project_line_gesture(), SCULPT_OT_trim_box_gesture(), and SCULPT_OT_trim_lasso_gesture().
|
static |
Definition at line 8540 of file sculpt.c.
References BKE_paint_toolslots_brush_validate(), C, CTX_data_depsgraph_on_load(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), CTX_wm_message_bus(), Object::data, depsgraph, ED_object_mode_compat_set(), ED_object_sculptmode_enter_ex(), ED_object_sculptmode_exit_ex(), Mesh::flag, Object::id, ME_SCULPT_DYNAMIC_TOPOLOGY, Object::mode, wmOperatorType::name, NC_SCENE, ND_MODE, OB_MODE_SCULPT, OBACT, wmWindowManager::op_undo_depth, OPERATOR_CANCELLED, OPERATOR_FINISHED, Sculpt::paint, wmOperator::reports, scene, ToolSettings::sculpt, SCULPT_undo_push_begin(), Scene::toolsettings, wmOperator::type, WM_event_add_notifier(), WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by SCULPT_OT_sculptmode_toggle().
| int SCULPT_nearest_vertex_get | ( | Sculpt * | sd, |
| Object * | ob, | ||
| const float | co[3], | ||
| float | max_distance, | ||
| bool | use_original | ||
| ) |
Definition at line 1000 of file sculpt.c.
References BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BLI_task_parallel_range(), copy_v3_v3(), data, do_nearest_vertex_get_task_cb(), TaskParallelSettings::func_reduce, MEM_SAFE_FREE, NearestVertexTLSData::nearest_vertex_distance_squared, nearest_vertex_get_reduce(), NearestVertexTLSData::nearest_vertex_index, SculptThreadedTaskData::nearest_vertex_search_co, NULL, SculptSession::pbvh, Object::sculpt, SCULPT_search_sphere_cb(), SculptThreadedTaskData::sd, TaskParallelSettings::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by pose_ik_chain_init_topology(), SCULPT_do_boundary_brush(), sculpt_expand_get_vertex_index_for_symmetry_pass(), SCULPT_floodfill_add_active(), SCULPT_floodfill_add_initial_with_symmetry(), and SCULPT_geodesic_from_vertex_and_symm().
|
static |
Definition at line 7308 of file sculpt.c.
References StrokeCache::alt_smooth, Brush::autosmooth_factor, BRUSH_MASK_SMOOTH, BRUSH_STROKE_SMOOTH, SculptSession::cache, Brush::mask_tool, SculptSession::pbvh, SCULPT_is_automasking_enabled(), Brush::sculpt_tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLOTH, SCULPT_TOOL_DISPLACEMENT_SMEAR, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_MASK, SCULPT_TOOL_POSE, SCULPT_TOOL_SLIDE_RELAX, SCULPT_TOOL_SMEAR, and SCULPT_TOOL_SMOOTH.
Referenced by sculpt_brush_stroke_init(), and SCULPT_stroke_modifiers_check().
|
static |
Definition at line 6987 of file sculpt.c.
References BRUSH_CLOTH_DEFORM_GRAB, Brush::cloth_deform_type, ELEM, Brush::sculpt_tool, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_CLAY_THUMB, SCULPT_TOOL_CLOTH, SCULPT_TOOL_MULTIPLANE_SCRAPE, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PINCH, and SCULPT_TOOL_SNAKE_HOOK.
Referenced by sculpt_update_brush_delta().
|
static |
Definition at line 6968 of file sculpt.c.
References BRUSH_CLOTH_DEFORM_GRAB, Brush::cloth_deform_type, ELEM, Brush::sculpt_tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLOTH, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_GRAB, SCULPT_TOOL_POSE, and SCULPT_TOOL_THUMB.
Referenced by sculpt_update_brush_delta().
|
static |
Definition at line 8251 of file sculpt.c.
References BKE_pbvh_type(), C, CTX_data_active_object(), SculptSession::pbvh, PBVH_GRIDS, Object::sculpt, and SCULPT_mode_poll().
Referenced by SCULPT_OT_symmetrize().
|
static |
Definition at line 8221 of file sculpt.c.
References C, CTX_data_active_object(), NC_OBJECT, ND_DRAW, OPERATOR_FINISHED, SCULPT_pbvh_clear(), and WM_event_add_notifier().
Referenced by SCULPT_OT_optimize().
| void SCULPT_orig_vert_data_init | ( | SculptOrigVertData * | data, |
| Object * | ob, | ||
| PBVHNode * | node | ||
| ) |
Initialize a SculptOrigVertData for accessing original vertex data; handles BMesh, Mesh, and multi-resolution.
Definition at line 1300 of file sculpt.c.
References data, node, SCULPT_orig_vert_data_unode_init(), SCULPT_UNDO_COORDS, and SCULPT_undo_push_node().
Referenced by color_filter_task_cb(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_draw_sharp_brush_task_cb_ex(), do_elastic_deform_brush_task_cb_ex(), do_grab_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_paint_brush_task_cb_ex(), do_pose_brush_task_cb_ex(), do_rotate_brush_task_cb_ex(), do_thumb_brush_task_cb_ex(), do_topology_relax_task_cb_ex(), do_topology_slide_task_cb_ex(), mesh_filter_task_cb(), SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex(), and sculpt_transform_task_cb().
| void SCULPT_orig_vert_data_unode_init | ( | SculptOrigVertData * | data, |
| Object * | ob, | ||
| SculptUndoNode * | unode | ||
| ) |
Initialize a SculptOrigVertData for accessing original vertex data; handles BMesh, Mesh, and multi-resolution.
Definition at line 1277 of file sculpt.c.
References SculptSession::bm, bm, SculptSession::bm_log, data, and Object::sculpt.
Referenced by paint_mesh_restore_co_task_cb(), and SCULPT_orig_vert_data_init().
| void SCULPT_orig_vert_data_update | ( | SculptOrigVertData * | orig_data, |
| PBVHVertexIter * | iter | ||
| ) |
Update a SculptOrigVertData for a particular vertex from the PBVH iterator.
Definition at line 1310 of file sculpt.c.
References SculptOrigVertData::bm_log, BM_log_original_mask(), BM_log_original_vert_data(), PBVHVertexIter::bm_vert, SculptOrigVertData::co, SculptOrigVertData::col, SculptOrigVertData::colors, SculptOrigVertData::coords, PBVHVertexIter::i, SculptOrigVertData::mask, SculptOrigVertData::no, SculptOrigVertData::normals, SCULPT_UNDO_COLOR, SCULPT_UNDO_COORDS, SCULPT_UNDO_MASK, SculptUndoNode::type, SculptOrigVertData::unode, and SculptOrigVertData::vmasks.
Referenced by color_filter_task_cb(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_smooth_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_draw_sharp_brush_task_cb_ex(), do_elastic_deform_brush_task_cb_ex(), do_grab_brush_task_cb_ex(), do_layer_brush_task_cb_ex(), do_paint_brush_task_cb_ex(), do_pose_brush_task_cb_ex(), do_rotate_brush_task_cb_ex(), do_thumb_brush_task_cb_ex(), do_topology_relax_task_cb_ex(), do_topology_slide_task_cb_ex(), mesh_filter_task_cb(), paint_mesh_restore_co_task_cb(), SCULPT_do_surface_smooth_brush_laplacian_task_cb_ex(), and sculpt_transform_task_cb().
|
static |
Definition at line 8148 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_modal(), paint_stroke_operator_properties(), wmOperatorType::poll, RNA_def_boolean(), sculpt_brush_stroke_cancel(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), SCULPT_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 8791 of file sculpt.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, loop_to_vertex_colors_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and SCULPT_vertex_colors_poll().
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 9391 of file sculpt.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_float(), sculpt_mask_by_color_invoke(), SCULPT_vertex_colors_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 8235 of file sculpt.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, SCULPT_mode_poll(), and sculpt_optimize_exec().
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 8830 of file sculpt.c.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, sculpt_sample_color_invoke(), and SCULPT_vertex_colors_poll().
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 8591 of file sculpt.c.
References wmOperatorType::description, ED_operator_object_active_editable_mesh(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and sculpt_mode_toggle_exec().
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 8205 of file sculpt.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, SCULPT_mode_poll(), and sculpt_set_persistent_base_exec().
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 8329 of file sculpt.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_float(), sculpt_no_multires_poll(), sculpt_symmetrize_exec(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 8728 of file sculpt.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, SCULPT_vertex_colors_poll(), and vertex_to_loop_colors_exec().
Referenced by ED_operatortypes_sculpt().
| bool SCULPT_pbvh_calc_area_normal | ( | const Brush * | brush, |
| Object * | ob, | ||
| PBVHNode ** | nodes, | ||
| int | totnode, | ||
| bool | use_threading, | ||
| float | r_area_no[3] | ||
| ) |
Definition at line 2205 of file sculpt.c.
References AreaNormalCenterTLSData::area_nos, ARRAY_SIZE, BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::bm, calc_area_normal_and_center_reduce(), calc_area_normal_and_center_task_cb(), data, TaskParallelSettings::func_reduce, normalize_v3_v3(), NULL, Object::sculpt, SCULPT_stroke_is_dynamic_topology(), TaskParallelSettings::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by SCULPT_calc_area_normal(), SCULPT_cursor_geometry_info_update(), and vwpaint_pbvh_gather_generic().
|
static |
Definition at line 2669 of file sculpt.c.
References BKE_pbvh_search_gather(), SculptSession::cursor_radius, data, NULL, SculptSession::pbvh, Object::sculpt, and SCULPT_search_sphere_cb().
Referenced by SCULPT_cursor_geometry_info_update().
|
static |
Definition at line 2688 of file sculpt.c.
References BKE_pbvh_search_gather(), SculptSession::cache, SculptSession::cursor_radius, data, dist_squared_ray_to_aabb_v3_precalc(), Brush::falloff_shape, StrokeCache::location, NULL, PAINT_FALLOFF_SHAPE_SPHERE, SculptSession::pbvh, StrokeCache::radius, Object::sculpt, SCULPT_search_circle_cb(), SCULPT_search_sphere_cb(), Brush::sculpt_tool, SCULPT_TOOL_MASK, square_f(), and StrokeCache::view_normal.
Referenced by do_brush_action(), and sculpt_topology_update().
Definition at line 4875 of file sculpt.c.
References plane_point_side_v3().
Referenced by do_fill_brush_task_cb_ex(), do_multiplane_scrape_brush_task_cb_ex(), and do_scrape_brush_task_cb_ex().
| int SCULPT_plane_trim | ( | const StrokeCache * | cache, |
| const Brush * | brush, | ||
| const float | val[3] | ||
| ) |
Definition at line 4860 of file sculpt.c.
References BRUSH_PLANE_TRIM, dot_v3v3(), Brush::flag, StrokeCache::plane_trim_squared, and StrokeCache::radius_squared.
Referenced by do_clay_strips_brush_task_cb_ex(), do_fill_brush_task_cb_ex(), do_flatten_brush_task_cb_ex(), do_multiplane_scrape_brush_task_cb_ex(), and do_scrape_brush_task_cb_ex().
| bool SCULPT_poll | ( | bContext * | C | ) |
Definition at line 6625 of file sculpt.c.
References C, paint_poll(), and SCULPT_mode_poll().
Referenced by SCULPT_OT_brush_stroke(), and SCULPT_poll_view3d().
| bool SCULPT_poll_view3d | ( | bContext * | C | ) |
Definition at line 6620 of file sculpt.c.
References C, CTX_wm_region_view3d(), and SCULPT_poll().
|
static |
Definition at line 8899 of file sculpt.c.
References SculptFakeNeighbors::fake_neighbor_index, SculptSession::fake_neighbors, and MEM_SAFE_FREE.
Referenced by SCULPT_fake_neighbors_free().
|
static |
Calculate the projection.
Definition at line 1428 of file sculpt.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 1417 of file sculpt.c.
References copy_v3_v3(), SculptProjectVector::is_valid, SculptProjectVector::len_sq, SculptProjectVector::len_sq_inv_neg, len_squared_v3(), and SculptProjectVector::plane.
Referenced by do_crease_brush(), and 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 1376 of file sculpt.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 do_elastic_deform_brush(), do_grab_brush(), and do_snake_hook_brush().
|
static |
Definition at line 1334 of file sculpt.c.
References SculptRakeData::follow_co, SculptRakeData::follow_dist, interp_v3_v3v3(), and len_v3v3().
Referenced by sculpt_update_brush_delta().
|
static |
Definition at line 1342 of file sculpt.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().
Definition at line 7341 of file sculpt.c.
References SculptRaycastData::active_face_grid_index, SculptRaycastData::active_vertex_index, BKE_pbvh_node_get_tmin(), BKE_pbvh_node_raycast(), BKE_pbvh_type(), SculptSession::cache, SculptUndoNode::co, SculptRaycastData::depth, SculptRaycastData::face_normal, float(), SculptRaycastData::hit, SculptRaycastData::isect_precalc, node, NULL, SculptRaycastData::original, SculptSession::pbvh, PBVH_BMESH, SculptRaycastData::ray_normal, SculptRaycastData::ray_start, SCULPT_undo_get_node(), and SculptRaycastData::ss.
Referenced by SCULPT_cursor_geometry_info_update(), and SCULPT_stroke_get_location().
| float SCULPT_raycast_init | ( | ViewContext * | vc, |
| const float | mouse[2], | ||
| float | ray_start[3], | ||
| float | ray_end[3], | ||
| float | ray_normal[3], | ||
| bool | original | ||
| ) |
Definition at line 7412 of file sculpt.c.
References BKE_pbvh_raycast_project_ray_root(), ViewContext::depsgraph, ED_view3d_win_to_segment_clipped(), invert_m4_m4(), RegionView3D::is_persp, mul_m4_v3(), normalize_v3(), ViewContext::obact, Object::obmat, SculptSession::pbvh, ViewContext::region, ARegion::regiondata, RV3D_CLIPPING_ENABLED, Object::sculpt, sub_v3_v3v3(), and ViewContext::v3d.
Referenced by sample_detail_dyntopo(), SCULPT_cursor_geometry_info_update(), and SCULPT_stroke_get_location().
| void SCULPT_relax_vertex | ( | SculptSession * | ss, |
| PBVHVertexIter * | vd, | ||
| float | factor, | ||
| bool | filter_boundary_face_sets, | ||
| float * | r_final_pos | ||
| ) |
Definition at line 3506 of file sculpt.c.
References add_v3_v3(), add_v3_v3v3(), closest_to_plane_v3(), PBVHVertexIter::co, copy_v3_v3(), PBVHVertexIter::index, SculptVertexNeighborIter::index, is_zero_v3(), mul_v3_fl(), normalize_v3(), normalize_v3_v3(), plane_from_point_normal_v3(), SCULPT_vertex_co_get(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, SCULPT_vertex_normal_get(), sub_v3_v3v3(), and zero_v3().
Referenced by do_relax_face_sets_brush_task_cb_ex(), do_topology_relax_task_cb_ex(), and mesh_filter_task_cb().
Definition at line 7715 of file sculpt.c.
References BKE_brush_use_size_pressure(), BKE_paint_brush(), BRUSH_ANCHORED, BRUSH_DRAG_DOT, SculptSession::cache, SculptSession::face_sets, SculptUndoNode::face_sets, Brush::flag, StrokeCache::layer_displacement_factor, MEM_SAFE_FREE, Sculpt::paint, paint_mesh_restore_co(), Object::sculpt, Brush::sculpt_tool, SCULPT_TOOL_CLOTH, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_GRAB, SCULPT_UNDO_FACE_SETS, SCULPT_undo_get_first_node(), SculptSession::totfaces, and SculptUndoNode::type.
Referenced by sculpt_stroke_update_step().
|
static |
Definition at line 8805 of file sculpt.c.
References BKE_brush_color_set(), BKE_paint_brush(), C, copy_v3_v3(), CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), IMB_colormanagement_scene_linear_to_srgb_v3(), NA_EDITED, NC_BRUSH, OPERATOR_CANCELLED, OPERATOR_FINISHED, Sculpt::paint, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_active_vertex_get(), SCULPT_vertex_color_get(), and WM_event_add_notifier().
Referenced by SCULPT_OT_sample_color().
| bool SCULPT_search_circle_cb | ( | PBVHNode * | node, |
| void * | data_v | ||
| ) |
Definition at line 2608 of file sculpt.c.
References BKE_pbvh_node_fully_masked_get(), BKE_pbvh_node_get_BB(), BKE_pbvh_node_get_original_BB(), data, dist_squared_ray_to_aabb_v3(), and node.
Referenced by sculpt_pbvh_gather_generic(), and vwpaint_pbvh_gather_generic().
| bool SCULPT_search_sphere_cb | ( | PBVHNode * | node, |
| void * | data_v | ||
| ) |
Definition at line 2561 of file sculpt.c.
References BKE_pbvh_node_fully_hidden_get(), BKE_pbvh_node_fully_masked_get(), BKE_pbvh_node_get_BB(), BKE_pbvh_node_get_original_BB(), center, data, len_squared_v3(), node, sub_v3_v3v3(), and t.
Referenced by SCULPT_cloth_brush_affected_nodes_gather(), SCULPT_fake_neighbor_search(), SCULPT_filter_cache_init(), SCULPT_nearest_vertex_get(), sculpt_pbvh_gather_cursor_update(), sculpt_pbvh_gather_generic(), and vwpaint_pbvh_gather_generic().
|
static |
Definition at line 8178 of file sculpt.c.
References BKE_sculpt_update_object_for_edit(), C, SculptPersistentBase::co, copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), depsgraph, SculptPersistentBase::disp, MEM_mallocN, MEM_SAFE_FREE, SculptPersistentBase::no, OPERATOR_FINISHED, SculptSession::persistent_base, Object::sculpt, SCULPT_vertex_co_get(), SCULPT_vertex_count_get(), SCULPT_vertex_normal_get(), and SCULPT_vertex_random_access_ensure().
Referenced by SCULPT_OT_set_persistent_base().
|
static |
Definition at line 8004 of file sculpt.c.
References StrokeCache::alt_smooth, StrokeCache::automasking, BKE_brush_size_set(), BKE_libblock_find_name(), BKE_paint_brush(), BKE_paint_brush_set(), BKE_pbvh_node_color_buffer_free(), BLI_assert, StrokeCache::brush, C, SculptSession::cache, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), CTX_data_tool_settings(), UnifiedPaintSettings::draw_inverted, ELEM, ID_BR, Brush::mask_tool, NC_OBJECT, ND_DRAW, NULL, Sculpt::paint, SculptSession::pbvh, StrokeCache::saved_active_brush_name, StrokeCache::saved_mask_brush_tool, StrokeCache::saved_smooth_size, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_automasking_cache_free(), sculpt_brush_exit_tex(), SCULPT_cache_free(), SCULPT_flush_update_done(), SCULPT_is_automasking_enabled(), SCULPT_stroke_modifiers_check(), Brush::sculpt_tool, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_MASK, SCULPT_TOOL_PAINT, SCULPT_TOOL_SLIDE_RELAX, SCULPT_TOOL_SMEAR, SCULPT_undo_push_end(), SCULPT_UPDATE_COORDS, SCULPT_UPDATE_MASK, ToolSettings::unified_paint_settings, and WM_event_add_notifier().
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
Definition at line 7584 of file sculpt.c.
References add_v3_v3(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_pbvh_find_nearest_to_ray(), BKE_pbvh_raycast(), BKE_pbvh_type(), SculptSession::bm, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, C, SculptSession::cache, copy_v3_v3(), CTX_data_depsgraph_pointer(), depsgraph, SculptRaycastData::depth, SculptFindNearestToRayData::depth, ED_view3d_viewcontext_init(), ELEM, SculptRaycastData::face_normal, Brush::falloff_shape, SculptRaycastData::hit, SculptFindNearestToRayData::hit, SculptRaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), mul_v3_fl(), ViewContext::obact, SculptRaycastData::original, SculptFindNearestToRayData::original, StrokeCache::original, PAINT_FALLOFF_SHAPE_TUBE, SculptSession::pbvh, PBVH_BMESH, SculptRaycastData::ray_normal, SculptRaycastData::ray_start, Object::sculpt, sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), SCULPT_raycast_init(), SCULPT_stroke_modifiers_check(), and SculptRaycastData::ss.
Referenced by over_mesh(), paint_brush_stroke_add_step(), paint_line_strokes_spacing(), paint_space_stroke(), paint_stroke_curve_end(), paint_stroke_modal(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_set_pivot_position_exec(), vpaint_exec(), vpaint_invoke(), wpaint_exec(), and wpaint_invoke().
| bool SCULPT_stroke_is_dynamic_topology | ( | const SculptSession * | ss, |
| const Brush * | brush | ||
| ) |
Definition at line 1448 of file sculpt.c.
References StrokeCache::alt_smooth, BKE_pbvh_type(), BRUSH_ANCHORED, BRUSH_DRAG_DOT, SculptSession::cache, Brush::flag, SculptSession::pbvh, PBVH_BMESH, Brush::sculpt_tool, and SCULPT_TOOL_HAS_DYNTOPO.
Referenced by calc_area_center(), calc_area_normal_and_center(), sculpt_brush_stroke_cancel(), SCULPT_is_automasking_enabled(), SCULPT_pbvh_calc_area_normal(), and sculpt_stroke_update_step().
| bool SCULPT_stroke_is_first_brush_step | ( | StrokeCache * | cache | ) |
Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes enabled.
This should be used for functionality that needs to be computed once per stroke of a particular tool (allocating memory, updating random seeds...).
Definition at line 926 of file sculpt.c.
References StrokeCache::first_time, StrokeCache::mirror_symmetry_pass, StrokeCache::radial_symmetry_pass, and StrokeCache::tile_pass.
Referenced by do_brush_action(), SCULPT_do_cloth_brush(), SCULPT_do_paint_brush(), SCULPT_do_smear_brush(), and SCULPT_enhance_details_brush().
| bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass | ( | StrokeCache * | cache | ) |
Returns true on the first brush step of each symmetry pass.
Definition at line 935 of file sculpt.c.
References StrokeCache::first_time.
Referenced by calc_sculpt_plane(), do_clay_strips_brush(), do_clay_thumb_brush(), do_pinch_brush(), do_slide_relax_brush(), paint_cursor_cursor_draw_3d_view_brush_cursor_active(), SCULPT_calc_brush_plane(), SCULPT_do_boundary_brush(), SCULPT_do_cloth_brush(), SCULPT_do_multiplane_scrape_brush(), SCULPT_do_paint_brush(), sculpt_update_brush_delta(), sculpt_update_cache_variants(), and update_sculpt_normal().
| bool SCULPT_stroke_is_main_symmetry_pass | ( | StrokeCache * | cache | ) |
Returns true when the step belongs to the stroke that is directly performed by the brush and not by one of the symmetry passes.
Definition at line 913 of file sculpt.c.
References StrokeCache::mirror_symmetry_pass, StrokeCache::radial_symmetry_pass, and StrokeCache::tile_pass.
Referenced by calc_sculpt_plane(), do_brush_action(), do_clay_thumb_brush(), and SCULPT_calc_brush_plane().
Definition at line 7327 of file sculpt.c.
References BKE_sculpt_update_object_for_edit(), BKE_sculptsession_use_pbvh_draw(), C, CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), CTX_wm_view3d(), SculptSession::deform_modifiers_active, depsgraph, Object::sculpt, ToolSettings::sculpt, sculpt_needs_connectivity_info(), and SculptSession::shapekey_active.
Referenced by sample_detail_dyntopo(), SCULPT_cursor_geometry_info_update(), sculpt_stroke_done(), SCULPT_stroke_get_location(), and sculpt_stroke_update_step().
|
static |
Definition at line 7902 of file sculpt.c.
References C, CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_region_view3d(), ED_view3d_init_mats_rv3d(), wmOperator::flag, NULL, OP_IS_INVOKE, over_mesh(), Object::sculpt, ToolSettings::sculpt, sculpt_tool_name(), SCULPT_undo_push_begin(), and sculpt_update_cache_invariants().
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
|
static |
Definition at line 7925 of file sculpt.c.
References BKE_paint_brush(), BKE_pbvh_bmesh_detail_size_set(), C, SculptSession::cache, Sculpt::constant_detail, copy_v3_v3(), CTX_data_active_object(), CTX_data_tool_settings(), SculptSession::deform_modifiers_active, Sculpt::detail_percent, Sculpt::detail_size, do_brush_action(), do_symmetrical_brush_actions(), StrokeCache::dyntopo_pixel_radius, ELEM, StrokeCache::first_time, Sculpt::flags, mat4_to_scale(), Object::obmat, Sculpt::paint, SculptSession::pbvh, StrokeCache::radius, Object::sculpt, ToolSettings::sculpt, sculpt_combine_proxies(), SCULPT_DYNTOPO_DETAIL_BRUSH, SCULPT_DYNTOPO_DETAIL_CONSTANT, SCULPT_DYNTOPO_DETAIL_MANUAL, sculpt_fix_noise_tear(), SCULPT_flush_stroke_deform(), SCULPT_flush_update_step(), sculpt_restore_mesh(), SCULPT_stroke_is_dynamic_topology(), SCULPT_stroke_modifiers_check(), Brush::sculpt_tool, sculpt_tool_is_proxy_used(), SCULPT_TOOL_MASK, SCULPT_TOOL_PAINT, SCULPT_TOOL_SMEAR, sculpt_topology_update(), sculpt_update_cache_variants(), SCULPT_UPDATE_COLOR, SCULPT_UPDATE_COORDS, sculpt_update_keyblock(), SCULPT_UPDATE_MASK, SculptSession::shapekey_active, StrokeCache::true_last_location, StrokeCache::true_location, and ToolSettings::unified_paint_settings.
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
|
static |
Definition at line 8260 of file sculpt.c.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_calc_normals(), BKE_mesh_mirror_apply_mirror_on_axis(), BKE_pbvh_type(), SculptSession::bm, BM_EDGE, BM_ELEM_TAG, SculptSession::bm_log, BM_log_all_added(), BM_log_before_all_removed(), BM_mesh_elem_hflag_disable_all(), BM_mesh_toolflags_set(), BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_op_callf(), C, CTX_data_active_object(), CTX_data_main(), CTX_data_tool_settings(), Object::data, ED_sculpt_undo_geometry_begin(), ED_sculpt_undo_geometry_end(), mesh, NC_OBJECT, ND_DRAW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, wmOperator::ptr, RNA_float_get(), Object::sculpt, ToolSettings::sculpt, SCULPT_dynamic_topology_triangulate(), SCULPT_pbvh_clear(), SCULPT_UNDO_DYNTOPO_SYMMETRIZE, SCULPT_undo_push_begin(), SCULPT_undo_push_end(), SCULPT_undo_push_node(), Sculpt::symmetrize_direction, and WM_event_add_notifier().
Referenced by SCULPT_OT_symmetrize().
| void SCULPT_tag_update_overlays | ( | bContext * | C | ) |
Definition at line 1066 of file sculpt.c.
References BKE_sculptsession_use_pbvh_draw(), C, CTX_data_active_object(), CTX_wm_region(), CTX_wm_view3d(), DEG_id_tag_update(), ED_region_tag_redraw(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_SHADING, NC_OBJECT, ND_DRAW, and WM_event_add_notifier().
Referenced by mask_flood_fill_exec(), sculpt_expand_restore_original_state(), sculpt_face_set_create_exec(), sculpt_face_set_edit_invoke(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_face_sets_randomize_colors_exec(), sculpt_gesture_apply(), sculpt_mask_filter_exec(), and sculpt_mask_init_exec().
| void SCULPT_tilt_apply_to_normal | ( | float | r_normal[3], |
| StrokeCache * | cache, | ||
| const float | tilt_strength | ||
| ) |
Definition at line 2849 of file sculpt.c.
References Object::imat, M_PI_2, mul_v3_mat3_m4v3(), normalize_v3(), ViewContext::obact, Object::obmat, rotate_v3_v3v3fl(), ViewContext::rv3d, SCULPT_TILT_SENSITIVITY, StrokeCache::vc, RegionView3D::viewinv, StrokeCache::x_tilt, and StrokeCache::y_tilt.
Referenced by do_clay_strips_brush(), do_fill_brush(), do_flatten_brush(), do_scrape_brush(), and SCULPT_tilt_effective_normal_get().
| void SCULPT_tilt_effective_normal_get | ( | const SculptSession * | ss, |
| const Brush * | brush, | ||
| float | r_no[3] | ||
| ) |
Definition at line 2865 of file sculpt.c.
References SculptSession::cache, copy_v3_v3(), StrokeCache::sculpt_normal_symm, SCULPT_tilt_apply_to_normal(), and Brush::tilt_strength_factor.
Referenced by do_draw_brush(), and do_draw_sharp_brush().
|
static |
Definition at line 1217 of file sculpt.c.
References ELEM, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLOTH, SCULPT_TOOL_DISPLACEMENT_SMEAR, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_LAYER, SCULPT_TOOL_PAINT, SCULPT_TOOL_POSE, SCULPT_TOOL_SMEAR, and SCULPT_TOOL_SMOOTH.
Referenced by sculpt_combine_proxies(), and sculpt_stroke_update_step().
|
static |
Definition at line 6630 of file sculpt.c.
References BKE_paint_brush(), Sculpt::paint, Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_CLAY_THUMB, SCULPT_TOOL_CLOTH, SCULPT_TOOL_CREASE, SCULPT_TOOL_DISPLACEMENT_ERASER, SCULPT_TOOL_DISPLACEMENT_SMEAR, SCULPT_TOOL_DRAW, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_DRAW_SHARP, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_GRAB, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER, SCULPT_TOOL_MASK, SCULPT_TOOL_MULTIPLANE_SCRAPE, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PAINT, SCULPT_TOOL_PINCH, SCULPT_TOOL_POSE, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SCRAPE, SCULPT_TOOL_SIMPLIFY, SCULPT_TOOL_SLIDE_RELAX, SCULPT_TOOL_SMEAR, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK, and SCULPT_TOOL_THUMB.
Referenced by sculpt_stroke_test_start().
|
static |
Definition at line 1203 of file sculpt.c.
References ELEM, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_DRAW_SHARP, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_GRAB, SCULPT_TOOL_LAYER, SCULPT_TOOL_POSE, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SMOOTH, and SCULPT_TOOL_THUMB.
Referenced by do_brush_action(), and sculpt_topology_update().
|
static |
Definition at line 5808 of file sculpt.c.
References BKE_pbvh_bmesh_node_save_orig(), BKE_pbvh_bmesh_update_topology(), BKE_pbvh_node_mark_topology_update(), BKE_pbvh_node_mark_update(), BKE_pbvh_type(), SculptSession::bm, SculptVertexInfo::boundary, BRUSH_FRONTFACE, SculptSession::cache, SculptVertexInfo::connected_component, copy_v3_v3(), Brush::falloff_shape, Brush::flag, Sculpt::flags, StrokeCache::location, MEM_SAFE_FREE, mul_m4_v3(), Object::obmat, StrokeCache::original, PAINT_FALLOFF_SHAPE_SPHERE, SculptSession::pbvh, PBVH_BMESH, PBVH_Collapse, PBVH_Subdivide, StrokeCache::radius, Object::sculpt, SCULPT_DYNTOPO_COLLAPSE, SCULPT_DYNTOPO_DETAIL_MANUAL, SCULPT_DYNTOPO_SUBDIVIDE, sculpt_pbvh_gather_generic(), Brush::sculpt_tool, SCULPT_TOOL_MASK, sculpt_tool_needs_original(), SCULPT_TOOL_SIMPLIFY, SCULPT_UNDO_COORDS, SCULPT_UNDO_MASK, SCULPT_undo_push_node(), StrokeCache::true_location, SculptSession::vertex_info, and StrokeCache::view_normal.
Referenced by sculpt_stroke_update_step().
|
static |
Definition at line 7001 of file sculpt.c.
References add_v3_v3(), UnifiedPaintSettings::anchored_initial_mouse, StrokeCache::anchored_location, UnifiedPaintSettings::anchored_size, angle(), axis_angle_normalized_to_quat(), BRUSH_ANCHORED, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_GRAB_ACTIVE_VERTEX, SculptSession::cache, Brush::cloth_deform_type, copy_v2_v2(), copy_v3_v3(), UnifiedPaintSettings::draw_anchored, ED_view3d_win_to_3d(), ELEM, eps, Brush::falloff_shape, Brush::flag, SculptRakeData::follow_co, SculptRakeData::follow_dist, StrokeCache::grab_delta, StrokeCache::initial_mouse, invert_m4_m4(), StrokeCache::is_rake_rotation_valid, is_zero_v3(), len_squared_v3v3(), StrokeCache::mouse_event, mul_mat3_m4_v3(), mul_v3_m4v3(), normalize_v3(), Object::obmat, StrokeCache::old_grab_location, StrokeCache::orig_grab_location, PAINT_FALLOFF_SHAPE_TUBE, UnifiedPaintSettings::pixel_radius, project_plane_v3_v3v3(), quat_to_axis_angle(), StrokeCache::radius, StrokeCache::rake_data, Brush::rake_factor, StrokeCache::rake_rotation, ViewContext::region, rotation_between_vecs_to_quat(), Object::sculpt, SCULPT_active_vertex_get(), sculpt_brush_needs_rake_rotation(), sculpt_brush_use_topology_rake(), SCULPT_is_cloth_deform_brush(), sculpt_needs_delta_for_tip_orientation(), sculpt_needs_delta_from_anchored_origin(), SCULPT_RAKE_BRUSH_FACTOR, sculpt_rake_data_update(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), Brush::sculpt_tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_CLAY_THUMB, SCULPT_TOOL_CLOTH, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_GRAB, SCULPT_TOOL_MULTIPLANE_SCRAPE, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PAINT, SCULPT_TOOL_PINCH, SCULPT_TOOL_POSE, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, SCULPT_vertex_co_for_grab_active_get(), sqrtf, square_f(), sub_v3_v3(), sub_v3_v3v3(), StrokeCache::true_location, StrokeCache::true_view_normal, v1, v2, ViewContext::v3d, StrokeCache::vc, and zero_v3().
Referenced by sculpt_update_cache_variants().
|
static |
Definition at line 6775 of file sculpt.c.
References StrokeCache::alt_smooth, BKE_brush_size_get(), BKE_brush_size_set(), BKE_curvemapping_init(), BKE_libblock_find_name(), BKE_paint_brush(), BKE_paint_brush_set(), BLI_dial_init(), BLI_strncpy(), StrokeCache::brush, BRUSH_ACCUMULATE, BRUSH_ANCHORED, BRUSH_MASK_SMOOTH, BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, C, SculptSession::cache, copy_m3_m4(), copy_v2_v2(), copy_v3_v3(), CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), CTX_data_tool_settings(), SculptSession::cursor_location, SculptSession::cursor_normal, Brush::curve, wmOperator::customdata, StrokeCache::dial, UnifiedPaintSettings::draw_inverted, ED_view3d_ob_project_mat_get(), ELEM, fabsf, StrokeCache::first_time, StrokeCache::flag, Brush::flag, Sculpt::gravity_factor, Sculpt::gravity_object, Brush::id, ID_BR, Object::imat, StrokeCache::initial_location, StrokeCache::initial_mouse, StrokeCache::initial_normal, StrokeCache::invert, invert_m4_m4(), Brush::mask_tool, max_ff(), MEM_callocN, StrokeCache::mouse, StrokeCache::mouse_event, mul_m3_v3(), ID::name, StrokeCache::normal_weight, Brush::normal_weight, normalize_v3(), normalize_v3_v3(), Object::obmat, StrokeCache::original, Sculpt::paint, paint_stroke_view_context(), PIXEL_INPUT_THRESHHOLD, Brush::plane_trim, StrokeCache::plane_trim_squared, StrokeCache::projection_mat, wmOperator::ptr, RNA_enum_get(), ViewContext::rv3d, StrokeCache::saved_active_brush_name, StrokeCache::saved_mask_brush_tool, StrokeCache::saved_smooth_size, StrokeCache::scale, Object::scale, scene, sculpt_init_mirror_clipping(), Brush::sculpt_tool, SCULPT_TOOL_DISPLACEMENT_ERASER, SCULPT_TOOL_DISPLACEMENT_SMEAR, SCULPT_TOOL_DRAW_FACE_SETS, SCULPT_TOOL_DRAW_SHARP, SCULPT_TOOL_HAS_ACCUMULATE, SCULPT_TOOL_HAS_NORMAL_WEIGHT, SCULPT_TOOL_MASK, SCULPT_TOOL_PAINT, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SIMPLIFY, SCULPT_TOOL_SLIDE_RELAX, SCULPT_TOOL_SMEAR, SCULPT_TOOL_SMOOTH, size(), StrokeCache::supports_gravity, UnifiedPaintSettings::tex_mouse, StrokeCache::true_gravity_direction, StrokeCache::true_initial_location, StrokeCache::true_initial_normal, StrokeCache::true_view_normal, ToolSettings::unified_paint_settings, StrokeCache::vc, RegionView3D::viewinv, and zero_v2().
Referenced by sculpt_stroke_test_start().
|
static |
Definition at line 7158 of file sculpt.c.
References BRUSH_PAINT_DENSITY_PRESSURE, BRUSH_PAINT_DENSITY_PRESSURE_INVERT, BRUSH_PAINT_FLOW_PRESSURE, BRUSH_PAINT_FLOW_PRESSURE_INVERT, BRUSH_PAINT_HARDNESS_PRESSURE, BRUSH_PAINT_HARDNESS_PRESSURE_INVERT, BRUSH_PAINT_WET_MIX_PRESSURE, BRUSH_PAINT_WET_MIX_PRESSURE_INVERT, BRUSH_PAINT_WET_PERSISTENCE_PRESSURE, BRUSH_PAINT_WET_PERSISTENCE_PRESSURE_INVERT, StrokeCache::density, Brush::density, StrokeCache::flow, Brush::flow, StrokeCache::hardness, Brush::hardness, StrokeCache::paint_brush, Brush::paint_flags, pow2f(), StrokeCache::pressure, StrokeCache::wet_mix, Brush::wet_mix, StrokeCache::wet_persistence, and Brush::wet_persistence.
Referenced by sculpt_update_cache_variants().
|
static |
Definition at line 7203 of file sculpt.c.
References UnifiedPaintSettings::anchored_initial_mouse, StrokeCache::anchored_location, UnifiedPaintSettings::anchored_size, BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_unprojected_radius_set(), BKE_brush_use_locked_size(), BKE_brush_use_size_pressure(), BKE_paint_brush(), BLI_dial_angle(), BRUSH_ANCHORED, BRUSH_EDGE_TO_EDGE, UnifiedPaintSettings::brush_rotation, StrokeCache::bstrength, C, SculptSession::cache, StrokeCache::clay_pressure_stabilizer, StrokeCache::clay_pressure_stabilizer_index, copy_v2_v2(), copy_v3_v3(), CTX_data_scene(), StrokeCache::dial, UnifiedPaintSettings::draw_anchored, StrokeCache::dyntopo_pixel_radius, StrokeCache::first_time, Brush::flag, StrokeCache::initial_mouse, UnifiedPaintSettings::initial_pixel_radius, StrokeCache::initial_radius, StrokeCache::iteration_count, StrokeCache::mouse, StrokeCache::mouse_event, Sculpt::paint, paint_calc_object_space_radius(), PAINT_MODE_SCULPT, paint_supports_dynamic_size(), StrokeCache::pen_flip, UnifiedPaintSettings::pixel_radius, StrokeCache::pressure, ptr, StrokeCache::radius, StrokeCache::radius_squared, RNA_boolean_get(), RNA_float_get(), RNA_float_get_array(), scene, Object::sculpt, sculpt_brush_dynamic_size_get(), SCULPT_CLAY_STABILIZER_LEN, SCULPT_is_cloth_deform_brush(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), Brush::sculpt_tool, SCULPT_TOOL_CLAY_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK, sculpt_update_brush_delta(), sculpt_update_cache_paint_variants(), StrokeCache::special_rotation, Scene::toolsettings, StrokeCache::true_location, ToolSettings::unified_paint_settings, StrokeCache::vc, StrokeCache::vertex_rotation, StrokeCache::x_tilt, and StrokeCache::y_tilt.
Referenced by sculpt_stroke_update_step().
|
static |
Copy the modified vertices from the PBVH to the active key.
Definition at line 6290 of file sculpt.c.
References BKE_pbvh_vert_coords_alloc(), float(), MEM_freeN, SculptSession::orig_cos, SculptSession::pbvh, Object::sculpt, SCULPT_vertcos_to_key(), and SculptSession::shapekey_active.
Referenced by SCULPT_flush_stroke_deform(), SCULPT_flush_update_done(), and sculpt_stroke_update_step().
| void SCULPT_update_object_bounding_box | ( | Object * | ob | ) |
Definition at line 7749 of file sculpt.c.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BKE_pbvh_bounding_box(), SculptSession::pbvh, Object::runtime, and Object::sculpt.
Referenced by SCULPT_flush_update_step(), and sculpt_undo_restore_list().
|
static |
Definition at line 6577 of file sculpt.c.
References BKE_brush_gen_texture_cache(), BKE_brush_size_get(), BKE_image_pool_free(), BKE_image_pool_new(), BKE_paint_brush(), MEM_freeN, NULL, Sculpt::paint, scene, SculptSession::tex_pool, SculptSession::texcache, SculptSession::texcache_actual, and SculptSession::texcache_side.
Referenced by sculpt_brush_init_tex().
Definition at line 5763 of file sculpt.c.
References Freestyle::a, BKE_keyblock_convert_to_vertcos(), BKE_keyblock_is_basis(), BKE_keyblock_update_from_offset(), BKE_keyblock_update_from_vertcos(), BKE_mesh_calc_normals(), Key::block, MVert::co, copy_v3_v3(), Object::data, ListBase::first, Mesh::key, MEM_freeN, Mesh::mvert, KeyBlock::next, NULL, Key::refkey, KeyBlock::relative, Object::shapenr, sub_v3_v3v3(), and Mesh::totvert.
Referenced by SCULPT_flush_stroke_deform(), sculpt_undo_restore_coords(), and sculpt_update_keyblock().
| bool SCULPT_vertex_all_face_sets_visible_get | ( | const SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 465 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by SCULPT_vertex_is_boundary().
| bool SCULPT_vertex_any_face_set_visible_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 445 of file sculpt.c.
References BKE_pbvh_type(), MeshElemMap::count, SculptSession::face_sets, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::pmap.
| const float* SCULPT_vertex_co_for_grab_active_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 207 of file sculpt.c.
References BKE_pbvh_get_verts(), MVert::co, SculptSession::mvert, SculptSession::pbvh, SCULPT_vertex_co_get(), and SculptSession::shapekey_active.
Referenced by paint_cursor_draw_3d_view_brush_cursor_inactive(), sculpt_geometry_preview_lines_draw(), SCULPT_geometry_preview_lines_update(), and sculpt_update_brush_delta().
| const float* SCULPT_vertex_co_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 134 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_key(), BKE_pbvh_get_grids(), BKE_pbvh_get_verts(), BKE_pbvh_type(), BM_vert_at_index(), CCG_elem_co(), CCG_elem_offset(), BMVert::co, MVert::co, SculptSession::deform_modifiers_active, CCGKey::grid_area, SculptSession::mvert, NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::shapekey_active.
Referenced by automask_floodfill_cb(), boundary_floodfill_cb(), boundary_initial_vertex_floodfill_cb(), cloth_brush_add_length_constraint(), do_boundary_brush_smooth_task_cb_ex(), do_displacement_smear_brush(), do_displacement_smear_store_prev_disp_task_cb_ex(), do_smear_brush_task_cb_exec(), do_topology_slide_task_cb_ex(), dyntopo_detail_size_sample_from_surface(), mesh_filter_enhance_details_init_directions(), mesh_filter_sharpen_init(), mesh_filter_task_cb(), neighbor_dirty_mask(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_preview_boundary_data_pivot_draw(), pose_face_sets_floodfill_cb(), pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), pose_topology_floodfill_cb(), sample_detail_voxel(), SCULPT_active_vertex_co_get(), sculpt_boundary_bend_data_init(), SCULPT_boundary_edges_preview_draw(), sculpt_boundary_edit_data_init(), sculpt_boundary_indices_init(), SCULPT_boundary_pivot_line_preview_draw(), sculpt_boundary_slide_data_init(), sculpt_boundary_twist_data_init(), SCULPT_cloth_brush_simulation_init(), SCULPT_cloth_brush_store_simulation_state(), sculpt_cloth_filter_modal(), SCULPT_enhance_details_brush(), sculpt_expand_falloff_value_vertex_get(), sculpt_expand_get_vertex_index_for_symmetry_pass(), sculpt_expand_reposition_pivot(), sculpt_expand_spherical_falloff_create(), SCULPT_fake_neighbor_search(), SCULPT_floodfill_add_initial_with_symmetry(), SCULPT_geodesic_fallback_create(), SCULPT_geodesic_from_vertex_and_symm(), sculpt_gesture_trim_calculate_depth(), SCULPT_neighbor_coords_average(), SCULPT_neighbor_coords_average_interior(), SCULPT_relax_vertex(), sculpt_set_persistent_base_exec(), SCULPT_vertex_co_for_grab_active_get(), SCULPT_vertex_limit_surface_get(), and SCULPT_vertex_persistent_co_get().
| const float* SCULPT_vertex_color_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 157 of file sculpt.c.
References BKE_pbvh_type(), MPropCol::color, NULL, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::vcol.
Referenced by do_mask_by_color_task_cb(), do_smear_store_prev_colors_task_cb_exec(), SCULPT_do_smear_brush(), sculpt_expand_original_state_store(), sculpt_mask_by_color_contiguous(), sculpt_mask_by_color_contiguous_floodfill_cb(), SCULPT_neighbor_color_average(), and sculpt_sample_color_invoke().
| bool SCULPT_vertex_colors_poll | ( | bContext * | C | ) |
Definition at line 6607 of file sculpt.c.
References C, and SCULPT_mode_poll().
Referenced by SCULPT_OT_color_filter(), SCULPT_OT_loop_to_vertex_colors(), SCULPT_OT_mask_by_color(), SCULPT_OT_sample_color(), and SCULPT_OT_vertex_to_loop_colors().
| int SCULPT_vertex_count_get | ( | SculptSession * | ss | ) |
Definition at line 120 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_num_vertices(), BKE_pbvh_type(), BM_mesh_elem_count(), BM_VERT, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::totvert.
Referenced by cloth_brush_apply_brush_foces(), do_brush_action(), do_displacement_smear_brush(), do_layer_brush(), mesh_filter_enhance_details_init_directions(), mesh_filter_init_limit_surface_co(), mesh_filter_sharpen_init(), mesh_filter_surface_smooth_init(), pose_ik_chain_init_face_sets(), pose_ik_chain_init_face_sets_fk(), pose_ik_chain_init_topology(), SCULPT_automasking_cache_init(), SCULPT_boundary_automasking_init(), sculpt_boundary_bend_data_init(), sculpt_boundary_edit_data_init(), sculpt_boundary_falloff_factor_init(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_indices_init(), sculpt_boundary_slide_data_init(), SCULPT_cloth_brush_simulation_create(), SCULPT_cloth_brush_simulation_init(), SCULPT_cloth_brush_store_simulation_state(), sculpt_cloth_filter_modal(), SCULPT_connected_components_ensure(), SCULPT_do_smear_brush(), SCULPT_enhance_details_brush(), sculpt_expand_bitmap_from_enabled(), sculpt_expand_boundary_from_enabled(), sculpt_expand_boundary_topology_falloff_create(), sculpt_expand_diagonals_falloff_create(), sculpt_expand_geodesics_from_state_boundary(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_expand_invoke(), sculpt_expand_modal(), sculpt_expand_normal_falloff_create(), sculpt_expand_original_state_store(), sculpt_expand_reposition_pivot(), sculpt_expand_spherical_falloff_create(), sculpt_expand_topology_falloff_create(), sculpt_expand_topology_from_state_boundary(), sculpt_expand_update_max_vert_falloff_value(), sculpt_face_set_create_exec(), sculpt_face_set_edit_fair_face_set(), sculpt_face_sets_automasking_init(), sculpt_face_sets_change_visibility_exec(), SCULPT_fake_neighbor_init(), SCULPT_fake_neighbors_ensure(), SCULPT_floodfill_init(), SCULPT_geometry_preview_lines_update(), sculpt_gesture_trim_calculate_depth(), sculpt_mask_by_color_contiguous(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), sculpt_pose_grow_pose_factor(), sculpt_set_persistent_base_exec(), and SCULPT_topology_automasking_init().
| int SCULPT_vertex_face_set_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 514 of file sculpt.c.
References abs(), BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by mask_init_task_cb(), pose_face_sets_fk_find_masked_floodfill_cb(), pose_face_sets_floodfill_cb(), and sculpt_expand_state_get().
| void SCULPT_vertex_face_set_set | ( | SculptSession * | ss, |
| int | index, | ||
| int | face_set | ||
| ) |
Definition at line 489 of file sculpt.c.
References abs(), BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by do_draw_face_sets_brush_task_cb_ex(), face_set_gesture_apply_task_cb(), sculpt_expand_task_cb(), and sculpt_face_set_create_exec().
|
static |
Definition at line 8871 of file sculpt.c.
References SculptVertexInfo::connected_component, SCULPT_TOPOLOGY_ID_DEFAULT, and SculptSession::vertex_info.
Referenced by do_fake_neighbor_search_task_cb(), and SCULPT_fake_neighbor_search().
| bool SCULPT_vertex_has_face_set | ( | SculptSession * | ss, |
| int | index, | ||
| int | face_set | ||
| ) |
Definition at line 539 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_grid_to_face_index(), MeshElemMap::count, SculptSession::face_sets, CCGKey::grid_area, MeshElemMap::indices, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SculptSession::pmap, and SculptSession::subdiv_ccg.
Referenced by cloth_filter_apply_forces_task_cb(), pose_face_sets_fk_find_masked_floodfill_cb(), pose_face_sets_fk_set_weights_floodfill_cb(), pose_face_sets_floodfill_cb(), pose_ik_chain_init_face_sets_fk(), SCULPT_automasking_factor_get(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_face_set_edit_fair_face_set(), and sculpt_face_sets_automasking_init().
| bool SCULPT_vertex_has_unique_face_set | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 669 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_coarse_mesh_adjacency_info_get(), CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, SculptSession::mloop, SculptSession::mpoly, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, sculpt_check_unique_face_set_for_edge_in_base_mesh(), sculpt_check_unique_face_set_in_base_mesh(), SculptSession::subdiv_ccg, SUBDIV_CCG_ADJACENT_EDGE, SUBDIV_CCG_ADJACENT_NONE, SUBDIV_CCG_ADJACENT_VERTEX, v1, and v2.
Referenced by do_relax_face_sets_brush_task_cb_ex(), mesh_filter_task_cb(), pose_face_sets_fk_find_masked_floodfill_cb(), pose_face_sets_floodfill_cb(), SCULPT_automasking_factor_get(), SCULPT_boundary_automasking_init(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_face_set_edit_fair_face_set(), and SCULPT_relax_vertex().
| bool SCULPT_vertex_is_boundary | ( | const SculptSession * | ss, |
| const int | index | ||
| ) |
Definition at line 868 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_coarse_mesh_adjacency_info_get(), SculptSession::bm, BM_vert_at_index(), BM_vert_is_boundary(), CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, SculptSession::mloop, SculptSession::mpoly, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, sculpt_check_boundary_vertex_in_base_mesh(), SCULPT_vertex_all_face_sets_visible_get(), SculptSession::subdiv_ccg, SUBDIV_CCG_ADJACENT_EDGE, SUBDIV_CCG_ADJACENT_NONE, SUBDIV_CCG_ADJACENT_VERTEX, v, v1, and v2.
Referenced by boundary_floodfill_cb(), boundary_initial_vertex_floodfill_cb(), SCULPT_automasking_factor_get(), SCULPT_boundary_automasking_init(), sculpt_boundary_get_closest_boundary_vertex(), sculpt_boundary_is_vertex_in_editable_boundary(), sculpt_expand_boundary_from_enabled(), sculpt_expand_invoke(), sculpt_face_set_edit_fair_face_set(), SCULPT_neighbor_coords_average_interior(), and SCULPT_relax_vertex().
| void SCULPT_vertex_limit_surface_get | ( | SculptSession * | ss, |
| int | index, | ||
| float | r_co[3] | ||
| ) |
Definition at line 224 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_type(), BKE_subdiv_ccg_eval_limit_point(), copy_v3_v3(), CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, SCULPT_vertex_co_get(), and SculptSession::subdiv_ccg.
Referenced by do_displacement_eraser_brush_task_cb_ex(), do_displacement_smear_brush(), do_displacement_smear_brush_task_cb_ex(), and mesh_filter_init_limit_surface_co().
| float SCULPT_vertex_mask_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 254 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_key(), BKE_pbvh_get_grids(), BKE_pbvh_type(), SculptSession::bm, BM_ELEM_CD_GET_VOID_P, BM_vert_at_index(), CCG_elem_mask(), CCG_elem_offset(), CD_PAINT_MASK, CustomData_get_offset(), CCGKey::grid_area, mask(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, v, BMesh::vdata, and SculptSession::vmask.
Referenced by cloth_brush_satisfy_constraints(), sculpt_expand_original_state_store(), sculpt_face_set_create_exec(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), and SCULPT_neighbor_mask_average().
|
static |
Definition at line 724 of file sculpt.c.
References SculptVertexNeighborIter::capacity, MEM_mallocN, MEM_reallocN_id, SculptVertexNeighborIter::neighbors, SculptVertexNeighborIter::neighbors_fixed, SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY, and SculptVertexNeighborIter::size.
Referenced by sculpt_vertex_neighbors_get_bmesh(), sculpt_vertex_neighbors_get_faces(), and sculpt_vertex_neighbors_get_grids().
| void SCULPT_vertex_neighbors_get | ( | SculptSession * | ss, |
| const int | index, | ||
| const bool | include_duplicates, | ||
| SculptVertexNeighborIter * | iter | ||
| ) |
Definition at line 844 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, sculpt_vertex_neighbors_get_bmesh(), sculpt_vertex_neighbors_get_faces(), and sculpt_vertex_neighbors_get_grids().
|
static |
Definition at line 749 of file sculpt.c.
References ARRAY_SIZE, SculptSession::bm, BM_elem_index_get, BM_ITER_ELEM, BM_LOOPS_OF_VERT, BM_vert_at_index(), SculptVertexNeighborIter::capacity, l, SculptVertexNeighborIter::neighbors, SculptVertexNeighborIter::neighbors_fixed, BMLoop::next, SculptVertexNeighborIter::num_duplicates, BMLoop::prev, sculpt_vertex_neighbor_add(), SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY, SculptVertexNeighborIter::size, BMLoop::v, and v.
Referenced by SCULPT_vertex_neighbors_get().
|
static |
Definition at line 772 of file sculpt.c.
References ARRAY_SIZE, BLI_assert, SculptVertexNeighborIter::capacity, MeshElemMap::count, SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, SculptSession::fake_neighbors, MeshElemMap::indices, SculptSession::mloop, SculptSession::mpoly, SculptVertexNeighborIter::neighbors, SculptVertexNeighborIter::neighbors_fixed, NULL, SculptVertexNeighborIter::num_duplicates, SculptSession::pmap, poly_get_adj_loops_from_vert(), sculpt_vertex_neighbor_add(), SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY, SculptVertexNeighborIter::size, and SculptFakeNeighbors::use_fake_neighbors.
Referenced by SCULPT_vertex_neighbors_get().
|
static |
Definition at line 802 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_subdiv_ccg_neighbor_coords_get(), BLI_assert, SculptVertexNeighborIter::capacity, SubdivCCGNeighbors::coords, SubdivCCGNeighbors::coords_fixed, SculptFakeNeighbors::fake_neighbor_index, FAKE_NEIGHBOR_NONE, SculptSession::fake_neighbors, CCGKey::grid_area, SubdivCCGCoord::grid_index, CCGKey::grid_size, MEM_freeN, SculptVertexNeighborIter::neighbors, SculptVertexNeighborIter::neighbors_fixed, NULL, SubdivCCGNeighbors::num_duplicates, SculptVertexNeighborIter::num_duplicates, SculptSession::pbvh, sculpt_vertex_neighbor_add(), SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY, SubdivCCGNeighbors::size, SculptVertexNeighborIter::size, SculptSession::subdiv_ccg, SculptFakeNeighbors::use_fake_neighbors, SubdivCCGCoord::x, and SubdivCCGCoord::y.
Referenced by SCULPT_vertex_neighbors_get().
| void SCULPT_vertex_normal_get | ( | SculptSession * | ss, |
| int | index, | ||
| float | no[3] | ||
| ) |
Definition at line 172 of file sculpt.c.
References BKE_pbvh_get_bmesh(), BKE_pbvh_get_grid_key(), BKE_pbvh_get_grids(), BKE_pbvh_get_verts(), BKE_pbvh_type(), BM_vert_at_index(), CCG_elem_no(), CCG_elem_offset(), copy_v3_v3(), SculptSession::deform_modifiers_active, CCGKey::grid_area, SculptSession::mvert, BMVert::no, MVert::no, normal_short_to_float_v3(), SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SculptSession::shapekey_active.
Referenced by cloth_filter_apply_forces_task_cb(), mask_expand_floodfill_cb(), mask_expand_normal_floodfill_cb(), SCULPT_active_vertex_normal_get(), sculpt_boundary_bend_data_init(), sculpt_expand_normal_falloff_create(), sculpt_gesture_is_vertex_effected(), SCULPT_relax_vertex(), sculpt_set_persistent_base_exec(), and SCULPT_vertex_persistent_normal_get().
| const float* SCULPT_vertex_persistent_co_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 199 of file sculpt.c.
References SculptPersistentBase::co, SculptSession::persistent_base, and SCULPT_vertex_co_get().
Referenced by cloth_brush_add_length_constraint(), and do_layer_brush_task_cb_ex().
| void SCULPT_vertex_persistent_normal_get | ( | SculptSession * | ss, |
| int | index, | ||
| float | no[3] | ||
| ) |
Definition at line 245 of file sculpt.c.
References copy_v3_v3(), SculptPersistentBase::no, SculptSession::persistent_base, and SCULPT_vertex_normal_get().
Referenced by do_layer_brush_task_cb_ex().
| void SCULPT_vertex_random_access_ensure | ( | SculptSession * | ss | ) |
Definition at line 112 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::bm, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, SculptSession::pbvh, and PBVH_BMESH.
Referenced by dyntopo_detail_size_edit_invoke(), ED_sculpt_init_transform(), ED_sculpt_update_modal_transform(), sample_detail_voxel(), SCULPT_automasking_cache_init(), SCULPT_boundary_data_init(), sculpt_cloth_filter_invoke(), sculpt_cloth_filter_modal(), SCULPT_cursor_geometry_info_update(), sculpt_dirty_mask_exec(), SCULPT_enhance_details_brush(), sculpt_expand_ensure_sculptsession_data(), sculpt_face_sets_change_visibility_invoke(), SCULPT_floodfill_init(), sculpt_mask_by_color_invoke(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), sculpt_mesh_filter_invoke(), sculpt_mesh_filter_modal(), SCULPT_pose_calc_pose_data(), sculpt_set_persistent_base_exec(), SCULPT_smooth(), sculpt_trim_gesture_box_invoke(), and sculpt_trim_gesture_lasso_invoke().
| bool SCULPT_vertex_visible_get | ( | SculptSession * | ss, |
| int | index | ||
| ) |
Definition at line 362 of file sculpt.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_get_grid_visibility(), BKE_pbvh_type(), BLI_BITMAP_TEST, SculptSession::bm, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_vert_at_index(), MVert::flag, CCGKey::grid_area, ME_HIDE, SculptSession::mvert, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, and PBVH_GRIDS.
Referenced by boundary_initial_vertex_floodfill_cb(), sculpt_boundary_edit_data_init(), sculpt_boundary_is_vertex_in_editable_boundary(), sculpt_expand_state_get(), sculpt_face_set_create_exec(), sculpt_face_sets_change_visibility_exec(), SCULPT_floodfill_execute(), SCULPT_visibility_sync_all_vertex_to_face_sets(), and sculpt_visibility_sync_vertex_to_face_sets().
| void SCULPT_vertex_visible_set | ( | SculptSession * | ss, |
| int | index, | ||
| bool | visible | ||
| ) |
Definition at line 347 of file sculpt.c.
References BKE_pbvh_type(), SculptSession::bm, BM_elem_flag_set, BM_ELEM_HIDDEN, BM_vert_at_index(), MVert::flag, ME_HIDE, ME_VERT_PBVH_UPDATE, SculptSession::mvert, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and SET_FLAG_FROM_TEST.
| void SCULPT_visibility_sync_all_face_sets_to_vertices | ( | Object * | ob | ) |
Definition at line 563 of file sculpt.c.
References BKE_object_get_original_mesh(), BKE_pbvh_type(), BKE_sculpt_sync_face_sets_visibility_to_base_mesh(), BKE_sculpt_sync_face_sets_visibility_to_grids(), mesh, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, Object::sculpt, and SculptSession::subdiv_ccg.
Referenced by face_set_edit_do_post_visibility_updates(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), and sculpt_undo_restore_list().
| void SCULPT_visibility_sync_all_vertex_to_face_sets | ( | SculptSession * | ss | ) |
Definition at line 598 of file sculpt.c.
References abs(), BKE_pbvh_type(), SculptSession::face_sets, l, MPoly::loopstart, SculptSession::mloop, SculptSession::mpoly, SculptSession::pbvh, PBVH_FACES, SCULPT_vertex_visible_get(), SculptSession::totfaces, MPoly::totloop, and MLoop::v.
Referenced by hide_show_exec(), and sculpt_undo_restore_list().
|
static |
Definition at line 582 of file sculpt.c.
References abs(), MeshElemMap::indices, ME_VERT_PBVH_UPDATE, and SCULPT_vertex_visible_get().
Definition at line 2871 of file sculpt.c.
References BKE_paint_brush(), StrokeCache::brush_local_mat, SculptSession::cache, calc_brush_local_mat(), StrokeCache::mirror_symmetry_pass, Sculpt::paint, StrokeCache::radial_symmetry_pass, and Object::sculpt.
Referenced by do_brush_action().
|
static |
Definition at line 2762 of file sculpt.c.
References BKE_paint_brush(), BRUSH_ANCHORED, BRUSH_ORIGINAL_NORMAL, SculptSession::cache, calc_sculpt_normal(), copy_v3_v3(), Brush::falloff_shape, Brush::flag, flip_v3(), StrokeCache::mirror_symmetry_pass, mul_m4_v3(), StrokeCache::normal_weight, normalize_v3(), Sculpt::paint, PAINT_FALLOFF_SHAPE_TUBE, project_plane_v3_v3v3(), StrokeCache::radial_symmetry_pass, Object::sculpt, StrokeCache::sculpt_normal, StrokeCache::sculpt_normal_symm, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), Brush::sculpt_tool, SCULPT_TOOL_ELASTIC_DEFORM, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, StrokeCache::symm_rot_mat, and StrokeCache::view_normal.
Referenced by do_brush_action().
|
static |
Definition at line 8679 of file sculpt.c.
References MLoopCol::a, MLoopCol::b, C, CD_MLOOP, CD_MLOOPCOL, CD_MPOLY, CD_PROP_COLOR, MPropCol::color, CTX_data_active_object(), CustomData_get_active_layer(), CustomData_get_layer(), CustomData_get_layer_n(), data, Object::data, DEG_id_tag_update(), MLoopCol::g, Object::id, ID_IS_LINKED, ID_RECALC_GEOMETRY, Mesh::ldata, MPoly::loopstart, mesh, NC_GEOM, ND_DATA, OB_MESH, OPERATOR_CANCELLED, OPERATOR_FINISHED, MLoopCol::r, MPoly::totloop, Mesh::totpoly, Object::type, MLoop::v, and WM_event_add_notifier().
Referenced by SCULPT_OT_vertex_to_loop_colors().