Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_vec_types.h"
#include "BLI_alloca.h"
#include "BLI_bitmap_draw_2d.h"
#include "BLI_lasso_2d.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_polyfill_2d.h"
#include "BLI_rect.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BKE_brush.h"
#include "BKE_ccg.h"
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_multires.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_subsurf.h"
#include "DEG_depsgraph.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_view3d.h"
#include "bmesh.h"
#include "bmesh_tools.h"
#include "tools/bmesh_boolean.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | MaskTaskData |
struct | LassoGestureData |
struct | LineGestureData |
struct | SculptGestureContext |
struct | SculptGestureOperation |
struct | SculptGestureFaceSetOperation |
struct | SculptGestureMaskOperation |
struct | SculptGestureTrimOperation |
struct | SculptGestureProjectOperation |
Typedefs | |
typedef struct MaskTaskData | MaskTaskData |
typedef enum eSculptGestureShapeType | eMaskGesturesShapeType |
typedef struct LassoGestureData | LassoGestureData |
typedef struct LineGestureData | LineGestureData |
typedef struct SculptGestureContext | SculptGestureContext |
typedef struct SculptGestureOperation | SculptGestureOperation |
typedef struct SculptGestureFaceSetOperation | SculptGestureFaceSetOperation |
typedef struct SculptGestureMaskOperation | SculptGestureMaskOperation |
typedef enum eSculptTrimOperationType | eSculptTrimOperationType |
typedef enum eSculptTrimOrientationType | eSculptTrimOrientationType |
typedef struct SculptGestureTrimOperation | SculptGestureTrimOperation |
typedef struct SculptGestureProjectOperation | SculptGestureProjectOperation |
Variables | |
static const EnumPropertyItem | mode_items [] |
static EnumPropertyItem | prop_trim_operation_types [] |
static EnumPropertyItem | prop_trim_orientation_types [] |
typedef enum eSculptGestureShapeType eMaskGesturesShapeType |
typedef enum eSculptTrimOperationType eSculptTrimOperationType |
typedef enum eSculptTrimOrientationType eSculptTrimOrientationType |
typedef struct LassoGestureData LassoGestureData |
typedef struct LineGestureData LineGestureData |
typedef struct MaskTaskData MaskTaskData |
typedef struct SculptGestureContext SculptGestureContext |
typedef struct SculptGestureFaceSetOperation SculptGestureFaceSetOperation |
typedef struct SculptGestureMaskOperation SculptGestureMaskOperation |
typedef struct SculptGestureOperation SculptGestureOperation |
typedef struct SculptGestureProjectOperation SculptGestureProjectOperation |
typedef struct SculptGestureTrimOperation SculptGestureTrimOperation |
Enumerator | |
---|---|
SCULPT_GESTURE_SHAPE_BOX | |
SCULPT_GESTURE_SHAPE_LASSO | |
SCULPT_GESTURE_SHAPE_LINE |
Definition at line 216 of file paint_mask.c.
Enumerator | |
---|---|
SCULPT_GESTURE_TRIM_INTERSECT | |
SCULPT_GESTURE_TRIM_DIFFERENCE | |
SCULPT_GESTURE_TRIM_UNION | |
SCULPT_GESTURE_TRIM_JOIN |
Definition at line 892 of file paint_mask.c.
Enumerator | |
---|---|
SCULPT_GESTURE_TRIM_ORIENTATION_VIEW | |
SCULPT_GESTURE_TRIM_ORIENTATION_SURFACE |
Definition at line 916 of file paint_mask.c.
Definition at line 1219 of file paint_mask.c.
References BM_ELEM_DRAW, and BM_elem_flag_test.
Referenced by sculpt_gesture_apply_trim().
|
static |
Definition at line 733 of file paint_mask.c.
References BKE_pbvh_node_mark_update_visibility(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, SculptGestureFaceSetOperation::new_face_set_id, node, SculptGestureContext::nodes, SculptGestureContext::operation, SculptSession::pbvh, PBVH_ITER_UNIQUE, sculpt_gesture_is_vertex_effected(), SCULPT_vertex_face_set_set(), and SculptGestureContext::ss.
Referenced by sculpt_gesture_face_set_apply_for_symmetry_pass().
|
static |
Definition at line 1532 of file paint_mask.c.
References C, OPERATOR_CANCELLED, OPERATOR_FINISHED, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_face_set_properties(), and sculpt_gesture_init_from_box().
Referenced by SCULPT_OT_face_set_box_gesture().
|
static |
Definition at line 1544 of file paint_mask.c.
References C, OPERATOR_CANCELLED, OPERATOR_FINISHED, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_face_set_properties(), and sculpt_gesture_init_from_lasso().
Referenced by SCULPT_OT_face_set_lasso_gesture().
Definition at line 551 of file paint_mask.c.
References usdtokens::out(), PAINT_SYMM_X, PAINT_SYMM_Y, and PAINT_SYMM_Z.
Referenced by sculpt_gesture_flip_for_symmetry_pass().
|
static |
Definition at line 135 of file paint_mask.c.
References BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BKE_pbvh_type(), BKE_pbvh_update_vertex_data(), BKE_sculpt_update_object_for_edit(), BLI_task_parallel_range(), C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), data, depsgraph, mask_flood_fill_task_cb(), MEM_freeN, MULTIRES_COORDS_MODIFIED, multires_mark_as_modified(), PBVH::nodes, NULL, OPERATOR_FINISHED, SculptSession::pbvh, PBVH_GRIDS, PBVH_UpdateMask, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), Object::sculpt, SCULPT_tag_update_overlays(), SCULPT_undo_push_begin(), and SCULPT_undo_push_end().
Referenced by PAINT_OT_mask_flood_fill().
|
static |
Definition at line 73 of file paint_mask.c.
References PAINT_MASK_FLOOD_VALUE, PAINT_MASK_FLOOD_VALUE_INVERSE, and PAINT_MASK_INVERT.
Referenced by mask_flood_fill_task_cb(), and mask_gesture_apply_task_cb().
|
static |
Definition at line 102 of file paint_mask.c.
References BKE_pbvh_node_mark_normals_update(), BKE_pbvh_node_mark_update_mask(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, data, PBVHVertexIter::mask, mask_flood_fill_set_elem(), node, PBVH_ITER_UNIQUE, SCULPT_UNDO_MASK, and SCULPT_undo_push_node().
Referenced by mask_flood_fill_exec().
|
static |
Definition at line 803 of file paint_mask.c.
References BKE_pbvh_node_mark_normals_update(), BKE_pbvh_node_mark_update_mask(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::mask, mask_flood_fill_set_elem(), SculptGestureMaskOperation::mode, node, SculptGestureContext::nodes, ViewContext::obact, SculptGestureContext::operation, SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, sculpt_gesture_is_vertex_effected(), SCULPT_UNDO_MASK, SCULPT_undo_push_node(), SculptGestureContext::ss, SculptGestureMaskOperation::value, and SculptGestureContext::vc.
Referenced by sculpt_gesture_mask_apply_for_symmetry_pass().
|
static |
Definition at line 1496 of file paint_mask.c.
References C, OPERATOR_CANCELLED, OPERATOR_FINISHED, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_from_box(), and sculpt_gesture_init_mask_properties().
Referenced by PAINT_OT_mask_box_gesture().
|
static |
Definition at line 1508 of file paint_mask.c.
References C, OPERATOR_CANCELLED, OPERATOR_FINISHED, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_from_lasso(), and sculpt_gesture_init_mask_properties().
Referenced by PAINT_OT_mask_lasso_gesture().
|
static |
Definition at line 1520 of file paint_mask.c.
References C, OPERATOR_CANCELLED, OPERATOR_FINISHED, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_from_line(), and sculpt_gesture_init_mask_properties().
Referenced by PAINT_OT_mask_line_gesture().
|
static |
Definition at line 875 of file paint_mask.c.
References mode_items, NULL, ot, PAINT_MASK_FLOOD_VALUE, RNA_def_enum(), RNA_def_float(), and wmOperatorType::srna.
Referenced by PAINT_OT_mask_box_gesture(), PAINT_OT_mask_lasso_gesture(), and PAINT_OT_mask_line_gesture().
void PAINT_OT_mask_box_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1672 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, paint_mask_gesture_box_exec(), paint_mask_gesture_operator_properties(), wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_box_invoke(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_paint().
void PAINT_OT_mask_flood_fill | ( | struct wmOperatorType * | ot | ) |
Definition at line 187 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mask_flood_fill_exec(), mode_items, wmOperatorType::name, NULL, OPTYPE_REGISTER, ot, PAINT_MASK_FLOOD_VALUE, wmOperatorType::poll, RNA_def_enum(), RNA_def_float(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
void PAINT_OT_mask_lasso_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1651 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, ot, paint_mask_gesture_lasso_exec(), paint_mask_gesture_operator_properties(), wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by ED_operatortypes_paint().
void PAINT_OT_mask_line_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1693 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, paint_mask_gesture_line_exec(), paint_mask_gesture_operator_properties(), wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_CURSOR_EDIT, WM_gesture_straightline_active_side_invoke(), WM_gesture_straightline_oneshot_modal(), and WM_operator_properties_gesture_straightline().
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 1639 of file paint_mask.c.
References C, OPERATOR_CANCELLED, OPERATOR_FINISHED, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_from_line(), and sculpt_gesture_init_project_properties().
Referenced by SCULPT_OT_project_line_gesture().
|
static |
Definition at line 1411 of file paint_mask.c.
References add_v3_v3(), BKE_pbvh_node_mark_update(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, closest_to_plane_v3(), PBVHVertexIter::co, PBVHVertexIter::index, is_zero_v3(), SculptGestureContext::line, mask(), PBVHVertexIter::mask, mul_v3_fl(), PBVHVertexIter::mvert, node, SculptGestureContext::nodes, ViewContext::obact, SculptSession::pbvh, PBVH_ITER_UNIQUE, LineGestureData::plane, sculpt_gesture_is_vertex_effected(), SCULPT_UNDO_COORDS, SCULPT_undo_push_node(), SculptGestureContext::ss, sub_v3_v3v3(), and SculptGestureContext::vc.
Referenced by sculpt_gesture_project_apply_for_symmetry_pass().
|
static |
Definition at line 690 of file paint_mask.c.
References C, CTX_data_active_object(), MEM_SAFE_FREE, SculptGestureContext::nodes, SculptGestureContext::operation, SculptGestureOperation::sculpt_gesture_apply_for_symmetry_pass, SculptGestureOperation::sculpt_gesture_begin, SculptGestureOperation::sculpt_gesture_end, sculpt_gesture_flip_for_symmetry_pass(), sculpt_gesture_update_effected_nodes(), SCULPT_is_symmetry_iteration_valid(), SCULPT_tag_update_overlays(), SCULPT_undo_push_begin(), SCULPT_undo_push_end(), and SculptGestureContext::symm.
Referenced by face_set_gesture_box_exec(), face_set_gesture_lasso_exec(), paint_mask_gesture_box_exec(), paint_mask_gesture_lasso_exec(), paint_mask_gesture_line_exec(), project_gesture_line_exec(), sculpt_trim_gesture_box_exec(), and sculpt_trim_gesture_lasso_exec().
|
static |
Definition at line 1224 of file paint_mask.c.
References BKE_mesh_from_bmesh_nomain(), BKE_mesh_from_object(), BKE_mesh_nomain_to_mesh(), BLI_array_alloca, BLI_assert, bm, BM_ELEM_DRAW, BM_elem_flag_enable, bm_face_isect_pair(), BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_bm_from_me(), BM_mesh_boolean(), BM_mesh_calc_tessellation_beauty(), BM_mesh_create(), BM_mesh_free(), BMALLOC_TEMPLATE_FROM_ME, CD_MASK_MESH, Object::data, eBooleanModifierOp_Difference, eBooleanModifierOp_Intersect, eBooleanModifierOp_Union, BMFace::mat_nr, MEM_freeN, MEM_malloc_arrayN, SculptGestureTrimOperation::mesh, SculptGestureTrimOperation::mode, BMFace::no, normalize_v3(), NULL, ViewContext::obact, SculptGestureContext::operation, poly_to_tri_count(), result, SCULPT_GESTURE_TRIM_DIFFERENCE, SCULPT_GESTURE_TRIM_INTERSECT, SCULPT_GESTURE_TRIM_JOIN, SCULPT_GESTURE_TRIM_UNION, Mesh::totcol, BMesh::totface, BMesh::totloop, Mesh::totpoly, and SculptGestureContext::vc.
Referenced by sculpt_gesture_trim_apply_for_symmetry_pass().
|
static |
Definition at line 542 of file paint_mask.c.
References SculptGestureContext::gesture_points, SculptGestureContext::lasso, LassoGestureData::mask_px, MEM_SAFE_FREE, SculptGestureContext::nodes, and SculptGestureContext::operation.
Referenced by face_set_gesture_box_exec(), face_set_gesture_lasso_exec(), paint_mask_gesture_box_exec(), paint_mask_gesture_lasso_exec(), paint_mask_gesture_line_exec(), project_gesture_line_exec(), sculpt_trim_gesture_box_exec(), and sculpt_trim_gesture_lasso_exec().
|
static |
Definition at line 324 of file paint_mask.c.
References C, copy_m3_m4(), copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), depsgraph, ED_view3d_viewcontext_init(), SculptGestureContext::front_faces_only, Object::imat, SculptGestureContext::line, mul_m3_v3(), normalize_v3_v3(), ViewContext::obact, wmOperator::ptr, RNA_boolean_get(), ViewContext::rv3d, Object::sculpt, SCULPT_mesh_symmetry_xyz_get(), SculptGestureContext::ss, SculptGestureContext::symm, SculptGestureContext::true_view_normal, SculptGestureContext::true_view_origin, LineGestureData::use_side_planes, SculptGestureContext::vc, RegionView3D::viewinv, SculptGestureContext::world_space_view_normal, and SculptGestureContext::world_space_view_origin.
Referenced by sculpt_gesture_init_from_box(), sculpt_gesture_init_from_lasso(), and sculpt_gesture_init_from_line().
|
static |
Definition at line 757 of file paint_mask.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), face_set_gesture_apply_task_cb(), and SculptGestureContext::totnode.
Referenced by sculpt_gesture_init_face_set_properties().
|
static |
Definition at line 724 of file paint_mask.c.
References BKE_sculpt_update_object_for_edit(), C, CTX_data_depsgraph_pointer(), depsgraph, NULL, ViewContext::obact, SCULPT_UNDO_FACE_SETS, SCULPT_undo_push_node(), and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_face_set_properties().
|
static |
Definition at line 766 of file paint_mask.c.
References BKE_pbvh_update_vertex_data(), SculptSession::pbvh, PBVH_UpdateVisibility, and SculptGestureContext::ss.
Referenced by sculpt_gesture_init_face_set_properties().
|
static |
Definition at line 575 of file paint_mask.c.
References SculptGestureContext::clip_planes, flip_plane(), flip_v3_v3(), SculptGestureContext::line, negate_m4(), LineGestureData::plane, LineGestureData::side_plane, SculptGestureContext::symmpass, SculptGestureContext::true_clip_planes, LineGestureData::true_plane, LineGestureData::true_side_plane, SculptGestureContext::true_view_normal, SculptGestureContext::true_view_origin, SculptGestureContext::view_normal, and SculptGestureContext::view_origin.
Referenced by sculpt_gesture_apply().
|
static |
Definition at line 771 of file paint_mask.c.
References BKE_mesh_from_object(), ED_sculpt_face_sets_find_next_available_id(), MEM_callocN, mesh, SculptGestureFaceSetOperation::new_face_set_id, ViewContext::obact, SculptGestureFaceSetOperation::op, SculptGestureContext::operation, SculptGestureOperation::sculpt_gesture_apply_for_symmetry_pass, SculptGestureOperation::sculpt_gesture_begin, SculptGestureOperation::sculpt_gesture_end, sculpt_gesture_face_set_apply_for_symmetry_pass(), sculpt_gesture_face_set_begin(), sculpt_gesture_face_set_end(), and SculptGestureContext::vc.
Referenced by face_set_gesture_box_exec(), and face_set_gesture_lasso_exec().
|
static |
Definition at line 419 of file paint_mask.c.
References C, ED_view3d_clipping_calc(), SculptGestureContext::gesture_points, MEM_calloc_arrayN, MEM_callocN, ViewContext::obact, ViewContext::region, sculpt_gesture_context_init_common(), SCULPT_GESTURE_SHAPE_BOX, SculptGestureContext::shape_type, SculptGestureContext::tot_gesture_points, SculptGestureContext::true_clip_planes, SculptGestureContext::vc, WM_operator_properties_border_to_rcti(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by face_set_gesture_box_exec(), paint_mask_gesture_box_exec(), and sculpt_trim_gesture_box_exec().
|
static |
Definition at line 368 of file paint_mask.c.
References BLI_bitmap_draw_2d_poly_v2i_n(), BLI_BITMAP_NEW, BLI_lasso_boundbox(), LassoGestureData::boundbox, C, ED_view3d_clipping_calc(), ED_view3d_ob_project_mat_get(), SculptGestureContext::gesture_points, SculptGestureContext::lasso, LassoGestureData::mask_px, MEM_callocN, MEM_freeN, MEM_malloc_arrayN, NULL, ViewContext::obact, LassoGestureData::projviewobjmat, ViewContext::region, ViewContext::rv3d, sculpt_gesture_context_init_common(), sculpt_gesture_lasso_px_cb(), SCULPT_GESTURE_SHAPE_LASSO, SculptGestureContext::shape_type, SculptGestureContext::tot_gesture_points, SculptGestureContext::true_clip_planes, SculptGestureContext::vc, LassoGestureData::width, WM_gesture_lasso_path_to_array(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by face_set_gesture_lasso_exec(), paint_mask_gesture_lasso_exec(), and sculpt_trim_gesture_lasso_exec().
|
static |
Definition at line 495 of file paint_mask.c.
References C, LineGestureData::flip, RegionView3D::is_persp, SculptGestureContext::line, MEM_callocN, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), ViewContext::rv3d, sculpt_gesture_context_init_common(), sculpt_gesture_line_calculate_plane_points(), sculpt_gesture_line_plane_from_tri(), SCULPT_GESTURE_SHAPE_LINE, SculptGestureContext::shape_type, LineGestureData::true_plane, LineGestureData::true_side_plane, and SculptGestureContext::vc.
Referenced by paint_mask_gesture_line_exec(), and project_gesture_line_exec().
|
static |
Definition at line 860 of file paint_mask.c.
References MEM_callocN, SculptGestureMaskOperation::mode, SculptGestureMaskOperation::op, SculptGestureContext::operation, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), SculptGestureOperation::sculpt_gesture_apply_for_symmetry_pass, SculptGestureOperation::sculpt_gesture_begin, SculptGestureOperation::sculpt_gesture_end, sculpt_gesture_mask_apply_for_symmetry_pass(), sculpt_gesture_mask_begin(), sculpt_gesture_mask_end(), and SculptGestureMaskOperation::value.
Referenced by paint_mask_gesture_box_exec(), paint_mask_gesture_lasso_exec(), and paint_mask_gesture_line_exec().
|
static |
Definition at line 1482 of file paint_mask.c.
References MEM_callocN, SculptGestureContext::operation, SculptGestureProjectOperation::operation, SculptGestureOperation::sculpt_gesture_apply_for_symmetry_pass, SculptGestureOperation::sculpt_gesture_begin, SculptGestureOperation::sculpt_gesture_end, sculpt_gesture_project_apply_for_symmetry_pass(), sculpt_gesture_project_begin(), and sculpt_gesture_project_end().
Referenced by project_gesture_line_exec().
|
static |
Definition at line 1356 of file paint_mask.c.
References SculptSession::gesture_initial_hit, MEM_callocN, SculptGestureTrimOperation::mode, SculptGestureTrimOperation::op, SculptGestureContext::operation, SculptGestureTrimOperation::orientation, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), SculptGestureOperation::sculpt_gesture_apply_for_symmetry_pass, SculptGestureOperation::sculpt_gesture_begin, SculptGestureOperation::sculpt_gesture_end, sculpt_gesture_trim_apply_for_symmetry_pass(), sculpt_gesture_trim_begin(), sculpt_gesture_trim_end(), SCULPT_GESTURE_TRIM_ORIENTATION_VIEW, SculptGestureContext::ss, and SculptGestureTrimOperation::use_cursor_depth.
Referenced by sculpt_trim_gesture_box_exec(), and sculpt_trim_gesture_lasso_exec().
|
static |
Definition at line 636 of file paint_mask.c.
References BLI_BITMAP_TEST_BOOL, BLI_rcti_isect_pt(), LassoGestureData::boundbox, ED_view3d_project_float_v2_m4(), flip_v3_v3(), SculptGestureContext::lasso, LassoGestureData::mask_px, LassoGestureData::projviewobjmat, ViewContext::region, SculptGestureContext::symmpass, SculptGestureContext::vc, LassoGestureData::width, rcti::xmin, and rcti::ymin.
Referenced by sculpt_gesture_is_vertex_effected().
|
static |
Definition at line 663 of file paint_mask.c.
References SculptGestureContext::clip_planes, PBVHVertexIter::co, dot_v3v3(), SculptGestureContext::front_faces_only, PBVHVertexIter::index, isect_point_planes_v3(), SculptGestureContext::line, LineGestureData::plane, plane_point_side_v3(), sculpt_gesture_is_effected_lasso(), SCULPT_GESTURE_SHAPE_BOX, SCULPT_GESTURE_SHAPE_LASSO, SCULPT_GESTURE_SHAPE_LINE, SCULPT_vertex_normal_get(), SculptGestureContext::shape_type, LineGestureData::side_plane, SculptGestureContext::ss, LineGestureData::use_side_planes, and SculptGestureContext::view_normal.
Referenced by face_set_gesture_apply_task_cb(), mask_gesture_apply_task_cb(), and project_line_gesture_apply_task_cb().
Definition at line 357 of file paint_mask.c.
References BLI_BITMAP_ENABLE, SculptGestureContext::lasso, LassoGestureData::mask_px, user_data, LassoGestureData::width, x, and y.
Referenced by sculpt_gesture_init_from_lasso().
|
static |
Definition at line 471 of file paint_mask.c.
References add_v3_v3v3(), ED_view3d_win_to_3d(), madd_v3_v3v3fl(), normal, normal_tri_v3(), ViewContext::region, SculptGestureContext::true_view_normal, SculptGestureContext::true_view_origin, ViewContext::v3d, and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_from_line().
|
static |
Definition at line 451 of file paint_mask.c.
References Object::imat, mul_v3_fl(), mul_v3_m4v3(), mul_v3_mat3_m4v3(), normal, normal_tri_v3(), ViewContext::obact, plane_from_point_normal_v3(), and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_from_line().
|
static |
Definition at line 843 of file paint_mask.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), mask_gesture_apply_task_cb(), and SculptGestureContext::totnode.
Referenced by sculpt_gesture_init_mask_properties().
|
static |
Definition at line 797 of file paint_mask.c.
References BKE_sculpt_update_object_for_edit(), C, CTX_data_depsgraph_pointer(), depsgraph, ViewContext::obact, and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_mask_properties().
|
static |
Definition at line 851 of file paint_mask.c.
References BKE_pbvh_type(), BKE_pbvh_update_vertex_data(), C, CTX_data_depsgraph_pointer(), depsgraph, MULTIRES_COORDS_MODIFIED, multires_mark_as_modified(), ViewContext::obact, SculptSession::pbvh, PBVH_GRIDS, PBVH_UpdateMask, SculptGestureContext::ss, and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_mask_properties().
|
static |
Definition at line 308 of file paint_mask.c.
References ot, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by PAINT_OT_mask_box_gesture(), PAINT_OT_mask_lasso_gesture(), PAINT_OT_mask_line_gesture(), SCULPT_OT_face_set_box_gesture(), SCULPT_OT_face_set_lasso_gesture(), SCULPT_OT_project_line_gesture(), SCULPT_OT_trim_box_gesture(), and SCULPT_OT_trim_lasso_gesture().
|
static |
Definition at line 1451 of file paint_mask.c.
References BKE_pbvh_parallel_range_settings(), BLI_assert, BLI_task_parallel_range(), project_line_gesture_apply_task_cb(), SCULPT_GESTURE_SHAPE_BOX, SCULPT_GESTURE_SHAPE_LASSO, SCULPT_GESTURE_SHAPE_LINE, SculptGestureContext::shape_type, and SculptGestureContext::totnode.
Referenced by sculpt_gesture_init_project_properties().
|
static |
Definition at line 1405 of file paint_mask.c.
References BKE_sculpt_update_object_for_edit(), C, CTX_data_depsgraph_pointer(), depsgraph, ViewContext::obact, and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_project_properties().
|
static |
Definition at line 1470 of file paint_mask.c.
References C, CTX_data_tool_settings(), SculptSession::deform_modifiers_active, ViewContext::obact, ToolSettings::sculpt, SCULPT_flush_stroke_deform(), SCULPT_flush_update_done(), SCULPT_flush_update_step(), SCULPT_UPDATE_COORDS, SculptSession::shapekey_active, SculptGestureContext::ss, and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_project_properties().
|
static |
Definition at line 1326 of file paint_mask.c.
References flip_v3_v3(), SculptGestureTrimOperation::mesh, SculptGestureContext::operation, sculpt_gesture_apply_trim(), sculpt_gesture_trim_normals_update(), SculptGestureContext::symmpass, and SculptGestureTrimOperation::true_mesh_co.
Referenced by sculpt_gesture_init_trim_properties().
|
static |
Definition at line 1317 of file paint_mask.c.
References BKE_sculpt_update_object_for_edit(), C, CTX_data_ensure_evaluated_depsgraph(), depsgraph, NULL, ViewContext::obact, sculpt_gesture_trim_calculate_depth(), sculpt_gesture_trim_geometry_generate(), SCULPT_UNDO_GEOMETRY, SCULPT_undo_push_node(), and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_trim_properties().
|
static |
Definition at line 1009 of file paint_mask.c.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_use_locked_size(), BKE_paint_brush(), CTX_data_scene(), CTX_data_tool_settings(), SculptGestureTrimOperation::depth_back, SculptGestureTrimOperation::depth_front, dist_signed_to_plane_v3(), max_ff(), min_ff(), mul_v3_m4v3(), SculptGestureContext::operation, SculptGestureTrimOperation::orientation, Sculpt::paint, paint_calc_object_space_radius(), plane_from_point_normal_v3(), scene, ToolSettings::sculpt, SCULPT_GESTURE_TRIM_ORIENTATION_VIEW, sculpt_gesture_trim_shape_origin_normal_get(), SCULPT_vertex_co_get(), SCULPT_vertex_count_get(), SculptGestureContext::ss, SculptGestureTrimOperation::use_cursor_depth, and SculptGestureContext::vc.
Referenced by sculpt_gesture_trim_begin().
|
static |
Definition at line 1338 of file paint_mask.c.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, CD_SCULPT_FACE_SETS, CustomData_get_layer(), Object::data, DEG_id_tag_update(), ED_sculpt_face_sets_find_next_available_id(), ED_sculpt_face_sets_initialize_none_to_id(), SculptSession::face_sets, Object::id, ID_RECALC_GEOMETRY, NULL, ViewContext::obact, sculpt_gesture_trim_geometry_free(), SCULPT_UNDO_GEOMETRY, SCULPT_undo_push_node(), and SculptGestureContext::vc.
Referenced by sculpt_gesture_init_trim_properties().
|
static |
Definition at line 1212 of file paint_mask.c.
References BKE_id_free(), MEM_freeN, SculptGestureTrimOperation::mesh, NULL, SculptGestureContext::operation, and SculptGestureTrimOperation::true_mesh_co.
Referenced by sculpt_gesture_trim_end().
|
static |
Definition at line 1089 of file paint_mask.c.
References BKE_mesh_calc_edges(), BKE_mesh_new_nomain(), BLI_polyfill_calc(), MVert::co, SculptGestureTrimOperation::depth_back, SculptGestureTrimOperation::depth_front, ED_view3d_win_to_3d(), ED_view3d_win_to_3d_on_plane(), float(), SculptGestureContext::gesture_points, MPoly::loopstart, madd_v3_v3fl(), madd_v3_v3v3fl(), MEM_freeN, MEM_malloc_arrayN, SculptGestureTrimOperation::mesh, Mesh::mloop, Mesh::mpoly, mul_v3_m4v3(), Mesh::mvert, SculptGestureContext::operation, SculptGestureTrimOperation::orientation, plane_from_point_normal_v3(), sculpt_gesture_trim_normals_update(), SCULPT_GESTURE_TRIM_ORIENTATION_VIEW, sculpt_gesture_trim_shape_origin_normal_get(), SculptGestureContext::tot_gesture_points, MPoly::totloop, SculptGestureTrimOperation::true_mesh_co, SculptGestureTrimOperation::use_cursor_depth, MLoop::v, and SculptGestureContext::vc.
Referenced by sculpt_gesture_trim_begin().
|
static |
Definition at line 949 of file paint_mask.c.
References BKE_id_free(), BKE_mesh_from_bmesh_nomain(), bm, BM_EDGE, BM_ELEM_TAG, BM_FACE, BM_mesh_bm_from_me(), BM_mesh_create(), BM_mesh_elem_hflag_disable_all(), BM_mesh_elem_hflag_enable_all(), BM_mesh_free(), BM_VERT, BMALLOC_TEMPLATE_FROM_ME, BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_op_callf(), SculptGestureTrimOperation::mesh, NULL, SculptGestureContext::operation, and result.
Referenced by sculpt_gesture_trim_apply_for_symmetry_pass(), and sculpt_gesture_trim_geometry_generate().
|
static |
Definition at line 985 of file paint_mask.c.
References copy_v3_v3(), SculptSession::gesture_initial_location, SculptSession::gesture_initial_normal, mul_mat3_m4_v3(), mul_v3_m4v3(), ViewContext::obact, Object::obmat, SculptGestureContext::operation, SculptGestureTrimOperation::orientation, SCULPT_GESTURE_TRIM_ORIENTATION_SURFACE, SCULPT_GESTURE_TRIM_ORIENTATION_VIEW, SculptGestureContext::ss, SculptGestureContext::vc, SculptGestureContext::world_space_view_normal, and SculptGestureContext::world_space_view_origin.
Referenced by sculpt_gesture_trim_calculate_depth(), and sculpt_gesture_trim_geometry_generate().
|
static |
Definition at line 623 of file paint_mask.c.
References SCULPT_GESTURE_SHAPE_BOX, SCULPT_GESTURE_SHAPE_LASSO, SCULPT_GESTURE_SHAPE_LINE, sculpt_gesture_update_effected_nodes_by_clip_planes(), sculpt_gesture_update_effected_nodes_by_line_plane(), and SculptGestureContext::shape_type.
Referenced by sculpt_gesture_apply().
|
static |
Definition at line 609 of file paint_mask.c.
References BKE_pbvh_node_frustum_contain_AABB(), BKE_pbvh_search_gather(), SculptGestureContext::clip_planes, copy_m4_m4(), negate_m4(), SculptGestureContext::nodes, SculptSession::pbvh, PBVHFrustumPlanes::planes, SculptGestureContext::ss, and SculptGestureContext::totnode.
Referenced by sculpt_gesture_update_effected_nodes().
|
static |
Definition at line 592 of file paint_mask.c.
References BKE_pbvh_node_frustum_contain_AABB(), BKE_pbvh_search_gather(), copy_v4_v4(), SculptGestureContext::line, SculptGestureContext::nodes, SculptSession::pbvh, LineGestureData::plane, PBVHFrustumPlanes::planes, LineGestureData::side_plane, SculptGestureContext::ss, SculptGestureContext::totnode, and LineGestureData::use_side_planes.
Referenced by sculpt_gesture_update_effected_nodes().
void SCULPT_OT_face_set_box_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1733 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, face_set_gesture_box_exec(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_box_invoke(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_sculpt().
void SCULPT_OT_face_set_lasso_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1714 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, face_set_gesture_lasso_exec(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by ED_operatortypes_sculpt().
void SCULPT_OT_project_line_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1794 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, project_gesture_line_exec(), sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), WM_CURSOR_EDIT, WM_gesture_straightline_active_side_invoke(), WM_gesture_straightline_oneshot_modal(), and WM_operator_properties_gesture_straightline().
Referenced by ED_operatortypes_sculpt().
void SCULPT_OT_trim_box_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1773 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), sculpt_trim_gesture_box_exec(), sculpt_trim_gesture_box_invoke(), sculpt_trim_gesture_operator_properties(), WM_gesture_box_modal(), and WM_operator_properties_border().
Referenced by ED_operatortypes_sculpt().
void SCULPT_OT_trim_lasso_gesture | ( | wmOperatorType * | ot | ) |
Definition at line 1752 of file paint_mask.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, ot, wmOperatorType::poll, sculpt_gesture_operator_properties(), SCULPT_mode_poll_view3d(), sculpt_trim_gesture_lasso_exec(), sculpt_trim_gesture_lasso_invoke(), sculpt_trim_gesture_operator_properties(), WM_gesture_lasso_modal(), and WM_operator_properties_gesture_lasso().
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 1556 of file paint_mask.c.
References BKE_pbvh_type(), C, CTX_data_active_object(), OPERATOR_CANCELLED, OPERATOR_FINISHED, SculptSession::pbvh, PBVH_FACES, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_from_box(), sculpt_gesture_init_trim_properties(), and SculptSession::totvert.
Referenced by SCULPT_OT_trim_box_gesture().
|
static |
Definition at line 1581 of file paint_mask.c.
References C, copy_v3_v3(), CTX_data_active_object(), SculptSession::gesture_initial_hit, SculptSession::gesture_initial_location, SculptSession::gesture_initial_normal, SculptCursorGeometryInfo::location, wmEvent::mval, SculptCursorGeometryInfo::normal, Object::sculpt, SCULPT_cursor_geometry_info_update(), SCULPT_vertex_random_access_ensure(), UNPACK2, and WM_gesture_box_invoke().
Referenced by SCULPT_OT_trim_box_gesture().
|
static |
Definition at line 1598 of file paint_mask.c.
References BKE_pbvh_type(), C, CTX_data_active_object(), OPERATOR_CANCELLED, OPERATOR_FINISHED, SculptSession::pbvh, PBVH_FACES, sculpt_gesture_apply(), sculpt_gesture_context_free(), sculpt_gesture_init_from_lasso(), sculpt_gesture_init_trim_properties(), and SculptSession::totvert.
Referenced by SCULPT_OT_trim_lasso_gesture().
|
static |
Definition at line 1622 of file paint_mask.c.
References C, copy_v3_v3(), CTX_data_active_object(), SculptSession::gesture_initial_hit, SculptSession::gesture_initial_location, SculptSession::gesture_initial_normal, SculptCursorGeometryInfo::location, wmEvent::mval, SculptCursorGeometryInfo::normal, Object::sculpt, SCULPT_cursor_geometry_info_update(), SCULPT_vertex_random_access_ensure(), UNPACK2, and WM_gesture_lasso_invoke().
Referenced by SCULPT_OT_trim_lasso_gesture().
|
static |
Definition at line 1377 of file paint_mask.c.
References NULL, ot, prop_trim_operation_types, prop_trim_orientation_types, RNA_def_boolean(), RNA_def_enum(), SCULPT_GESTURE_TRIM_DIFFERENCE, SCULPT_GESTURE_TRIM_ORIENTATION_VIEW, and wmOperatorType::srna.
Referenced by SCULPT_OT_trim_box_gesture(), and SCULPT_OT_trim_lasso_gesture().
|
static |
Definition at line 59 of file paint_mask.c.
Referenced by def_cmp_combsep_color(), def_cmp_dilate_erode(), def_cmp_set_alpha(), def_compare(), def_geo_curve_fill(), def_geo_curve_fillet(), def_geo_curve_primitive_arc(), def_geo_curve_primitive_bezier_segment(), def_geo_curve_primitive_circle(), def_geo_curve_primitive_line(), def_geo_curve_primitive_quadrilateral(), def_geo_curve_resample(), def_geo_curve_sample(), def_geo_curve_to_points(), def_geo_curve_trim(), def_geo_delete_geometry(), def_geo_extrude_mesh(), def_geo_merge_by_distance(), def_geo_mesh_line(), def_geo_mesh_to_points(), blender::ed::geometry::GEOMETRY_OT_attribute_convert(), paint_mask_gesture_operator_properties(), PAINT_OT_mask_flood_fill(), rna_def_constraint_same_volume(), rna_def_modifier_gpenciltexture(), rna_def_modifier_remesh(), rna_def_modifier_solidify(), rna_def_modifier_weld(), and rna_def_particle_target().
|
static |
Definition at line 901 of file paint_mask.c.
Referenced by sculpt_trim_gesture_operator_properties().
|
static |
Definition at line 920 of file paint_mask.c.
Referenced by sculpt_trim_gesture_operator_properties().