Blender V5.0
MOD_mask.cc File Reference
#include "BLI_utildefines.h"
#include "BLI_array_utils.hh"
#include "BLI_listbase.h"
#include "BLT_translation.hh"
#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.hh"
#include "BKE_customdata.hh"
#include "BKE_deform.hh"
#include "BKE_lib_query.hh"
#include "BKE_mesh.hh"
#include "BKE_modifier.hh"
#include "UI_interface_layout.hh"
#include "UI_resources.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "DEG_depsgraph_build.hh"
#include "MOD_ui_common.hh"
#include "BLI_array.hh"
#include "BLI_listbase_wrapper.hh"
#include "BLI_vector.hh"

Go to the source code of this file.

Typedefs

using float3
using int2
template<typename T>
using ListBaseWrapper

Functions

static void init_data (ModifierData *md)
static void required_data_mask (ModifierData *, CustomData_MeshMasks *r_cddata_masks)
static void foreach_ID_link (ModifierData *md, Object *ob, IDWalkFunc walk, void *user_data)
static void update_depsgraph (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 compute_masked_verts (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_faces (const Mesh *mesh, Span< bool > vertex_mask, Vector< int > &r_masked_face_indices, Vector< int > &r_loop_starts, uint *r_faces_masked_num, uint *r_loops_masked_num)
static void compute_interpolated_faces (const Mesh *mesh, Span< bool > vertex_mask, uint verts_add_num, uint loops_masked_num, Vector< int > &r_masked_face_indices, Vector< int > &r_loop_starts, uint *r_edges_add_num, uint *r_faces_add_num, uint *r_loops_add_num)
static void copy_masked_verts_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_faces_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_map, Span< int > edge_map, Span< int > masked_face_indices, Span< int > new_loop_starts, int faces_masked_num)
static void add_interpolated_faces_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_face_indices, Span< int > new_loop_starts, int faces_masked_num, int edges_add_num)
static Meshmodify_mesh (ModifierData *md, const ModifierEvalContext *, Mesh *mesh)
static bool is_disabled (const Scene *, ModifierData *md, bool)
static void panel_draw (const bContext *, Panel *panel)
static void panel_register (ARegionType *region_type)

Variables

ModifierTypeInfo modifierType_Mask

Typedef Documentation

◆ float3

Definition at line 619 of file BLI_math_vector_types.hh.

◆ int2

Definition at line 601 of file BLI_math_vector_types.hh.

◆ ListBaseWrapper

template<typename T>
using blender::ListBaseWrapper

Definition at line 99 of file BLI_listbase_wrapper.hh.

Function Documentation

◆ add_interp_verts_copy_edges_to_new_mesh()

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

◆ add_interpolated_faces_to_new_mesh()

void add_interpolated_faces_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_face_indices,
Span< int > new_loop_starts,
int faces_masked_num,
int edges_add_num )
static

◆ compute_interpolated_faces()

void compute_interpolated_faces ( const Mesh * mesh,
Span< bool > vertex_mask,
uint verts_add_num,
uint loops_masked_num,
Vector< int > & r_masked_face_indices,
Vector< int > & r_loop_starts,
uint * r_edges_add_num,
uint * r_faces_add_num,
uint * r_loops_add_num )
static

◆ compute_masked_verts()

void compute_masked_verts ( Span< bool > vertex_mask,
MutableSpan< int > r_vertex_map,
uint * r_verts_masked_num )
static

◆ compute_vertex_mask__armature_mode()

◆ compute_vertex_mask__vertex_group_mode()

void compute_vertex_mask__vertex_group_mode ( const MDeformVert * dvert,
int defgrp_index,
float threshold,
MutableSpan< bool > r_vertex_mask )
static

◆ computed_masked_edges()

void computed_masked_edges ( const Mesh * mesh,
Span< bool > vertex_mask,
MutableSpan< int > r_edge_map,
uint * r_edges_masked_num )
static

Definition at line 155 of file modifiers/intern/MOD_mask.cc.

References BLI_assert, Mesh::edges_num, i, and blender::MutableSpan< T >::size().

Referenced by modify_mesh().

◆ computed_masked_edges_smooth()

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

Definition at line 180 of file modifiers/intern/MOD_mask.cc.

References BLI_assert, Mesh::edges_num, i, blender::MutableSpan< T >::size(), and v2.

Referenced by modify_mesh().

◆ computed_masked_faces()

◆ copy_masked_edges_to_new_mesh()

void copy_masked_edges_to_new_mesh ( const Mesh & src_mesh,
Mesh & dst_mesh,
Span< int > vertex_map,
Span< int > edge_map )
static

◆ copy_masked_faces_to_new_mesh()

void copy_masked_faces_to_new_mesh ( const Mesh & src_mesh,
Mesh & dst_mesh,
Span< int > vertex_map,
Span< int > edge_map,
Span< int > masked_face_indices,
Span< int > new_loop_starts,
int faces_masked_num )
static

◆ copy_masked_verts_to_new_mesh()

void copy_masked_verts_to_new_mesh ( const Mesh & src_mesh,
Mesh & dst_mesh,
Span< int > vertex_map )
static

◆ foreach_ID_link()

void foreach_ID_link ( ModifierData * md,
Object * ob,
IDWalkFunc walk,
void * user_data )
static

Definition at line 68 of file modifiers/intern/MOD_mask.cc.

References IDWALK_CB_NOP, and MaskModifierData::ob_arm.

◆ get_interp_factor_from_vgroup()

float get_interp_factor_from_vgroup ( const MDeformVert * dvert,
int defgrp_index,
float threshold,
uint v1,
uint v2 )
static

◆ init_data()

void init_data ( ModifierData * md)
static

◆ is_disabled()

bool is_disabled ( const Scene * ,
ModifierData * md,
bool  )
static

Definition at line 741 of file modifiers/intern/MOD_mask.cc.

References MaskModifierData::ob_arm, OB_ARMATURE, and Object::type.

◆ modify_mesh()

◆ panel_draw()

◆ panel_register()

void panel_register ( ARegionType * region_type)
static

◆ required_data_mask()

void required_data_mask ( ModifierData * ,
CustomData_MeshMasks * r_cddata_masks )
static

◆ update_depsgraph()

Variable Documentation

◆ modifierType_Mask

ModifierTypeInfo modifierType_Mask

Definition at line 789 of file modifiers/intern/MOD_mask.cc.