64 "Set mask to the level specified by the 'value' property"},
69 "Set mask to the level specified by the inverted 'value' property"},
80 (*elem) = 1.0f - value;
83 (*elem) = 1.0f - (*elem);
111 const float value =
data->value;
119 float prevmask = *vi.
mask;
121 if (prevmask != *vi.
mask) {
129 if (
data->multires) {
161 .multires = multires,
190 ot->
name =
"Mask Flood Fill";
191 ot->
idname =
"PAINT_OT_mask_flood_fill";
192 ot->
description =
"Fill the whole mask with a given value, or invert its values";
209 "Mask level to use when mode is 'Value'; zero means no masking and one is fully masked",
311 "use_front_faces_only",
314 "Affect only faces facing towards the view");
317 "use_limit_to_segment",
320 "Apply the gesture action only to the area that is contained within the "
321 "segment without extending its effect to the entire line");
344 float view_dir[3] = {0.0f, 0.0f, 1.0f};
361 int index = (
y * lasso->
width) +
x;
362 int index_end = (
y * lasso->
width) + x_end;
365 }
while (++index != index_end);
371 "sculpt gesture context lasso");
409 for (
int i = 0; i < mcoords_len; i++) {
422 "sculpt gesture context box");
464 float plane_point_object_space[3];
472 float line_points[2][2],
473 float r_plane_points[4][3],
474 float r_offset_plane_points[2][3])
476 float depth_point[3];
479 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[0], r_plane_points[0]);
481 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[1], r_plane_points[3]);
485 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[0], r_plane_points[1]);
487 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[1], r_plane_points[2]);
498 "sculpt gesture context line");
503 float line_points[2][2];
511 float plane_points[4][3];
512 float offset_plane_points[2][3];
514 sgcontext, line_points, plane_points, offset_plane_points);
531 offset_plane_points[0]);
537 offset_plane_points[1]);
579 for (
int j = 0; j < 4; j++) {
595 float clip_planes[3][4];
612 float clip_planes[4][4];
648 scr_co_s[0] = scr_co_f[0];
649 scr_co_s[1] = scr_co_f[1];
665 float vertex_normal[3];
670 if (!is_effected_front_face) {
742 bool any_updated =
false;
815 bool any_masked =
false;
820 float prevmask = *vd.
mask;
831 if (prevmask != *vd.
mask) {
885 "Mask level to use when mode is 'Value'; zero means no masking and one is fully masked",
906 "Use a difference boolean operation"},
912 "Join the new mesh as separate geometry, without performing any boolean operation"},
925 "Use the view to orientate the trimming shape"},
930 "Use the surface normal to orientate the trimming shape"},
952 Mesh *trim_mesh = trim_operation->
mesh;
958 .use_toolflags =
true,
964 .calc_face_normal =
true,
965 .calc_vert_normal =
true,
970 "recalc_face_normals faces=%hf",
975 .calc_object_remap =
false,
1018 float shape_plane[4];
1019 float shape_origin[3];
1020 float shape_normal[3];
1027 for (
int i = 0; i < totvert; i++) {
1032 float world_space_vco[3];
1033 mul_v3_m4v3(world_space_vco, vc->obact->obmat, vco);
1040 float world_space_gesture_initial_location[3];
1042 world_space_gesture_initial_location, vc->obact->obmat, ss->gesture_initial_location);
1044 float mid_point_depth;
1046 mid_point_depth = ss->gesture_initial_hit ?
1055 mid_point_depth = ss->gesture_initial_hit ?
1062 if (ss->gesture_initial_hit) {
1063 depth_radius = ss->cursor_radius;
1084 trim_operation->
depth_front = mid_point_depth - depth_radius;
1085 trim_operation->
depth_back = mid_point_depth + depth_radius;
1098 const int trim_totverts = tot_screen_points * 2;
1099 const int trim_totpolys = (2 * (tot_screen_points - 2)) + (2 * tot_screen_points);
1101 trim_totverts, 0, 0, trim_totpolys * 3, trim_totpolys);
1105 float depth_back = trim_operation->
depth_back;
1111 depth_front -= 0.1f;
1115 float shape_origin[3];
1116 float shape_normal[3];
1117 float shape_plane[4];
1121 const float(*ob_imat)[4] = vc->obact->imat;
1124 float depth_point[3];
1125 madd_v3_v3v3fl(depth_point, shape_origin, shape_normal, depth_front);
1126 for (
int i = 0; i < tot_screen_points; i++) {
1140 madd_v3_v3v3fl(depth_point, shape_origin, shape_normal, depth_back);
1141 for (
int i = 0; i < tot_screen_points; i++) {
1155 const int tot_tris_face = tot_screen_points - 2;
1162 for (
int i = 0; i < tot_tris_face; i++, mp++, ml += 3) {
1165 ml[0].
v = r_tris[i][0];
1166 ml[1].
v = r_tris[i][1];
1167 ml[2].
v = r_tris[i][2];
1171 for (
int i = 0; i < tot_tris_face; i++, mp++, ml += 3) {
1174 ml[0].
v = r_tris[i][0] + tot_screen_points;
1175 ml[1].
v = r_tris[i][1] + tot_screen_points;
1176 ml[2].
v = r_tris[i][2] + tot_screen_points;
1182 for (
int i = 0; i < tot_screen_points; i++, mp++, ml += 3) {
1185 int current_index = i;
1186 int next_index = current_index + 1;
1187 if (next_index >= tot_screen_points) {
1190 ml[0].
v = next_index + tot_screen_points;
1191 ml[1].
v = next_index;
1192 ml[2].
v = current_index;
1195 for (
int i = 0; i < tot_screen_points; i++, mp++, ml += 3) {
1198 int current_index = i;
1199 int next_index = current_index + 1;
1200 if (next_index >= tot_screen_points) {
1203 ml[0].
v = current_index;
1204 ml[1].
v = current_index + tot_screen_points;
1205 ml[2].
v = next_index + tot_screen_points;
1228 Mesh *trim_mesh = trim_operation->
mesh;
1234 .use_toolflags =
false,
1240 .calc_face_normal =
true,
1241 .calc_vert_normal =
true,
1247 .calc_face_normal =
true,
1248 .calc_vert_normal =
true,
1258 const int i_faces_end = trim_mesh->
totpoly;
1263 const short ob_src_totcol = trim_mesh->
totcol;
1264 short *material_remap =
BLI_array_alloca(material_remap, ob_src_totcol ? ob_src_totcol : 1);
1275 if (efa->
mat_nr < ob_src_totcol) {
1279 if (++i == i_faces_end) {
1286 int boolean_mode = 0;
1287 switch (trim_operation->
mode) {
1309 .calc_object_remap =
false,
1330 Mesh *trim_mesh = trim_operation->
mesh;
1331 for (
int i = 0; i < trim_mesh->totvert; i++) {
1389 "Use Cursor for Depth",
1390 "Use cursor location and radius for the dimensions and position of the trimming shape");
1395 "Shape Orientation",
1419 bool any_updated =
false;
1428 float projected_pos[3];
1653 ot->
name =
"Mask Lasso Gesture";
1654 ot->
idname =
"PAINT_OT_mask_lasso_gesture";
1655 ot->
description =
"Add mask within the lasso as you move the brush";
1674 ot->
name =
"Mask Box Gesture";
1675 ot->
idname =
"PAINT_OT_mask_box_gesture";
1676 ot->
description =
"Add mask within the box as you move the brush";
1695 ot->
name =
"Mask Line Gesture";
1696 ot->
idname =
"PAINT_OT_mask_line_gesture";
1697 ot->
description =
"Add mask to the right of a line as you move the brush";
1716 ot->
name =
"Face Set Lasso Gesture";
1717 ot->
idname =
"SCULPT_OT_face_set_lasso_gesture";
1718 ot->
description =
"Add face set within the lasso as you move the brush";
1735 ot->
name =
"Face Set Box Gesture";
1736 ot->
idname =
"SCULPT_OT_face_set_box_gesture";
1737 ot->
description =
"Add face set within the box as you move the brush";
1754 ot->
name =
"Trim Lasso Gesture";
1755 ot->
idname =
"SCULPT_OT_trim_lasso_gesture";
1756 ot->
description =
"Trims the mesh within the lasso as you move the brush";
1775 ot->
name =
"Trim Box Gesture";
1776 ot->
idname =
"SCULPT_OT_trim_box_gesture";
1777 ot->
description =
"Trims the mesh within the box as you move the brush";
1796 ot->
name =
"Project Line Gesture";
1797 ot->
idname =
"SCULPT_OT_project_line_gesture";
1798 ot->
description =
"Project the geometry onto a plane defined by a line";
typedef float(TangentPoint)[2]
int BKE_brush_size_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_unprojected_radius_get(const struct Scene *scene, const struct Brush *brush)
bool BKE_brush_use_locked_size(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)
void * CustomData_get_layer(const struct CustomData *data, int type)
const CustomData_MeshMasks CD_MASK_MESH
void BKE_id_free(struct Main *bmain, void *idv)
struct Mesh * BKE_mesh_from_object(struct Object *ob)
void BKE_mesh_nomain_to_mesh(struct Mesh *mesh_src, struct Mesh *mesh_dst, struct Object *ob, const struct CustomData_MeshMasks *mask, bool take_ownership)
struct Mesh * BKE_mesh_from_bmesh_nomain(struct BMesh *bm, const struct BMeshToMeshParams *params, const struct Mesh *me_settings)
struct Mesh * BKE_mesh_new_nomain(int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len)
void BKE_mesh_batch_cache_dirty_tag(struct Mesh *me, eMeshBatchDirtyMode mode)
void BKE_mesh_calc_edges(struct Mesh *mesh, bool keep_existing_edges, bool select_new_edges)
@ BKE_MESH_BATCH_DIRTY_ALL
void multires_mark_as_modified(struct Depsgraph *depsgraph, struct Object *object, enum MultiresModifiedFlags flags)
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)
A BVH for high poly meshes.
void BKE_pbvh_node_mark_update(PBVHNode *node)
#define BKE_pbvh_vertex_iter_begin(pbvh, node, vi, mode)
void BKE_pbvh_node_mark_update_visibility(PBVHNode *node)
bool BKE_pbvh_node_frustum_contain_AABB(PBVHNode *node, void *frustum)
PBVHType BKE_pbvh_type(const PBVH *pbvh)
void BKE_pbvh_node_mark_normals_update(PBVHNode *node)
#define BKE_pbvh_vertex_iter_end
void BKE_pbvh_vert_tag_update_normal(PBVH *pbvh, int index)
void BKE_pbvh_parallel_range_settings(struct TaskParallelSettings *settings, bool use_threading, int totnode)
void BKE_pbvh_update_vertex_data(PBVH *pbvh, int flags)
void BKE_pbvh_node_mark_update_mask(PBVHNode *node)
void BKE_pbvh_search_gather(PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, PBVHNode ***array, int *tot)
@ MULTIRES_COORDS_MODIFIED
#define BLI_array_alloca(arr, realsize)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
#define BLI_BITMAP_TEST_BOOL(_bitmap, _index)
void BLI_bitmap_draw_2d_poly_v2i_n(int xmin, int ymin, int xmax, int ymax, const int verts[][2], int verts_len, void(*callback)(int x, int x_end, int y, void *), void *user_data)
void BLI_lasso_boundbox(struct rcti *rect, const int mcoords[][2], unsigned int mcoords_len)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
MINLINE float plane_point_side_v3(const float plane[4], const float co[3])
float dist_signed_to_plane_v3(const float p[3], const float plane[4])
MINLINE int poly_to_tri_count(int poly_count, int corner_count)
void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[3])
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
bool isect_point_planes_v3(float(*planes)[4], int totplane, const float p[3])
void mul_m3_v3(const float M[3][3], float r[3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void mul_mat3_m4_v3(const float M[4][4], float r[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void negate_m4(float R[4][4])
void mul_v3_mat3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE void add_v3_v3(float r[3], const float a[3])
void BLI_polyfill_calc(const float(*coords)[2], unsigned int coords_num, int coords_sign, unsigned int(*r_tris)[3])
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
@ eBooleanModifierOp_Intersect
@ eBooleanModifierOp_Union
@ eBooleanModifierOp_Difference
Object is a sort of wrapper for general info.
int ED_sculpt_face_sets_find_next_available_id(struct Mesh *mesh)
void ED_sculpt_face_sets_initialize_none_to_id(struct Mesh *mesh, int new_id)
bool ED_view3d_win_to_3d_on_plane(const struct ARegion *region, const float plane[4], const float mval[2], bool do_clip, float r_out[3])
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, const struct Object *ob, float r_pmat[4][4])
void ED_view3d_project_float_v2_m4(const struct ARegion *region, const float co[3], float r_co[2], const float mat[4][4])
void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], const struct ARegion *region, const struct Object *ob, const struct rcti *rect)
void ED_view3d_win_to_3d(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
@ OPTYPE_DEPENDS_ON_CURSOR
bool BM_mesh_boolean(BMesh *UNUSED(bm), struct BMLoop *(*looptris)[3], const int UNUSED(looptris_tot), int(*test_fn)(BMFace *, void *), void *UNUSED(user_data), const int UNUSED(nshapes), const bool UNUSED(use_self), const bool UNUSED(keep_hidden), const bool UNUSED(hole_tolerant), const int UNUSED(boolean_mode))
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_elem_hflag_enable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
BMesh * BM_mesh_create(const BMAllocTemplate *allocsize, const struct BMeshCreateParams *params)
#define BMALLOC_TEMPLATE_FROM_ME(...)
void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshParams *params)
void BM_mesh_calc_tessellation_beauty(BMesh *bm, BMLoop *(*looptris)[3])
bool BMO_op_callf(BMesh *bm, int flag, const char *fmt,...)
#define BMO_FLAG_DEFAULTS
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
IconTextureDrawCall normal
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)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
@ PAINT_MASK_FLOOD_VALUE_INVERSE
float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius)
BLI_INLINE void flip_v3_v3(float out[3], const float in[3], const ePaintSymmetryFlags symm)
static void sculpt_gesture_project_begin(bContext *C, SculptGestureContext *sgcontext)
static void sculpt_gesture_trim_begin(bContext *C, SculptGestureContext *sgcontext)
static int sculpt_trim_gesture_box_exec(bContext *C, wmOperator *op)
static void flip_plane(float out[4], const float in[4], const char symm)
static void sculpt_gesture_mask_apply_for_symmetry_pass(bContext *UNUSED(C), SculptGestureContext *sgcontext)
@ SCULPT_GESTURE_TRIM_UNION
@ SCULPT_GESTURE_TRIM_DIFFERENCE
@ SCULPT_GESTURE_TRIM_INTERSECT
@ SCULPT_GESTURE_TRIM_JOIN
static void sculpt_gesture_trim_geometry_generate(SculptGestureContext *sgcontext)
static void mask_flood_fill_set_elem(float *elem, PaintMaskFloodMode mode, float value)
void SCULPT_OT_trim_box_gesture(wmOperatorType *ot)
struct SculptGestureContext SculptGestureContext
static void mask_gesture_apply_task_cb(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
static void sculpt_gesture_trim_end(bContext *UNUSED(C), SculptGestureContext *sgcontext)
static int face_set_gesture_lasso_exec(bContext *C, wmOperator *op)
static int project_gesture_line_exec(bContext *C, wmOperator *op)
static bool sculpt_gesture_is_effected_lasso(SculptGestureContext *sgcontext, const float co[3])
void SCULPT_OT_face_set_box_gesture(wmOperatorType *ot)
static const EnumPropertyItem mode_items[]
static SculptGestureContext * sculpt_gesture_init_from_line(bContext *C, wmOperator *op)
void SCULPT_OT_project_line_gesture(wmOperatorType *ot)
struct SculptGestureProjectOperation SculptGestureProjectOperation
static void sculpt_trim_gesture_operator_properties(wmOperatorType *ot)
static void sculpt_gesture_init_mask_properties(SculptGestureContext *sgcontext, wmOperator *op)
static void sculpt_gesture_context_init_common(bContext *C, wmOperator *op, SculptGestureContext *sgcontext)
static void sculpt_gesture_context_free(SculptGestureContext *sgcontext)
static void sculpt_gesture_line_plane_from_tri(float *r_plane, SculptGestureContext *sgcontext, const bool flip, const float p1[3], const float p2[3], const float p3[3])
static void sculpt_gesture_face_set_apply_for_symmetry_pass(bContext *UNUSED(C), SculptGestureContext *sgcontext)
enum eSculptGestureShapeType eMaskGesturesShapeType
static int mask_flood_fill_exec(bContext *C, wmOperator *op)
struct SculptGestureOperation SculptGestureOperation
static void sculpt_gesture_project_end(bContext *C, SculptGestureContext *sgcontext)
static void mask_flood_fill_task_cb(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
static void sculpt_gesture_trim_apply_for_symmetry_pass(bContext *UNUSED(C), SculptGestureContext *sgcontext)
void SCULPT_OT_trim_lasso_gesture(wmOperatorType *ot)
static void paint_mask_gesture_operator_properties(wmOperatorType *ot)
void PAINT_OT_mask_flood_fill(struct wmOperatorType *ot)
static bool sculpt_gesture_is_vertex_effected(SculptGestureContext *sgcontext, PBVHVertexIter *vd)
static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op)
static void sculpt_gesture_update_effected_nodes_by_line_plane(SculptGestureContext *sgcontext)
static EnumPropertyItem prop_trim_orientation_types[]
void SCULPT_OT_face_set_lasso_gesture(wmOperatorType *ot)
static int paint_mask_gesture_box_exec(bContext *C, wmOperator *op)
static int sculpt_trim_gesture_lasso_exec(bContext *C, wmOperator *op)
static void project_line_gesture_apply_task_cb(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
static void sculpt_gesture_apply(bContext *C, SculptGestureContext *sgcontext)
static int face_set_gesture_box_exec(bContext *C, wmOperator *op)
static void sculpt_gesture_trim_shape_origin_normal_get(SculptGestureContext *sgcontext, float *r_origin, float *r_normal)
static void sculpt_gesture_init_face_set_properties(SculptGestureContext *sgcontext, wmOperator *UNUSED(op))
struct SculptGestureFaceSetOperation SculptGestureFaceSetOperation
static void sculpt_gesture_face_set_begin(bContext *C, SculptGestureContext *sgcontext)
static void sculpt_gesture_apply_trim(SculptGestureContext *sgcontext)
eSculptTrimOrientationType
@ SCULPT_GESTURE_TRIM_ORIENTATION_SURFACE
@ SCULPT_GESTURE_TRIM_ORIENTATION_VIEW
static void sculpt_gesture_trim_geometry_free(SculptGestureContext *sgcontext)
@ SCULPT_GESTURE_SHAPE_LINE
@ SCULPT_GESTURE_SHAPE_LASSO
@ SCULPT_GESTURE_SHAPE_BOX
static int paint_mask_gesture_line_exec(bContext *C, wmOperator *op)
static void sculpt_gesture_mask_begin(bContext *C, SculptGestureContext *sgcontext)
static SculptGestureContext * sculpt_gesture_init_from_box(bContext *C, wmOperator *op)
static void sculpt_gesture_trim_normals_update(SculptGestureContext *sgcontext)
static EnumPropertyItem prop_trim_operation_types[]
static void sculpt_gesture_project_apply_for_symmetry_pass(bContext *UNUSED(C), SculptGestureContext *sgcontext)
static void sculpt_gesture_face_set_end(bContext *UNUSED(C), SculptGestureContext *sgcontext)
struct SculptGestureMaskOperation SculptGestureMaskOperation
void PAINT_OT_mask_line_gesture(wmOperatorType *ot)
static void sculpt_gesture_trim_calculate_depth(SculptGestureContext *sgcontext)
static void sculpt_gesture_flip_for_symmetry_pass(SculptGestureContext *sgcontext, const ePaintSymmetryFlags symmpass)
static SculptGestureContext * sculpt_gesture_init_from_lasso(bContext *C, wmOperator *op)
struct MaskTaskData MaskTaskData
static void sculpt_gesture_init_trim_properties(SculptGestureContext *sgcontext, wmOperator *op)
void PAINT_OT_mask_box_gesture(wmOperatorType *ot)
static int sculpt_trim_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void sculpt_gesture_operator_properties(wmOperatorType *ot)
struct SculptGestureTrimOperation SculptGestureTrimOperation
static void face_set_gesture_apply_task_cb(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
struct LineGestureData LineGestureData
static void sculpt_gesture_init_project_properties(SculptGestureContext *sgcontext, wmOperator *UNUSED(op))
static void sculpt_gesture_mask_end(bContext *C, SculptGestureContext *sgcontext)
static void sculpt_gesture_line_calculate_plane_points(SculptGestureContext *sgcontext, float line_points[2][2], float r_plane_points[4][3], float r_offset_plane_points[2][3])
static int sculpt_trim_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void PAINT_OT_mask_lasso_gesture(wmOperatorType *ot)
static int bm_face_isect_pair(BMFace *f, void *UNUSED(user_data))
static void sculpt_gesture_update_effected_nodes_by_clip_planes(SculptGestureContext *sgcontext)
struct LassoGestureData LassoGestureData
static void sculpt_gesture_update_effected_nodes(SculptGestureContext *sgcontext)
static void sculpt_gesture_lasso_px_cb(int x, int x_end, int y, void *user_data)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_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_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
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)
bool SCULPT_cursor_geometry_info_update(bContext *C, SculptCursorGeometryInfo *out, const float mval[2], bool use_sampled_normal)
void SCULPT_vertex_face_set_set(SculptSession *ss, int index, int face_set)
bool SCULPT_is_symmetry_iteration_valid(char i, char symm)
void SCULPT_vertex_random_access_ensure(SculptSession *ss)
void SCULPT_flush_update_done(const bContext *C, Object *ob, SculptUpdateType update_flags)
void SCULPT_flush_update_step(bContext *C, SculptUpdateType update_flags)
void SCULPT_vertex_normal_get(SculptSession *ss, int index, float no[3])
bool SCULPT_mode_poll_view3d(bContext *C)
bool SCULPT_mode_poll(bContext *C)
char SCULPT_mesh_symmetry_xyz_get(Object *object)
void SCULPT_flush_stroke_deform(Sculpt *sd, Object *ob, bool is_proxy_used)
void SCULPT_tag_update_overlays(bContext *C)
void SCULPT_undo_push_begin(struct Object *ob, const char *name)
void SCULPT_undo_push_end(struct Object *ob)
SculptUndoNode * SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type)
float projviewobjmat[4][4]
float true_side_plane[2][4]
float(* clip_planes_final)[4]
struct SculptSession * sculpt
eMaskGesturesShapeType shape_type
float true_view_normal[3]
float world_space_view_origin[3]
float true_view_origin[3]
float world_space_view_normal[3]
float true_clip_planes[4][4]
float(* gesture_points)[2]
ePaintSymmetryFlags symmpass
struct SculptGestureOperation * operation
SculptGestureOperation op
SculptGestureOperation op
void(* sculpt_gesture_begin)(struct bContext *, SculptGestureContext *)
void(* sculpt_gesture_apply_for_symmetry_pass)(struct bContext *, SculptGestureContext *)
void(* sculpt_gesture_end)(struct bContext *, SculptGestureContext *)
SculptGestureOperation operation
eSculptTrimOperationType mode
SculptGestureOperation op
eSculptTrimOrientationType orientation
struct KeyBlock * shapekey_active
float gesture_initial_location[3]
float gesture_initial_normal[3]
bool deform_modifiers_active
struct RegionView3D * rv3d
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
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
const int(* WM_gesture_lasso_path_to_array(bContext *UNUSED(C), wmOperator *op, int *r_mcoords_len))[2]
int WM_gesture_straightline_oneshot_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_straightline_active_side_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)
void WM_operator_properties_border(wmOperatorType *ot)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)