80 "Set mask to the level specified by the 'value' property"},
85 "Set mask to the level specified by the inverted 'value' property"},
96 (*elem) = 1.0f - value;
99 (*elem) = 1.0f - (*elem);
127 const float value =
data->value;
135 float prevmask = *vi.
mask;
137 if (prevmask != *vi.
mask) {
145 if (
data->multires) {
177 .multires = multires,
206 ot->
name =
"Mask Flood Fill";
207 ot->
idname =
"PAINT_OT_mask_flood_fill";
208 ot->
description =
"Fill the whole mask with a given value, or invert its values";
225 "Mask level to use when mode is 'Value'; zero means no masking and one is fully masked",
327 "use_front_faces_only",
330 "Affect only faces facing towards the view");
333 "use_limit_to_segment",
336 "Apply the gesture action only to the area that is contained within the "
337 "segment without extending its effect to the entire line");
360 float view_dir[3] = {0.0f, 0.0f, 1.0f};
377 int index = (
y * lasso->
width) +
x;
378 int index_end = (
y * lasso->
width) + x_end;
381 }
while (++index != index_end);
387 "sculpt gesture context lasso");
425 for (
int i = 0; i < mcoords_len; i++) {
438 "sculpt gesture context box");
480 float plane_point_object_space[3];
488 float line_points[2][2],
489 float r_plane_points[4][3],
490 float r_offset_plane_points[2][3])
492 float depth_point[3];
495 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[0], r_plane_points[0]);
497 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[1], r_plane_points[3]);
501 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[0], r_plane_points[1]);
503 sgcontext->
vc.
v3d, sgcontext->
vc.
region, depth_point, line_points[1], r_plane_points[2]);
514 "sculpt gesture context line");
519 float line_points[2][2];
527 float plane_points[4][3];
528 float offset_plane_points[2][3];
530 sgcontext, line_points, plane_points, offset_plane_points);
547 offset_plane_points[0]);
553 offset_plane_points[1]);
567 static void flip_plane(
float out[4],
const float in[4],
const char symm)
595 for (
int j = 0; j < 4; j++) {
611 float clip_planes[3][4];
628 float clip_planes[4][4];
664 scr_co_s[0] = scr_co_f[0];
665 scr_co_s[1] = scr_co_f[1];
681 float vertex_normal[3];
686 if (!is_effected_front_face) {
757 bool any_updated =
false;
830 bool any_masked =
false;
835 float prevmask = *vd.
mask;
846 if (prevmask != *vd.
mask) {
900 "Mask level to use when mode is 'Value'; zero means no masking and one is fully masked",
921 "Use a difference boolean operation"},
927 "Join the new mesh as separate geometry, without performing any boolean operation"},
940 "Use the view to orientate the trimming shape"},
945 "Use the surface normal to orientate the trimming shape"},
967 Mesh *trim_mesh = trim_operation->
mesh;
974 .use_toolflags =
true,
980 .calc_face_normal =
true,
985 "recalc_face_normals faces=%hf",
990 .calc_object_remap =
false,
1033 float shape_plane[4];
1034 float shape_origin[3];
1035 float shape_normal[3];
1042 for (
int i = 0; i < totvert; i++) {
1047 float world_space_vco[3];
1048 mul_v3_m4v3(world_space_vco, vc->obact->obmat, vco);
1055 float world_space_gesture_initial_location[3];
1057 world_space_gesture_initial_location, vc->obact->obmat, ss->gesture_initial_location);
1059 float mid_point_depth;
1061 mid_point_depth = ss->gesture_initial_hit ?
1070 mid_point_depth = ss->gesture_initial_hit ?
1075 const float depth_radius = ss->cursor_radius;
1076 trim_operation->
depth_front = mid_point_depth - depth_radius;
1077 trim_operation->
depth_back = mid_point_depth + depth_radius;
1090 const int trim_totverts = tot_screen_points * 2;
1091 const int trim_totpolys = (2 * (tot_screen_points - 2)) + (2 * tot_screen_points);
1093 trim_totverts, 0, 0, trim_totpolys * 3, trim_totpolys);
1097 float depth_back = trim_operation->
depth_back;
1103 depth_front -= 0.1f;
1107 float shape_origin[3];
1108 float shape_normal[3];
1109 float shape_plane[4];
1113 const float(*ob_imat)[4] = vc->obact->imat;
1116 float depth_point[3];
1117 madd_v3_v3v3fl(depth_point, shape_origin, shape_normal, depth_front);
1118 for (
int i = 0; i < tot_screen_points; i++) {
1132 madd_v3_v3v3fl(depth_point, shape_origin, shape_normal, depth_back);
1133 for (
int i = 0; i < tot_screen_points; i++) {
1147 const int tot_tris_face = tot_screen_points - 2;
1154 for (
int i = 0; i < tot_tris_face; i++, mp++, ml += 3) {
1157 ml[0].
v = r_tris[i][0];
1158 ml[1].
v = r_tris[i][1];
1159 ml[2].
v = r_tris[i][2];
1163 for (
int i = 0; i < tot_tris_face; i++, mp++, ml += 3) {
1166 ml[0].
v = r_tris[i][0] + tot_screen_points;
1167 ml[1].
v = r_tris[i][1] + tot_screen_points;
1168 ml[2].
v = r_tris[i][2] + tot_screen_points;
1174 for (
int i = 0; i < tot_screen_points; i++, mp++, ml += 3) {
1177 int current_index = i;
1178 int next_index = current_index + 1;
1179 if (next_index >= tot_screen_points) {
1182 ml[0].
v = next_index + tot_screen_points;
1183 ml[1].
v = next_index;
1184 ml[2].
v = current_index;
1187 for (
int i = 0; i < tot_screen_points; i++, mp++, ml += 3) {
1190 int current_index = i;
1191 int next_index = current_index + 1;
1192 if (next_index >= tot_screen_points) {
1195 ml[0].
v = current_index;
1196 ml[1].
v = current_index + tot_screen_points;
1197 ml[2].
v = next_index + tot_screen_points;
1220 Mesh *trim_mesh = trim_operation->
mesh;
1226 .use_toolflags =
false,
1232 .calc_face_normal =
true,
1238 .calc_face_normal =
true,
1249 const int i_faces_end = trim_mesh->
totpoly;
1254 const short ob_src_totcol = trim_mesh->
totcol;
1255 short *material_remap =
BLI_array_alloca(material_remap, ob_src_totcol ? ob_src_totcol : 1);
1266 if (efa->
mat_nr < ob_src_totcol) {
1270 if (++i == i_faces_end) {
1277 int boolean_mode = 0;
1278 switch (trim_operation->
mode) {
1300 .calc_object_remap =
false,
1322 Mesh *trim_mesh = trim_operation->
mesh;
1323 for (
int i = 0; i < trim_mesh->totvert; i++) {
1381 "Use Cursor for Depth",
1382 "Use cursor location and radius for the dimensions and position of the trimming shape");
1387 "Shape Orientation",
1411 bool any_updated =
false;
1420 float projected_pos[3];
1579 float mouse[2] = {
event->mval[0],
event->mval[1]};
1620 float mouse[2] = {
event->mval[0],
event->mval[1]};
1645 ot->
name =
"Mask Lasso Gesture";
1646 ot->
idname =
"PAINT_OT_mask_lasso_gesture";
1647 ot->
description =
"Add mask within the lasso as you move the brush";
1666 ot->
name =
"Mask Box Gesture";
1667 ot->
idname =
"PAINT_OT_mask_box_gesture";
1668 ot->
description =
"Add mask within the box as you move the brush";
1687 ot->
name =
"Mask Line Gesture";
1688 ot->
idname =
"PAINT_OT_mask_line_gesture";
1689 ot->
description =
"Add mask to the right of a line as you move the brush";
1708 ot->
name =
"Face Set Lasso Gesture";
1709 ot->
idname =
"SCULPT_OT_face_set_lasso_gesture";
1710 ot->
description =
"Add face set within the lasso as you move the brush";
1725 ot->
name =
"Face Set Box Gesture";
1726 ot->
idname =
"SCULPT_OT_face_set_box_gesture";
1727 ot->
description =
"Add face set within the box as you move the brush";
1744 ot->
name =
"Trim Lasso Gesture";
1745 ot->
idname =
"SCULPT_OT_trim_lasso_gesture";
1746 ot->
description =
"Trims the mesh within the lasso as you move the brush";
1765 ot->
name =
"Trim Box Gesture";
1766 ot->
idname =
"SCULPT_OT_trim_box_gesture";
1767 ot->
description =
"Trims the mesh within the box as you move the brush";
1786 ot->
name =
"Project Line Gesture";
1787 ot->
idname =
"SCULPT_OT_project_line_gesture";
1788 ot->
description =
"Project the geometry onto a plane defined by a line";
typedef float(TangentPoint)[2]
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_calc_normals(struct Mesh *me)
void BKE_mesh_batch_cache_dirty_tag(struct Mesh *me, eMeshBatchDirtyMode mode)
void BKE_mesh_calc_edges(struct Mesh *mesh, bool keep_existing_edges, const 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 need_colors)
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_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_ENABLE(_bitmap, _index)
#define BLI_BITMAP_TEST_BOOL(_bitmap, _index)
#define BLI_BITMAP_NEW(_tot, _alloc_string)
void BLI_bitmap_draw_2d_poly_v2i_n(const int xmin, const int ymin, const int xmax, const int ymax, const int verts[][2], const 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], const 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 int poly_to_tri_count(const int poly_count, const int corner_count)
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])
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], const unsigned int coords_tot, const int coords_sign, unsigned int(*r_tris)[3])
bool BLI_rcti_isect_pt(const struct rcti *rect, const int x, const int y)
void BLI_task_parallel_range(const int start, const 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, const int new_id)
bool ED_view3d_win_to_3d_on_plane(const struct ARegion *region, const float plane[4], const float mval[2], const bool do_clip, float r_out[3])
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, struct Object *ob, float r_pmat[4][4])
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
void ED_view3d_project_float_v2_m4(const struct ARegion *region, const float co[3], float r_co[2], 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.
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)
BMesh Make Mesh.
#define BMALLOC_TEMPLATE_FROM_ME(...)
void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshParams *params)
Mesh -> BMesh.
#define BMO_FLAG_DEFAULTS
bool BMO_op_callf(BMesh *bm, const int flag, const char *fmt,...)
void BM_mesh_calc_tessellation_beauty(BMesh *bm, BMLoop *(*looptris)[3], int *r_looptris_tot)
const Depsgraph * depsgraph
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)
@ PAINT_MASK_FLOOD_VALUE_INVERSE
void flip_v3_v3(float out[3], const float in[3], const enum 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 mouse[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(void)
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
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
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)