86 #define SCULPT_EXPAND_VERTEX_NONE -1
89 #define EXPAND_ACTIVE_COMPONENT_NONE -1
94 #define SCULPT_EXPAND_TEXTURE_DISTORTION_STEP 0.01f
101 #define SCULPT_EXPAND_LOOP_THRESHOLD 0.00001f
108 #define SCULPT_EXPAND_NORMALS_FALLOFF_EDGE_SENSITIVITY 300
228 if (expand_cache->
snap) {
237 const float loop_len = (max_falloff_factor / expand_cache->
loop_count) +
241 ss, expand_cache,
v);
242 const float active_factor = fmod(expand_cache->
active_falloff, loop_len);
243 const float falloff_factor = fmod(vertex_falloff_factor, loop_len);
245 enabled = falloff_factor < active_factor;
248 if (expand_cache->
invert) {
282 const float active_factor = fmod(expand_cache->
active_falloff, loop_len);
283 const float falloff_factor = fmod(expand_cache->
face_falloff[f], loop_len);
284 enabled = falloff_factor < active_factor;
293 if (expand_cache->
invert) {
313 const float loop_len = (max_falloff_factor / expand_cache->
loop_count) +
317 const float active_factor = fmod(expand_cache->
active_falloff, loop_len);
318 const float falloff_factor = fmod(vertex_falloff_factor, loop_len);
320 float linear_falloff;
322 if (expand_cache->
invert) {
325 BLI_assert((loop_len - active_factor) != 0.0f);
326 linear_falloff = (falloff_factor - active_factor) / (loop_len - active_factor);
329 linear_falloff = 1.0f - (falloff_factor / active_factor);
333 return linear_falloff;
349 for (
int i = 0; i < totvert; i++) {
353 return enabled_vertices;
363 const bool use_mesh_boundary)
367 for (
int i = 0; i < totvert; i++) {
372 bool is_expand_boundary =
false;
376 is_expand_boundary =
true;
382 is_expand_boundary =
true;
388 return boundary_vertices;
399 const int original_vertex)
404 symm_vertex = original_vertex;
439 const float to_it =
data->dists[from_v] + 1.0f;
440 data->dists[to_v] = to_it;
443 data->dists[to_v] =
data->dists[from_v];
473 SculptSession *ss,
int from_v,
int to_v,
bool is_duplicate,
void *userdata)
477 float current_normal[3], prev_normal[3];
480 const float from_edge_factor =
data->edge_factor[from_v];
481 data->edge_factor[to_v] =
dot_v3v3(current_normal, prev_normal) * from_edge_factor;
483 powf(from_edge_factor,
data->edge_sensitivity);
488 data->edge_factor[to_v] =
data->edge_factor[from_v];
489 data->dists[to_v] =
data->dists[from_v];
498 const float edge_sensitivity)
503 float *edge_factor =
MEM_callocN(
sizeof(
float) * totvert,
"mask edge factor");
504 for (
int i = 0; i < totvert; i++) {
505 edge_factor[i] = 1.0f;
521 for (
int repeat = 0; repeat < 2; repeat++) {
522 for (
int i = 0; i < totvert; i++) {
526 avg += dists[ni.
index];
529 dists[i] = avg / ni.
size;
548 for (
int i = 0; i < totvert; i++) {
553 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
558 if (symm_vertex != -1) {
560 for (
int i = 0; i < totvert; i++) {
584 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
618 dists[ni.
index] = dists[v_next] + 1.0f;
652 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
672 for (
int j = 0; j < ss->
pmap[v_next].
count; j++) {
679 dists[neighbor_v] = dists[v_next] + 1.0f;
703 for (
int i = 0; i < totvert; i++) {
726 for (
int i = 0; i < totface; i++) {
790 mesh->
totpoly,
sizeof(
float),
"face falloff factors");
821 for (
int i = 0; i < totvert; i++) {
855 for (
int i = 0; i < totvert; i++) {
890 switch (recursion_type) {
916 const int active_face_set,
917 const bool internal_falloff)
923 for (
int i = 0; i < totvert; i++) {
942 if (internal_falloff) {
943 for (
int i = 0; i < totvert; i++) {
951 float min_factor = FLT_MAX;
952 for (
int i = 0; i < totvert; i++) {
956 const float additional_falloff =
fabsf(min_factor);
957 for (
int i = 0; i < totvert; i++) {
962 for (
int i = 0; i < totvert; i++) {
988 switch (falloff_type) {
1044 const bool prev_snap_state = expand_cache->
snap;
1045 const bool prev_invert_state = expand_cache->
invert;
1046 expand_cache->
snap =
false;
1047 expand_cache->
invert =
false;
1052 for (
int i = 0; i < totface; i++) {
1057 for (
int p = 0; p < totface; p++) {
1059 bool any_disabled =
false;
1063 any_disabled =
true;
1074 expand_cache->
snap = prev_snap_state;
1075 expand_cache->
invert = prev_invert_state;
1112 for (
int n = 0; n < totnode; n++) {
1117 for (
int i = 0; i < ss->
totfaces; i++) {
1127 for (
int n = 0; n < totnode; n++) {
1144 for (
int n = 0; n < totnode; n++) {
1164 switch (expand_cache->
target) {
1213 bool any_changed =
false;
1217 const float initial_mask = *vd.
mask;
1233 if (new_mask == initial_mask) {
1252 for (
int f = 0; f < totface; f++) {
1265 for (
int i = 0; i < expand_cache->
totnode; i++) {
1282 bool any_changed =
false;
1286 float initial_color[4];
1302 float final_color[4];
1303 float final_fill_color[4];
1353 for (
int i = 0; i < totface; i++) {
1360 for (
int i = 0; i < totvert; i++) {
1367 for (
int i = 0; i < totvert; i++) {
1379 for (
int i = 0; i < totfaces; i++) {
1420 .nodes = expand_cache->
nodes,
1426 switch (expand_cache->
target) {
1467 const bool initial_invert_state = expand_cache->
invert;
1468 expand_cache->
invert =
false;
1474 const float use_mesh_boundary = expand_cache->
falloff_type !=
1478 ss, enabled_vertices, use_mesh_boundary);
1482 expand_cache->
invert = initial_invert_state;
1485 float avg[3] = {0.0f};
1489 for (
int i = 0; i < totvert; i++) {
1528 for (
int n = 0; n < totnode; n++) {
1555 const int initial_vertex)
1563 for (
char symm_it = 0; symm_it <= symm; symm_it++) {
1569 ob, symm_it, initial_vertex);
1583 const float mval[2])
1698 switch (event->
val) {
1723 if (expand_cache->
snap) {
1724 expand_cache->
snap =
false;
1731 expand_cache->
snap =
true;
1739 if (expand_cache->
move) {
1740 expand_cache->
move =
false;
1749 expand_cache->
move =
true;
1832 "Active brush does not contain any texture to distort the expand boundary");
1838 "Texture mapping not set to 3D, results may be unpredictable");
1854 if (expand_cache->
move) {
1859 if (expand_cache->
snap) {
1881 const int delete_id)
1888 bool all_same_id =
true;
1889 for (
int i = 0; i < totface; i++) {
1893 if (r_face_sets[i] != delete_id) {
1894 all_same_id =
false;
1908 for (
int i = 0; i < totface; i++) {
1909 if (r_face_sets[i] == delete_id) {
1915 bool any_updated =
false;
1918 int other_id = delete_id;
1923 for (
int i = 0; i < vert_map->
count; i++) {
1925 const int neighbor_face_index = vert_map->
indices[i];
1930 if (r_face_sets[neighbor_face_index] != delete_id) {
1931 other_id = r_face_sets[neighbor_face_index];
1936 if (other_id != delete_id) {
1938 r_face_sets[f_index] = other_id;
1959 for (
int i = 0; i < totface; i++) {
1961 r_face_sets[i] =
abs(r_face_sets[i]);
1964 r_face_sets[i] = -
abs(r_face_sets[i]);
2012 switch (expand_cache->
target) {
2014 for (
int i = 0; i < totnode; i++) {
2022 for (
int i = 0; i < totnode; i++) {
2075 const float mouse[2] = {
event->mval[0],
event->mval[1]};
2120 "RECURSION_STEP_GEODESIC",
2122 "Geodesic recursion step",
2125 "RECURSION_STEP_TOPOLOGY",
2127 "Topology recursion Step",
2133 "FALLOFF_TOPOLOGY_DIAGONALS",
2135 "Diagonals Falloff",
2140 "LOOP_COUNT_INCREASE",
2142 "Loop Count Increase",
2145 "LOOP_COUNT_DECREASE",
2147 "Loop Count Decrease",
2150 "BRUSH_GRADIENT_TOGGLE",
2152 "Toggle Brush Gradient",
2155 "TEXTURE_DISTORTION_INCREASE",
2157 "Texture Distortion Increase",
2160 "TEXTURE_DISTORTION_DECREASE",
2162 "Texture Distortion Decrease",
2167 static const char *name =
"Sculpt Expand Modal";
2198 "TOPOLOGY_DIAGONALS",
2200 "Topology Diagonals",
2219 prop_sculpt_expand_target_type_items,
2222 "Data that is going to be modified in the expand operation");
2226 prop_sculpt_expand_falloff_type_items,
2229 "Initial falloff of the expand operation");
2232 ot->
srna,
"invert",
false,
"Invert",
"Invert the expand active elements");
2234 "use_mask_preserve",
2236 "Preserve Previous",
2237 "Preserve the previous state of the target data");
2239 "use_falloff_gradient",
2242 "Expand Using a linear falloff");
2245 "use_modify_active",
2248 "Modify the active Face Set instead of creating a new one");
2252 "use_reposition_pivot",
2255 "Reposition the sculpt transform pivot to the boundary of the expand active area");
2258 "max_geodesic_move_preview",
2262 "Max Vertex Count for Geodesic Move Preview",
2263 "Maximum number of vertices in the mesh for using geodesic falloff when "
2264 "moving the origin of expand. If the total number of vertices is greater "
2265 "than this value, the falloff will be set to spherical when moving",
float BKE_brush_curve_strength(const struct Brush *br, float p, float len)
float BKE_brush_sample_tex_3d(const struct Scene *scene, const struct Brush *br, const float point[3], float rgba[4], int thread, struct ImagePool *pool)
const float * BKE_brush_color_get(const struct Scene *scene, const struct Brush *brush)
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 is_paint_tool)
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, eReportType type, const char *message)
int BKE_subdiv_ccg_grid_to_face_index(const SubdivCCG *subdiv_ccg, int grid_index)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
#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(const 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)
GSQueue * BLI_gsqueue_new(size_t elem_size)
void BLI_gsqueue_push(GSQueue *queue, const void *item)
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 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 mul_v4_v4fl(float r[4], const float a[4], float f)
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(int start, 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)
BLI_INLINE void IMB_colormanagement_srgb_to_scene_linear_v3(float scene_linear[3], const float srgb[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 Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position 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)
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
CCL_NAMESPACE_BEGIN ccl_device float fade(float t)
BLI_INLINE void flip_v3_v3(float out[3], const float in[3], const 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)
bool SCULPT_cursor_geometry_info_update(bContext *C, SculptCursorGeometryInfo *out, const float mval[2], bool use_sampled_normal)
int SCULPT_nearest_vertex_get(Sculpt *sd, Object *ob, const float co[3], float max_distance, bool use_original)
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_vertex_color_set(SculptSession *ss, int index, const float color[4])
void SCULPT_flush_update_step(bContext *C, SculptUpdateType update_flags)
void SCULPT_vertex_color_get(const SculptSession *ss, int index, float r_color[4])
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)
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 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)
@ 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_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_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)
static int sculpt_expand_target_vertex_update_and_get(bContext *C, Object *ob, const float mval[2])
#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)
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)
static void sculpt_expand_set_initial_components_for_mouse(bContext *C, Object *ob, ExpandCache *expand_cache, const float mval[2])
#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)
void SCULPT_undo_push_end(struct Object *ob)
#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)
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
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)