Blender
V3.3
|
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_shrinkwrap.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_undo.h"
#include "ED_view3d.h"
#include "bmesh_tools.h"
#include "MEM_guardedalloc.h"
#include "mesh_intern.h"
Go to the source code of this file.
Classes | |
struct | GeometryExtactParams |
Typedefs | |
typedef struct GeometryExtactParams | GeometryExtractParams |
typedef void() | GeometryExtractTagMeshFunc(struct BMesh *, GeometryExtractParams *) |
typedef struct GeometryExtactParams GeometryExtractParams |
typedef void() GeometryExtractTagMeshFunc(struct BMesh *, GeometryExtractParams *) |
Definition at line 77 of file editmesh_mask_extract.c.
|
static |
Definition at line 365 of file editmesh_mask_extract.c.
References C, CTX_wm_window(), ED_workspace_status_text(), OPERATOR_RUNNING_MODAL, TIP_, WM_CURSOR_EYEDROPPER, WM_cursor_modal_set(), and WM_event_add_modal_handler().
Referenced by MESH_OT_face_set_extract().
|
static |
Definition at line 373 of file editmesh_mask_extract.c.
References BKE_screen_find_main_region_at_xy(), C, CTX_data_active_object(), CTX_wm_screen(), CTX_wm_window(), ED_sculpt_face_sets_active_update_and_get(), ED_workspace_status_text(), EVT_ESCKEY, geometry_extract_apply(), geometry_extract_tag_face_set(), KM_PRESS, LEFTMOUSE, NULL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, params, RIGHTMOUSE, SCULPT_FACE_SET_NONE, SPACE_VIEW3D, wmEvent::type, wmEvent::val, ARegion::winrct, WM_cursor_modal_restore(), rcti::xmin, wmEvent::xy, and rcti::ymin.
Referenced by MESH_OT_face_set_extract().
|
static |
Definition at line 79 of file editmesh_mask_extract.c.
References BKE_editmesh_create(), BKE_editmesh_free_data(), BKE_id_copy(), BKE_id_free(), BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_copy_parameters_for_eval(), BKE_mesh_from_bmesh_nomain(), BKE_mesh_nomain_to_mesh(), BKE_modifiers_findby_name(), BKE_sculpt_mask_layers_ensure(), BKE_shrinkwrap_mesh_nearest_surface_deform(), bm, BM_EDGE, BM_edge_is_boundary(), BM_EDGES_OF_MESH, BM_elem_flag_set, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACE, BM_ITER_MESH, BM_mesh_bm_from_me(), BM_mesh_create(), BM_mesh_delete_hflag_context(), BM_mesh_elem_hflag_disable_all(), BM_VERT, BM_vert_is_boundary(), BM_VERTS_OF_MESH, BMALLOC_TEMPLATE_FROM_ME, C, CD_MASK_EVERYTHING, CD_PAINT_MASK, CD_SCULPT_FACE_SETS, BMVert::co, CTX_data_active_object(), CTX_data_depsgraph_on_load(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_view3d(), CustomData_free_layers(), Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), DEL_FACES, depsgraph, ED_object_add_type(), ED_object_modifier_add(), ED_object_sculptmode_exit(), edbm_extrude_edges_indiv(), EDBM_op_callf(), eModifierType_Solidify, Mesh::id, Object::id, ID_RECALC_GEOMETRY, Object::loc, View3D::local_view_uuid, View3D::localvd, MEM_freeN, mesh, mul_v3_v3(), NC_GEOM, NC_OBJECT, ND_DATA, ND_MODIFIER, NULL, OB_MESH, SolidifyModifierData::offset, OPERATOR_FINISHED, params, Mesh::pdata, wmOperator::reports, Object::rot, Object::scale, scene, Mesh::totpoly, Mesh::totvert, v, Mesh::vdata, and WM_event_add_notifier().
Referenced by face_set_extract_modal(), and paint_mask_extract_exec().
Definition at line 49 of file editmesh_mask_extract.c.
References SculptSession::bm, C, CTX_data_active_object(), CTX_wm_operator_poll_msg_set(), ED_operator_object_active_editable_mesh(), Object::mode, NULL, OB_MODE_SCULPT, and Object::sculpt.
Referenced by MESH_OT_face_set_extract(), MESH_OT_paint_mask_extract(), and MESH_OT_paint_mask_slice().
Definition at line 308 of file editmesh_mask_extract.c.
References RNA_def_boolean(), and RNA_def_int().
Referenced by MESH_OT_face_set_extract(), and MESH_OT_paint_mask_extract().
|
static |
Definition at line 267 of file editmesh_mask_extract.c.
References blender::math::abs(), bm, BM_EDGE, BM_ELEM_CD_GET_INT, BM_elem_flag_set, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_VERT, CD_SCULPT_FACE_SETS, CustomData_get_offset(), params, and BMesh::pdata.
Referenced by face_set_extract_modal().
|
static |
Definition at line 243 of file editmesh_mask_extract.c.
References bm, BM_EDGE, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_set, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_VERT, BM_VERTS_OF_FACE, CD_PAINT_MASK, CustomData_get_offset(), mask(), params, threshold, v, and BMesh::vdata.
Referenced by paint_mask_extract_exec().
void MESH_OT_face_set_extract | ( | wmOperatorType * | ot | ) |
Definition at line 421 of file editmesh_mask_extract.c.
References wmOperatorType::description, face_set_extract_invoke(), face_set_extract_modal(), wmOperatorType::flag, geometry_extract_poll(), geometry_extract_props(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and wmOperatorType::srna.
Referenced by ED_operatortypes_mesh().
void MESH_OT_paint_mask_extract | ( | wmOperatorType * | ot | ) |
Definition at line 337 of file editmesh_mask_extract.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, geometry_extract_poll(), geometry_extract_props(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_mask_extract_exec(), paint_mask_extract_invoke(), wmOperatorType::poll, RNA_def_float(), and wmOperatorType::srna.
Referenced by ED_operatortypes_mesh().
void MESH_OT_paint_mask_slice | ( | wmOperatorType * | ot | ) |
Definition at line 591 of file editmesh_mask_extract.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, geometry_extract_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_mask_slice_exec(), wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_float(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_mesh().
|
static |
Definition at line 282 of file editmesh_mask_extract.c.
References C, ED_undo_push_op(), geometry_extract_apply(), geometry_extract_tag_masked_faces(), params, wmOperator::ptr, RNA_boolean_get(), RNA_float_get(), and RNA_int_get().
Referenced by MESH_OT_paint_mask_extract().
|
static |
Definition at line 303 of file editmesh_mask_extract.c.
References C, e, and WM_operator_props_popup_confirm().
Referenced by MESH_OT_paint_mask_extract().
|
static |
Definition at line 488 of file editmesh_mask_extract.c.
References BKE_id_copy(), BKE_id_free(), BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_copy_parameters_for_eval(), BKE_mesh_from_bmesh_nomain(), BKE_mesh_nomain_to_mesh(), BKE_sculpt_mask_layers_ensure(), bm, BM_mesh_bm_from_me(), BM_mesh_create(), BM_mesh_free(), BMALLOC_TEMPLATE_FROM_ME, C, CD_MASK_MESH, CD_PAINT_MASK, CD_SCULPT_FACE_SETS, CTX_data_active_object(), CTX_data_main(), CTX_wm_view3d(), CustomData_free_layers(), CustomData_get_layer(), Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), ED_object_add_type(), ED_sculpt_face_sets_find_next_available_id(), ED_sculpt_face_sets_initialize_none_to_id(), ED_sculpt_undo_geometry_begin(), ED_sculpt_undo_geometry_end(), SculptSession::face_sets, Mesh::id, Object::id, ID_RECALC_GEOMETRY, Object::loc, View3D::local_view_uuid, View3D::localvd, mesh, Object::mode, NC_GEOM, NC_OBJECT, ND_DATA, ND_MODIFIER, NULL, OB_MESH, OB_MODE_SCULPT, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_float_get(), Object::rot, Object::sculpt, slice_paint_mask(), Mesh::totvert, Mesh::vdata, and WM_event_add_notifier().
Referenced by MESH_OT_paint_mask_slice().
|
static |
Definition at line 438 of file editmesh_mask_extract.c.
References BLI_assert, bm, BM_EDGE, BM_ELEM_CD_GET_FLOAT, BM_elem_flag_set, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_mesh_delete_hflag_context(), BM_mesh_edgenet(), BM_mesh_elem_hflag_disable_all(), BM_mesh_elem_hflag_enable_all(), BM_mesh_normals_update(), BM_VERT, BM_VERTS_OF_FACE, BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_op_callf(), CD_PAINT_MASK, CustomData_get_offset(), DEL_FACES, invert(), mask(), v, and BMesh::vdata.
Referenced by paint_mask_slice_exec().