Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_hash.h"
#include "BLI_index_range.hh"
#include "BLI_math.h"
#include "BLI_task.h"
#include "DNA_brush_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.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 "paint_intern.h"
#include "sculpt_intern.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "bmesh.h"
#include <cmath>
#include <cstdlib>
Go to the source code of this file.
Classes | |
struct | AutomaskFloodFillData |
Macros | |
#define | EDGE_DISTANCE_INF -1 |
#define EDGE_DISTANCE_INF -1 |
Definition at line 254 of file sculpt_automasking.cc.
|
static |
Definition at line 181 of file sculpt_automasking.cc.
References data, SCULPT_is_vertex_inside_brush_radius_symm(), and SCULPT_vertex_co_get().
Referenced by SCULPT_topology_automasking_init().
AutomaskingCache* SCULPT_automasking_active_cache_get | ( | SculptSession * | ss | ) |
Definition at line 52 of file sculpt_automasking.cc.
References FilterCache::automasking, StrokeCache::automasking, SculptSession::cache, and SculptSession::filter_cache.
Referenced by cloth_brush_satisfy_constraints(), and do_cloth_brush_solve_simulation_task_cb_ex().
void SCULPT_automasking_cache_free | ( | AutomaskingCache * | automasking | ) |
Definition at line 150 of file sculpt_automasking.cc.
References AutomaskingCache::factor, and MEM_SAFE_FREE.
Referenced by SCULPT_filter_cache_free(), and sculpt_stroke_done().
AutomaskingCache* SCULPT_automasking_cache_init | ( | Sculpt * | sd, |
Brush * | brush, | ||
Object * | ob | ||
) |
Definition at line 324 of file sculpt_automasking.cc.
References AUTOMASK_INIT_BOUNDARY_EDGES, AUTOMASK_INIT_BOUNDARY_FACE_SETS, Brush::automasking_boundary_edges_propagation_steps, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, AutomaskingCache::factor, MEM_callocN, MEM_malloc_arrayN, Object::sculpt, SCULPT_automasking_cache_settings_update(), SCULPT_automasking_needs_factors_cache(), SCULPT_boundary_automasking_init(), SCULPT_boundary_info_ensure(), sculpt_face_sets_automasking_init(), SCULPT_is_automasking_enabled(), SCULPT_is_automasking_mode_enabled(), SCULPT_topology_automasking_init(), SCULPT_vertex_count_get(), and SCULPT_vertex_random_access_ensure().
Referenced by do_brush_action(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), and sculpt_mesh_filter_invoke().
|
static |
Definition at line 315 of file sculpt_automasking.cc.
References AutomaskingSettings::flags, AutomaskingSettings::initial_face_set, SCULPT_active_face_set_get(), sculpt_automasking_mode_effective_bits(), and AutomaskingCache::settings.
Referenced by SCULPT_automasking_cache_init().
float SCULPT_automasking_factor_get | ( | AutomaskingCache * | automasking, |
SculptSession * | ss, | ||
int | vert | ||
) |
Definition at line 117 of file sculpt_automasking.cc.
References BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_FACE_SETS, AutomaskingCache::factor, AutomaskingSettings::flags, AutomaskingSettings::initial_face_set, SCULPT_vertex_has_face_set(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), and AutomaskingCache::settings.
Referenced by cloth_brush_satisfy_constraints(), cloth_filter_apply_forces_task_cb(), color_filter_task_cb(), do_boundary_brush_bend_task_cb_ex(), do_boundary_brush_grab_task_cb_ex(), do_boundary_brush_inflate_task_cb_ex(), do_boundary_brush_slide_task_cb_ex(), do_boundary_brush_twist_task_cb_ex(), do_cloth_brush_solve_simulation_task_cb_ex(), do_elastic_deform_brush_task_cb_ex(), do_pose_brush_task_cb_ex(), do_snake_hook_brush_task_cb_ex(), mesh_filter_surface_smooth_displace_task_cb(), mesh_filter_task_cb(), and SCULPT_brush_strength_factor().
Definition at line 160 of file sculpt_automasking.cc.
References ELEM, Brush::falloff_shape, PAINT_FALLOFF_SHAPE_TUBE, Brush::sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE, and SCULPT_TOOL_THUMB.
Referenced by SCULPT_topology_automasking_init().
|
static |
Definition at line 93 of file sculpt_automasking.cc.
References Brush::automasking_flags, and Sculpt::automasking_flags.
Referenced by SCULPT_automasking_cache_settings_update(), and SCULPT_automasking_needs_factors_cache().
|
static |
Definition at line 101 of file sculpt_automasking.cc.
References Brush::automasking_boundary_edges_propagation_steps, BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, and sculpt_automasking_mode_effective_bits().
Referenced by SCULPT_automasking_cache_init().
float* SCULPT_boundary_automasking_init | ( | Object * | ob, |
eBoundaryAutomaskMode | mode, | ||
int | propagation_steps, | ||
float * | automask_factor | ||
) |
Definition at line 256 of file sculpt_automasking.cc.
References AUTOMASK_INIT_BOUNDARY_EDGES, AUTOMASK_INIT_BOUNDARY_FACE_SETS, BLI_assert_msg, EDGE_DISTANCE_INF, float(), SculptVertexNeighborIter::index, MEM_callocN, MEM_SAFE_FREE, SculptSession::pmap, pow2f(), Object::sculpt, SCULPT_vertex_count_get(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, and SCULPT_VERTEX_NEIGHBORS_ITER_END.
Referenced by SCULPT_automasking_cache_init().
|
static |
Definition at line 229 of file sculpt_automasking.cc.
References BKE_paint_brush(), BKE_pbvh_type(), BLI_assert_msg, Sculpt::paint, SculptSession::pbvh, PBVH_FACES, SculptSession::pmap, Object::sculpt, SCULPT_active_face_set_get(), SCULPT_is_automasking_enabled(), SCULPT_vertex_count_get(), and SCULPT_vertex_has_face_set().
Referenced by SCULPT_automasking_cache_init().
bool SCULPT_is_automasking_enabled | ( | const Sculpt * | sd, |
const SculptSession * | ss, | ||
const Brush * | br | ||
) |
Definition at line 73 of file sculpt_automasking.cc.
References BRUSH_AUTOMASKING_BOUNDARY_EDGES, BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS, BRUSH_AUTOMASKING_FACE_SETS, BRUSH_AUTOMASKING_TOPOLOGY, SCULPT_is_automasking_mode_enabled(), and SCULPT_stroke_is_dynamic_topology().
Referenced by do_brush_action(), SCULPT_automasking_cache_init(), sculpt_color_filter_invoke(), sculpt_face_sets_automasking_init(), sculpt_mesh_filter_invoke(), sculpt_needs_connectivity_info(), and sculpt_stroke_done().
bool SCULPT_is_automasking_mode_enabled | ( | const Sculpt * | sd, |
const Brush * | br, | ||
const eAutomasking_flag | mode | ||
) |
Definition at line 63 of file sculpt_automasking.cc.
References Brush::automasking_flags, and Sculpt::automasking_flags.
Referenced by SCULPT_automasking_cache_init(), and SCULPT_is_automasking_enabled().
|
static |
Definition at line 193 of file sculpt_automasking.cc.
References AutomaskFloodFillData::automask_factor, automask_floodfill_cb(), BKE_paint_brush(), BKE_pbvh_type(), BLI_assert_msg, SculptSession::cache, copy_v3_v3(), AutomaskFloodFillData::location, Sculpt::paint, SculptSession::pbvh, PBVH_FACES, SculptSession::pmap, AutomaskFloodFillData::radius, StrokeCache::radius, Object::sculpt, SCULPT_active_vertex_co_get(), sculpt_automasking_is_constrained_by_radius(), SCULPT_floodfill_add_active(), SCULPT_floodfill_execute(), SCULPT_floodfill_free(), SCULPT_floodfill_init(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_vertex_count_get(), AutomaskFloodFillData::symm, and AutomaskFloodFillData::use_radius.
Referenced by SCULPT_automasking_cache_init().