102 #define SCULPT_EXPAND_VERTEX_NONE -1
105 #define EXPAND_ACTIVE_COMPONENT_NONE -1
110 #define SCULPT_EXPAND_TEXTURE_DISTORTION_STEP 0.01f
117 #define SCULPT_EXPAND_LOOP_THRESHOLD 0.00001f
124 #define SCULPT_EXPAND_NORMALS_FALLOFF_EDGE_SENSITIVITY 300
244 if (expand_cache->
snap) {
253 const float loop_len = (max_falloff_factor / expand_cache->
loop_count) +
257 ss, expand_cache,
v);
258 const float active_factor = fmod(expand_cache->
active_falloff, loop_len);
259 const float falloff_factor = fmod(vertex_falloff_factor, loop_len);
261 enabled = falloff_factor < active_factor;
264 if (expand_cache->
invert) {
298 const float active_factor = fmod(expand_cache->
active_falloff, loop_len);
299 const float falloff_factor = fmod(expand_cache->
face_falloff[f], loop_len);
300 enabled = falloff_factor < active_factor;
309 if (expand_cache->
invert) {
329 const float loop_len = (max_falloff_factor / expand_cache->
loop_count) +
333 const float active_factor = fmod(expand_cache->
active_falloff, loop_len);
334 const float falloff_factor = fmod(vertex_falloff_factor, loop_len);
336 float linear_falloff;
338 if (expand_cache->
invert) {
341 BLI_assert((loop_len - active_factor) != 0.0f);
342 linear_falloff = (falloff_factor - active_factor) / (loop_len - active_factor);
345 linear_falloff = 1.0f - (falloff_factor / active_factor);
349 return linear_falloff;
365 for (
int i = 0; i < totvert; i++) {
369 return enabled_vertices;
379 const bool use_mesh_boundary)
383 for (
int i = 0; i < totvert; i++) {
388 bool is_expand_boundary =
false;
392 is_expand_boundary =
true;
398 is_expand_boundary =
true;
404 return boundary_vertices;
415 const int original_vertex)
420 symm_vertex = original_vertex;
455 const float to_it =
data->dists[from_v] + 1.0f;
456 data->dists[to_v] = to_it;
459 data->dists[to_v] =
data->dists[from_v];
489 SculptSession *ss,
int from_v,
int to_v,
bool is_duplicate,
void *userdata)
493 float current_normal[3], prev_normal[3];
496 const float from_edge_factor =
data->edge_factor[from_v];
497 data->edge_factor[to_v] =
dot_v3v3(current_normal, prev_normal) * from_edge_factor;
499 powf(from_edge_factor,
data->edge_sensitivity);
504 data->edge_factor[to_v] =
data->edge_factor[from_v];
505 data->dists[to_v] =
data->dists[from_v];
514 const float edge_sensitivity)
519 float *edge_factor =
MEM_callocN(
sizeof(
float) * totvert,
"mask edge factor");
520 for (
int i = 0; i < totvert; i++) {
521 edge_factor[i] = 1.0f;
537 for (
int repeat = 0; repeat < 2; repeat++) {
538 for (
int i = 0; i < totvert; i++) {
542 avg += dists[ni.
index];
545 dists[i] = avg / ni.
size;
564 for (
int i = 0; i < totvert; i++) {
569 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
574 if (symm_vertex != -1) {
576 for (
int i = 0; i < totvert; i++) {
600 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
634 dists[ni.
index] = dists[v_next] + 1.0f;
668 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
688 for (
int j = 0; j < ss->
pmap[v_next].
count; j++) {
695 dists[neighbor_v] = dists[v_next] + 1.0f;
719 for (
int i = 0; i < totvert; i++) {
742 for (
int i = 0; i < totface; i++) {
774 for (
int g = 0; g < key->
grid_area; g++) {
775 accum += expand_cache->
vert_falloff[grid_loop_index + g];
806 mesh->
totpoly,
sizeof(
float),
"face falloff factors");
837 for (
int i = 0; i < totvert; i++) {
871 for (
int i = 0; i < totvert; i++) {
906 switch (recursion_type) {
932 const int active_face_set,
933 const bool internal_falloff)
939 for (
int i = 0; i < totvert; i++) {
958 if (internal_falloff) {
959 for (
int i = 0; i < totvert; i++) {
967 float min_factor = FLT_MAX;
968 for (
int i = 0; i < totvert; i++) {
972 const float additional_falloff =
fabsf(min_factor);
973 for (
int i = 0; i < totvert; i++) {
978 for (
int i = 0; i < totvert; i++) {
1004 switch (falloff_type) {
1060 const bool prev_snap_state = expand_cache->
snap;
1061 const bool prev_invert_state = expand_cache->
invert;
1062 expand_cache->
snap =
false;
1063 expand_cache->
invert =
false;
1068 for (
int i = 0; i < totface; i++) {
1073 for (
int p = 0; p < totface; p++) {
1075 bool any_disabled =
false;
1079 any_disabled =
true;
1090 expand_cache->
snap = prev_snap_state;
1091 expand_cache->
invert = prev_invert_state;
1128 for (
int n = 0; n < totnode; n++) {
1133 for (
int i = 0; i < ss->
totfaces; i++) {
1143 for (
int n = 0; n < totnode; n++) {
1160 for (
int n = 0; n < totnode; n++) {
1180 switch (expand_cache->
target) {
1229 bool any_changed =
false;
1233 const float initial_mask = *vd.
mask;
1249 if (new_mask == initial_mask) {
1271 for (
int f = 0; f < totface; f++) {
1284 for (
int i = 0; i < expand_cache->
totnode; i++) {
1301 bool any_changed =
false;
1305 float initial_color[4];
1321 float final_color[4];
1322 float final_fill_color[4];
1374 for (
int i = 0; i < totface; i++) {
1381 for (
int i = 0; i < totvert; i++) {
1388 for (
int i = 0; i < totvert; i++) {
1400 for (
int i = 0; i < totfaces; i++) {
1441 .nodes = expand_cache->
nodes,
1447 switch (expand_cache->
target) {
1470 const float mouse[2])
1490 const bool initial_invert_state = expand_cache->
invert;
1491 expand_cache->
invert =
false;
1497 const float use_mesh_boundary = expand_cache->
falloff_type !=
1501 ss, enabled_vertices, use_mesh_boundary);
1505 expand_cache->
invert = initial_invert_state;
1508 float avg[3] = {0.0f};
1512 for (
int i = 0; i < totvert; i++) {
1551 for (
int n = 0; n < totnode; n++) {
1578 const int initial_vertex)
1586 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
1592 ob, symm_it, initial_vertex);
1606 const float mouse[2])
1647 const float mouse[2] = {
event->mval[0],
event->mval[1]};
1715 const float mouse[2] = {
event->mval[0],
event->mval[1]};
1721 switch (event->
val) {
1746 if (expand_cache->
snap) {
1747 expand_cache->
snap =
false;
1754 expand_cache->
snap =
true;
1762 if (expand_cache->
move) {
1763 expand_cache->
move =
false;
1772 expand_cache->
move =
true;
1855 "Active brush does not contain any texture to distort the expand boundary");
1861 "Texture mapping not set to 3D, results may be unpredictable");
1877 if (expand_cache->
move) {
1882 if (expand_cache->
snap) {
1906 const int delete_id)
1913 bool all_same_id =
true;
1914 for (
int i = 0; i < totface; i++) {
1918 if (r_face_sets[i] != delete_id) {
1919 all_same_id =
false;
1933 for (
int i = 0; i < totface; i++) {
1934 if (r_face_sets[i] == delete_id) {
1940 bool any_updated =
false;
1943 int other_id = delete_id;
1948 for (
int i = 0; i < vert_map->
count; i++) {
1950 const int neighbor_face_index = vert_map->
indices[i];
1955 if (r_face_sets[neighbor_face_index] != delete_id) {
1956 other_id = r_face_sets[neighbor_face_index];
1961 if (other_id != delete_id) {
1963 r_face_sets[f_index] = other_id;
1984 for (
int i = 0; i < totface; i++) {
1986 r_face_sets[i] =
abs(r_face_sets[i]);
1989 r_face_sets[i] = -
abs(r_face_sets[i]);
2037 switch (expand_cache->
target) {
2039 for (
int i = 0; i < totnode; i++) {
2047 for (
int i = 0; i < totnode; i++) {
2100 const float mouse[2] = {
event->mval[0],
event->mval[1]};
2145 "RECURSION_STEP_GEODESIC",
2147 "Geodesic recursion step",
2150 "RECURSION_STEP_TOPOLOGY",
2152 "Topology recursion Step",
2158 "FALLOFF_TOPOLOGY_DIAGONALS",
2160 "Diagonals Falloff",
2165 "LOOP_COUNT_INCREASE",
2167 "Loop Count Increase",
2170 "LOOP_COUNT_DECREASE",
2172 "Loop Count Decrease",
2175 "BRUSH_GRADIENT_TOGGLE",
2177 "Toggle Brush Gradient",
2180 "TEXTURE_DISTORTION_INCREASE",
2182 "Texture Distortion Increase",
2185 "TEXTURE_DISTORTION_DECREASE",
2187 "Texture Distortion Decrease",
2192 static const char *name =
"Sculpt Expand Modal";
2223 "TOPOLOGY_DIAGONALS",
2225 "Topology Diagonals",
2244 prop_sculpt_expand_target_type_items,
2247 "Data that is going to be modified in the expand operation");
2251 prop_sculpt_expand_falloff_type_items,
2254 "Initial falloff of the expand operation");
2257 ot->
srna,
"invert",
false,
"Invert",
"Invert the expand active elements");
2259 "use_mask_preserve",
2261 "Preserve Previous",
2262 "Preserve the previous state of the target data");
2264 "use_falloff_gradient",
2267 "Expand Using a linear falloff");
2270 "use_modify_active",
2273 "Modify the active Face Set instead of creating a new one");
2277 "use_reposition_pivot",
2280 "Reposition the sculpt transform pivot to the boundary of the expand active area");
2283 "max_geodesic_move_preview",
2287 "Max Vertex Count for Geodesic Move Preview",
2288 "Maximum number of vertices in the mesh for using geodesic falloff when "
2289 "moving the origin of expand. If the total number of vertices is greater "
2290 "than this value, the falloff will be set to spherical when moving",
const float * BKE_brush_color_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_curve_strength(const struct Brush *br, float p, const float len)
float BKE_brush_sample_tex_3d(const struct Scene *scene, const struct Brush *br, const float point[3], float rgba[4], const int thread, struct ImagePool *pool)
struct Scene * CTX_data_scene(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
struct ImagePool * BKE_image_pool_new(void)
General operations, lookup, etc. for blender objects.
void BKE_sculpt_update_object_for_edit(struct Depsgraph *depsgraph, struct Object *ob_orig, bool need_pmap, bool need_mask, bool need_colors)
struct Brush * BKE_paint_brush(struct Paint *paint)
#define SCULPT_FACE_SET_NONE
void BKE_sculpt_color_layer_create_if_needed(struct Object *object)
A BVH for high poly meshes.
#define BKE_pbvh_vertex_iter_begin(pbvh, node, vi, mode)
void BKE_pbvh_node_mark_update_color(PBVHNode *node)
PBVHType BKE_pbvh_type(const PBVH *pbvh)
#define BKE_pbvh_vertex_iter_end
const struct CCGKey * BKE_pbvh_get_grid_key(const PBVH *pbvh)
void BKE_pbvh_parallel_range_settings(struct TaskParallelSettings *settings, bool use_threading, int totnode)
void BKE_pbvh_node_mark_update_mask(PBVHNode *node)
void BKE_pbvh_node_mark_redraw(PBVHNode *node)
void BKE_pbvh_search_gather(PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, PBVHNode ***array, int *tot)
void BKE_report(ReportList *reports, ReportType type, const char *message)
int BKE_subdiv_ccg_grid_to_face_index(const SubdivCCG *subdiv_ccg, const int grid_index)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
#define BLI_BITMAP_NEW(_tot, _alloc_string)
#define BLI_BITMAP_SET(_bitmap, _index, _set)
GSet * BLI_gset_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_gset_haskey(GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_add(GSet *gs, void *key)
bool BLI_gset_remove(GSet *gs, const void *key, GSetKeyFreeFP keyfreefp)
void BLI_gsqueue_free(GSQueue *queue)
void BLI_gsqueue_push(GSQueue *queue, const void *item)
GSQueue * BLI_gsqueue_new(const size_t elem_size)
void BLI_gsqueue_pop(GSQueue *queue, void *r_item)
bool BLI_gsqueue_is_empty(const GSQueue *queue)
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
#define BLI_LINKSTACK_PUSH(var, ptr)
#define BLI_LINKSTACK_DECLARE(var, type)
#define BLI_LINKSTACK_SIZE(var)
#define BLI_LINKSTACK_FREE(var)
#define BLI_LINKSTACK_INIT(var)
#define BLI_LINKSTACK_POP(var)
#define BLI_LINKSTACK_SWAP(var_a, var_b)
MINLINE float max_ff(float a, float b)
MINLINE float clamp_f(float value, float min, float max)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE void mul_v4_v4fl(float r[3], const float a[4], float f)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE void copy_v4_fl(float r[4], float f)
void BLI_task_parallel_range(const int start, const int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
struct Depsgraph Depsgraph
Object is a sort of wrapper for general info.
void ED_workspace_status_text(struct bContext *C, const char *str)
int ED_sculpt_face_sets_find_next_available_id(struct Mesh *mesh)
void IMB_colormanagement_srgb_to_scene_linear_v3(float pixel[3])
void IMB_blend_color_float(float dst[4], const float src1[4], const float src2[4], IMB_BlendMode mode)
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
const Depsgraph * depsgraph
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_calloc_arrayN)(size_t len, size_t size, const char *str)
void *(* MEM_callocN)(size_t len, const char *str)
ThreadQueue * queue
all scheduled work for the cpu
void flip_v3_v3(float out[3], const float in[3], const enum ePaintSymmetryFlags symm)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const float * SCULPT_vertex_co_get(SculptSession *ss, int index)
int SCULPT_vertex_count_get(SculptSession *ss)
void SCULPT_floodfill_add_and_skip_initial(SculptFloodFill *flood, int index)
void SCULPT_floodfill_add_initial_with_symmetry(Sculpt *sd, Object *ob, SculptSession *ss, SculptFloodFill *flood, int index, float radius)
void SCULPT_boundary_info_ensure(Object *object)
int SCULPT_active_vertex_get(SculptSession *ss)
int SCULPT_nearest_vertex_get(Sculpt *sd, Object *ob, const float co[3], float max_distance, bool use_original)
bool SCULPT_cursor_geometry_info_update(bContext *C, SculptCursorGeometryInfo *out, const float mouse[2], bool use_sampled_normal)
void SCULPT_floodfill_init(SculptSession *ss, SculptFloodFill *flood)
bool SCULPT_vertex_has_face_set(SculptSession *ss, int index, int face_set)
bool SCULPT_vertex_has_unique_face_set(SculptSession *ss, int index)
bool SCULPT_is_symmetry_iteration_valid(char i, char symm)
void SCULPT_connected_components_ensure(Object *ob)
void SCULPT_vertex_random_access_ensure(SculptSession *ss)
void SCULPT_flush_update_done(const bContext *C, Object *ob, SculptUpdateType update_flags)
bool SCULPT_vertex_visible_get(SculptSession *ss, int index)
void SCULPT_flush_update_step(bContext *C, SculptUpdateType update_flags)
void SCULPT_vertex_normal_get(SculptSession *ss, int index, float no[3])
bool SCULPT_vertex_is_boundary(const SculptSession *ss, const int index)
void SCULPT_floodfill_free(SculptFloodFill *flood)
bool SCULPT_mode_poll(bContext *C)
const float * SCULPT_vertex_color_get(SculptSession *ss, int index)
int SCULPT_vertex_face_set_get(SculptSession *ss, int index)
float SCULPT_vertex_mask_get(SculptSession *ss, int index)
char SCULPT_mesh_symmetry_xyz_get(Object *object)
bool SCULPT_check_vertex_pivot_symmetry(const float vco[3], const float pco[3], const char symm)
int SCULPT_active_face_set_get(SculptSession *ss)
void SCULPT_floodfill_execute(SculptSession *ss, SculptFloodFill *flood, bool(*func)(SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata), void *userdata)
void SCULPT_tag_update_overlays(bContext *C)
void SCULPT_boundary_data_free(SculptBoundary *boundary)
SculptBoundary * SCULPT_boundary_data_init(Object *object, Brush *brush, const int initial_vertex, const float radius)
static void sculpt_expand_cache_data_free(ExpandCache *expand_cache)
#define SCULPT_EXPAND_LOOP_THRESHOLD
static bool mask_expand_normal_floodfill_cb(SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata)
static bool sculpt_expand_is_face_in_active_component(SculptSession *ss, ExpandCache *expand_cache, const int f)
#define SCULPT_EXPAND_TEXTURE_DISTORTION_STEP
static int sculpt_expand_get_vertex_index_for_symmetry_pass(Object *ob, const char symm_it, const int original_vertex)
static void sculpt_expand_vertex_to_faces_falloff(Mesh *mesh, ExpandCache *expand_cache)
static int sculpt_expand_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void sculpt_expand_update_max_vert_falloff_value(SculptSession *ss, ExpandCache *expand_cache)
static float sculpt_expand_gradient_value_get(SculptSession *ss, ExpandCache *expand_cache, const int v)
#define SCULPT_EXPAND_VERTEX_NONE
static void sculpt_expand_update_max_face_falloff_factor(SculptSession *ss, ExpandCache *expand_cache)
static void sculpt_expand_cache_free(SculptSession *ss)
static int sculpt_expand_target_vertex_update_and_get(bContext *C, Object *ob, const float mouse[2])
static void sculpt_expand_cancel(bContext *C, wmOperator *UNUSED(op))
static BLI_bitmap * sculpt_expand_bitmap_from_enabled(SculptSession *ss, ExpandCache *expand_cache)
static void sculpt_expand_face_sets_restore(SculptSession *ss, ExpandCache *expand_cache)
static float * sculpt_expand_geodesic_falloff_create(Sculpt *sd, Object *ob, const int v)
static void sculpt_expand_finish(bContext *C)
static void sculpt_expand_restore_mask_data(SculptSession *ss, ExpandCache *expand_cache)
static void sculpt_expand_grids_to_faces_falloff(SculptSession *ss, Mesh *mesh, ExpandCache *expand_cache)
static void sculpt_expand_undo_push(Object *ob, ExpandCache *expand_cache)
void SCULPT_OT_expand(wmOperatorType *ot)
static bool sculpt_expand_face_state_get(SculptSession *ss, ExpandCache *expand_cache, const int f)
static float * sculpt_expand_normal_falloff_create(Sculpt *sd, Object *ob, const int v, const float edge_sensitivity)
static void sculpt_expand_mesh_face_falloff_from_vertex_falloff(SculptSession *ss, Mesh *mesh, ExpandCache *expand_cache)
static float * sculpt_expand_diagonals_falloff_create(Object *ob, const int v)
struct ExpandFloodFillData ExpandFloodFillData
static void sculpt_expand_restore_color_data(SculptSession *ss, ExpandCache *expand_cache)
static bool sculpt_expand_state_get(SculptSession *ss, ExpandCache *expand_cache, const int v)
static void sculpt_expand_snap_initialize_from_enabled(SculptSession *ss, ExpandCache *expand_cache)
static void sculpt_expand_flush_updates(bContext *C)
static BLI_bitmap * sculpt_expand_boundary_from_enabled(SculptSession *ss, const BLI_bitmap *enabled_vertices, const bool use_mesh_boundary)
static void sculpt_expand_falloff_factors_from_vertex_and_symm_create(ExpandCache *expand_cache, Sculpt *sd, Object *ob, const int v, eSculptExpandFalloffType falloff_type)
static void sculpt_expand_update_for_vertex(bContext *C, Object *ob, const int vertex)
static bool expand_topology_floodfill_cb(SculptSession *UNUSED(ss), int from_v, int to_v, bool is_duplicate, void *userdata)
static void sculpt_expand_restore_face_set_data(SculptSession *ss, ExpandCache *expand_cache)
void sculpt_expand_modal_keymap(wmKeyConfig *keyconf)
static float * sculpt_expand_spherical_falloff_create(Object *ob, const int v)
static void sculpt_expand_reposition_pivot(bContext *C, Object *ob, ExpandCache *expand_cache)
static void sculpt_expand_cache_initial_config_set(bContext *C, wmOperator *op, ExpandCache *expand_cache)
static void sculpt_expand_find_active_connected_components_from_vert(Object *ob, ExpandCache *expand_cache, const int initial_vertex)
static float * sculpt_expand_topology_falloff_create(Sculpt *sd, Object *ob, const int v)
static float sculpt_expand_max_vertex_falloff_get(ExpandCache *expand_cache)
static void sculpt_expand_set_initial_components_for_mouse(bContext *C, Object *ob, ExpandCache *expand_cache, const float mouse[2])
static void sculpt_expand_colors_update_task_cb(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
static void sculpt_expand_original_state_store(Object *ob, ExpandCache *expand_cache)
static float * sculpt_expand_boundary_topology_falloff_create(Object *ob, const int v)
#define EXPAND_ACTIVE_COMPONENT_NONE
static void sculpt_expand_initialize_from_face_set_boundary(Object *ob, ExpandCache *expand_cache, const int active_face_set, const bool internal_falloff)
static int sculpt_expand_active_face_set_id_get(SculptSession *ss, ExpandCache *expand_cache)
static void sculpt_expand_face_sets_update(SculptSession *ss, ExpandCache *expand_cache)
static void sculpt_expand_delete_face_set_id(int *r_face_sets, SculptSession *ss, ExpandCache *expand_cache, Mesh *mesh, const int delete_id)
static int sculpt_expand_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void sculpt_expand_topology_from_state_boundary(Object *ob, ExpandCache *expand_cache, BLI_bitmap *enabled_vertices)
static void sculpt_expand_resursion_step_add(Object *ob, ExpandCache *expand_cache, const eSculptExpandRecursionType recursion_type)
@ SCULPT_EXPAND_MODAL_TEXTURE_DISTORTION_INCREASE
@ SCULPT_EXPAND_MODAL_PRESERVE_TOGGLE
@ SCULPT_EXPAND_MODAL_RECURSION_STEP_TOPOLOGY
@ SCULPT_EXPAND_MODAL_FALLOFF_TOPOLOGY_DIAGONALS
@ SCULPT_EXPAND_MODAL_INVERT
@ SCULPT_EXPAND_MODAL_LOOP_COUNT_DECREASE
@ SCULPT_EXPAND_MODAL_GRADIENT_TOGGLE
@ SCULPT_EXPAND_MODAL_LOOP_COUNT_INCREASE
@ SCULPT_EXPAND_MODAL_MOVE_TOGGLE
@ SCULPT_EXPAND_MODAL_BRUSH_GRADIENT_TOGGLE
@ SCULPT_EXPAND_MODAL_TEXTURE_DISTORTION_DECREASE
@ SCULPT_EXPAND_MODAL_FALLOFF_CYCLE
@ SCULPT_EXPAND_MODAL_FALLOFF_GEODESIC
@ SCULPT_EXPAND_MODAL_CANCEL
@ SCULPT_EXPAND_MODAL_FALLOFF_SPHERICAL
@ SCULPT_EXPAND_MODAL_SNAP_TOGGLE
@ SCULPT_EXPAND_MODAL_FALLOFF_TOPOLOGY
@ SCULPT_EXPAND_MODAL_RECURSION_STEP_GEODESIC
@ SCULPT_EXPAND_MODAL_CONFIRM
static void sculpt_expand_mask_update_task_cb(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
static float sculpt_expand_falloff_value_vertex_get(SculptSession *ss, ExpandCache *expand_cache, const int v)
#define SCULPT_EXPAND_NORMALS_FALLOFF_EDGE_SENSITIVITY
static bool sculpt_expand_is_vert_in_active_component(SculptSession *ss, ExpandCache *expand_cache, const int v)
static void sculpt_expand_restore_original_state(bContext *C, Object *ob, ExpandCache *expand_cache)
static void sculpt_expand_geodesics_from_state_boundary(Object *ob, ExpandCache *expand_cache, BLI_bitmap *enabled_vertices)
static void sculpt_expand_ensure_sculptsession_data(Object *ob)
static void sculpt_expand_move_propagation_origin(bContext *C, Object *ob, const wmEvent *event, ExpandCache *expand_cache)
float * SCULPT_geodesic_from_vertex_and_symm(Sculpt *sd, Object *ob, const int vertex, const float limit_radius)
float * SCULPT_geodesic_distances_create(Object *ob, GSet *initial_vertices, const float limit_radius)
@ SCULPT_EXPAND_FALLOFF_BOUNDARY_FACE_SET
@ SCULPT_EXPAND_FALLOFF_BOUNDARY_TOPOLOGY
@ SCULPT_EXPAND_FALLOFF_NORMALS
@ SCULPT_EXPAND_FALLOFF_SPHERICAL
@ SCULPT_EXPAND_FALLOFF_GEODESIC
@ SCULPT_EXPAND_FALLOFF_TOPOLOGY
@ SCULPT_EXPAND_FALLOFF_TOPOLOGY_DIAGONALS
@ SCULPT_EXPAND_FALLOFF_ACTIVE_FACE_SET
void SCULPT_undo_push_begin(struct Object *ob, const char *name)
#define SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN(ss, v_index, neighbor_iterator)
eSculptExpandRecursionType
@ SCULPT_EXPAND_RECURSION_GEODESICS
@ SCULPT_EXPAND_RECURSION_TOPOLOGY
#define SCULPT_VERTEX_NEIGHBORS_ITER_END(neighbor_iterator)
void SCULPT_undo_push_end(void)
SculptUndoNode * SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type)
#define EXPAND_SYMM_AREAS
@ SCULPT_EXPAND_TARGET_COLORS
@ SCULPT_EXPAND_TARGET_FACE_SETS
@ SCULPT_EXPAND_TARGET_MASK
struct CurveMapping * curve
eSculptExpandFalloffType falloff_type
eSculptExpandFalloffType move_original_falloff_type
int max_geodesic_move_preview
int initial_active_vertex
float texture_distortion_strength
int initial_active_face_set
eSculptExpandTargetType target
GSet * snap_enabled_face_sets
float initial_mouse_move[2]
eSculptExpandFalloffType move_preview_falloff_type
bool modify_active_face_set
float(* original_colors)[4]
int active_connected_components[EXPAND_SYMM_AREAS]
float original_mouse_move[2]
struct SculptSession * sculpt
struct SubdivCCG * subdiv_ccg
struct ImagePool * tex_pool
SculptVertexInfo vertex_info
struct MeshElemMap * pmap
struct ExpandCache * expand_cache
int * connected_component
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
struct ReportList * reports
CCL_NAMESPACE_BEGIN ccl_device float fade(float t)
__forceinline const avxi abs(const avxi &a)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmKeyMap * WM_modalkeymap_find(wmKeyConfig *keyconf, const char *idname)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)