Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "DNA_armature_types.h"
#include "DNA_defaults.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
#include "BKE_lib_query.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "MOD_modifiertypes.h"
#include "MOD_ui_common.h"
#include "BLI_array.hh"
#include "BLI_listbase_wrapper.hh"
#include "BLI_vector.hh"
Go to the source code of this file.
Functions | |
static void | initData (ModifierData *md) |
static void | requiredDataMask (Object *UNUSED(ob), ModifierData *UNUSED(md), CustomData_MeshMasks *r_cddata_masks) |
static void | foreachIDLink (ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) |
static void | updateDepsgraph (ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) |
static void | compute_vertex_mask__armature_mode (const MDeformVert *dvert, Mesh *mesh, Object *armature_ob, float threshold, MutableSpan< bool > r_vertex_mask) |
static void | compute_vertex_mask__vertex_group_mode (const MDeformVert *dvert, int defgrp_index, float threshold, MutableSpan< bool > r_vertex_mask) |
static void | invert_boolean_array (MutableSpan< bool > array) |
static void | compute_masked_vertices (Span< bool > vertex_mask, MutableSpan< int > r_vertex_map, uint *r_verts_masked_num) |
static void | computed_masked_edges (const Mesh *mesh, Span< bool > vertex_mask, MutableSpan< int > r_edge_map, uint *r_edges_masked_num) |
static void | computed_masked_edges_smooth (const Mesh *mesh, Span< bool > vertex_mask, MutableSpan< int > r_edge_map, uint *r_edges_masked_num, uint *r_verts_add_num) |
static void | computed_masked_polygons (const Mesh *mesh, Span< bool > vertex_mask, Vector< int > &r_masked_poly_indices, Vector< int > &r_loop_starts, uint *r_polys_masked_num, uint *r_loops_masked_num) |
static void | compute_interpolated_polygons (const Mesh *mesh, Span< bool > vertex_mask, uint verts_add_num, uint loops_masked_num, Vector< int > &r_masked_poly_indices, Vector< int > &r_loop_starts, uint *r_edges_add_num, uint *r_polys_add_num, uint *r_loops_add_num) |
static void | copy_masked_vertices_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_map) |
static float | get_interp_factor_from_vgroup (const MDeformVert *dvert, int defgrp_index, float threshold, uint v1, uint v2) |
static void | add_interp_verts_copy_edges_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< bool > vertex_mask, Span< int > vertex_map, const MDeformVert *dvert, int defgrp_index, float threshold, uint edges_masked_num, uint verts_add_num, MutableSpan< int > r_edge_map) |
static void | copy_masked_edges_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_map, Span< int > edge_map) |
static void | copy_masked_polys_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_map, Span< int > edge_map, Span< int > masked_poly_indices, Span< int > new_loop_starts, int polys_masked_num) |
static void | add_interpolated_polys_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< bool > vertex_mask, Span< int > vertex_map, Span< int > edge_map, const MDeformVert *dvert, int defgrp_index, float threshold, Span< int > masked_poly_indices, Span< int > new_loop_starts, int polys_masked_num, int edges_add_num) |
static Mesh * | modifyMesh (ModifierData *md, const ModifierEvalContext *UNUSED(ctx), Mesh *mesh) |
static bool | isDisabled (const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams)) |
static void | panel_draw (const bContext *UNUSED(C), Panel *panel) |
static void | panelRegister (ARegionType *region_type) |
Variables | |
ModifierTypeInfo | modifierType_Mask |
|
static |
Definition at line 359 of file MOD_mask.cc.
References BLI_assert, BMVert::co, CustomData_copy_data(), CustomData_interp(), Mesh::edata, get_interp_factor_from_vgroup(), interp_v3_v3v3(), Mesh::medge, Mesh::mvert, blender::Span< T >::size(), blender::MutableSpan< T >::size(), threshold, Mesh::totedge, Mesh::totvert, v, v1, MEdge::v1, v2, MEdge::v2, and Mesh::vdata.
Referenced by modifyMesh().
|
static |
Definition at line 476 of file MOD_mask.cc.
References BLI_assert, CustomData_copy_data(), CustomData_interp(), MLoop::e, MEdge::flag, get_interp_factor_from_vgroup(), if(), blender::Span< T >::index_range(), indices, Mesh::ldata, MPoly::loopstart, ME_EDGEDRAW, ME_EDGERENDER, Mesh::medge, Mesh::mloop, Mesh::mpoly, Mesh::pdata, blender::Span< T >::size(), threshold, Mesh::totedge, Mesh::totloop, MPoly::totloop, v, MLoop::v, MEdge::v1, and MEdge::v2.
Referenced by modifyMesh().
|
static |
Definition at line 260 of file MOD_mask.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, if(), blender::Span< T >::index_range(), MPoly::loopstart, mesh, Mesh::mloop, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), MPoly::totloop, Mesh::totpoly, Mesh::totvert, and MLoop::v.
Referenced by modifyMesh().
|
static |
Definition at line 146 of file MOD_mask.cc.
References BLI_assert, blender::MutableSpan< T >::index_range(), blender::Span< T >::size(), and blender::MutableSpan< T >::size().
Referenced by modifyMesh().
|
static |
Definition at line 94 of file MOD_mask.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_pose_channel_find_name(), bPoseChannel::bone, BONE_SELECTED, Bone::flag, blender::Span< T >::get(), blender::MutableSpan< T >::index_range(), LISTBASE_FOREACH, mesh, Object::pose, threshold, and Mesh::vertex_group_names.
Referenced by modifyMesh().
|
static |
Definition at line 128 of file MOD_mask.cc.
References BKE_defvert_find_weight(), blender::MutableSpan< T >::index_range(), and threshold.
Referenced by modifyMesh().
|
static |
Definition at line 166 of file MOD_mask.cc.
References BLI_assert, Mesh::medge, mesh, blender::MutableSpan< T >::size(), and Mesh::totedge.
Referenced by modifyMesh().
|
static |
Definition at line 190 of file MOD_mask.cc.
References BLI_assert, Mesh::medge, mesh, blender::MutableSpan< T >::size(), Mesh::totedge, v1, and v2.
Referenced by modifyMesh().
|
static |
Definition at line 224 of file MOD_mask.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), BLI_assert, MPoly::loopstart, mesh, Mesh::mloop, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), MPoly::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by modifyMesh().
|
static |
Definition at line 422 of file MOD_mask.cc.
References BLI_assert, CustomData_copy_data(), Mesh::edata, ELEM, Mesh::medge, blender::Span< T >::size(), Mesh::totedge, Mesh::totvert, MEdge::v1, and MEdge::v2.
Referenced by modifyMesh().
|
static |
Definition at line 445 of file MOD_mask.cc.
References CustomData_copy_data(), MLoop::e, Mesh::ldata, MPoly::loopstart, Mesh::mloop, Mesh::mpoly, Mesh::pdata, MPoly::totloop, and MLoop::v.
Referenced by modifyMesh().
|
static |
Definition at line 330 of file MOD_mask.cc.
References BLI_assert, CustomData_copy_data(), blender::Span< T >::index_range(), Mesh::mvert, blender::Span< T >::size(), Mesh::totvert, and Mesh::vdata.
Referenced by modifyMesh().
|
static |
Definition at line 74 of file MOD_mask.cc.
References IDWALK_CB_NOP, and MaskModifierData::ob_arm.
|
static |
Definition at line 349 of file MOD_mask.cc.
References BKE_defvert_find_weight(), threshold, v1, and v2.
Referenced by add_interp_verts_copy_edges_to_new_mesh(), and add_interpolated_polys_to_new_mesh().
|
static |
Definition at line 58 of file MOD_mask.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
Definition at line 139 of file MOD_mask.cc.
Referenced by modifyMesh().
|
static |
Definition at line 756 of file MOD_mask.cc.
References MaskModifierData::ob_arm, OB_ARMATURE, and Object::type.
|
static |
Definition at line 614 of file MOD_mask.cc.
References add_interp_verts_copy_edges_to_new_mesh(), add_interpolated_polys_to_new_mesh(), BKE_id_defgroup_name_index(), BKE_mesh_calc_edges_loose(), BKE_mesh_new_nomain_from_template(), BLI_assert, BLI_listbase_is_empty(), CD_MDEFORMVERT, compute_interpolated_polygons(), compute_masked_vertices(), compute_vertex_mask__armature_mode(), compute_vertex_mask__vertex_group_mode(), computed_masked_edges(), computed_masked_edges_smooth(), computed_masked_polygons(), copy_masked_edges_to_new_mesh(), copy_masked_polys_to_new_mesh(), copy_masked_vertices_to_new_mesh(), CustomData_get_layer(), ELEM, MaskModifierData::flag, Mesh::id, invert_boolean_array(), mesh, MOD_MASK_INV, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP, MOD_MASK_SMOOTH, MaskModifierData::mode, MaskModifierData::ob_arm, Object::pose, result, MaskModifierData::threshold, Mesh::totedge, Mesh::totvert, Mesh::vdata, Mesh::vertex_group_names, and MaskModifierData::vgroup.
Definition at line 770 of file MOD_mask.cc.
References Panel::layout, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP, modifier_panel_end(), modifier_panel_get_property_pointers(), modifier_vgroup_ui(), ptr, RNA_enum_get(), UI_ITEM_R_EXPAND, uiItemR(), uiLayoutRow(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by panelRegister().
|
static |
Definition at line 801 of file MOD_mask.cc.
References eModifierType_Mask, modifier_panel_register(), and panel_draw().
|
static |
Definition at line 67 of file MOD_mask.cc.
References CD_MASK_MDEFORMVERT, and CustomData_MeshMasks::vmask.
|
static |
Definition at line 80 of file MOD_mask.cc.
References ARM_HAS_VIZ_DEPS, Object::data, DEG_add_modifier_to_transform_relation(), DEG_add_object_relation(), DEG_OB_COMP_TRANSFORM, bArmature::flag, ModifierUpdateDepsgraphContext::node, and MaskModifierData::ob_arm.
ModifierTypeInfo modifierType_Mask |
Definition at line 806 of file MOD_mask.cc.