Blender  V2.93
Functions | Variables
MOD_mask.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_listbase.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 "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 (MDeformVert *dvert, Object *ob, Object *armature_ob, float threshold, MutableSpan< bool > r_vertex_mask)
 
static void compute_vertex_mask__vertex_group_mode (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_num_masked_vertices)
 
static void computed_masked_edges (const Mesh *mesh, Span< bool > vertex_mask, MutableSpan< int > r_edge_map, uint *r_num_masked_edges)
 
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_num_masked_polys, uint *r_num_masked_loops)
 
static void copy_masked_vertices_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_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)
 
static MeshmodifyMesh (ModifierData *md, const ModifierEvalContext *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
 

Function Documentation

◆ compute_masked_vertices()

static void compute_masked_vertices ( Span< bool >  vertex_mask,
MutableSpan< int >  r_vertex_map,
uint r_num_masked_vertices 
)
static

◆ compute_vertex_mask__armature_mode()

static void compute_vertex_mask__armature_mode ( MDeformVert dvert,
Object ob,
Object armature_ob,
float  threshold,
MutableSpan< bool >  r_vertex_mask 
)
static

◆ compute_vertex_mask__vertex_group_mode()

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

Definition at line 142 of file MOD_mask.cc.

References BKE_defvert_find_weight(), and blender::MutableSpan< T >::index_range().

Referenced by modifyMesh().

◆ computed_masked_edges()

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

◆ computed_masked_polygons()

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_num_masked_polys,
uint r_num_masked_loops 
)
static

◆ copy_masked_edges_to_new_mesh()

static 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_polys_to_new_mesh()

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 
)
static

◆ copy_masked_vertices_to_new_mesh()

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

◆ foreachIDLink()

static void foreachIDLink ( ModifierData md,
Object ob,
IDWalkFunc  walk,
void *  userData 
)
static

Definition at line 88 of file MOD_mask.cc.

References IDWALK_CB_NOP, and MaskModifierData::ob_arm.

◆ initData()

static void initData ( ModifierData md)
static

◆ invert_boolean_array()

static void invert_boolean_array ( MutableSpan< bool >  array)
static

Definition at line 153 of file MOD_mask.cc.

Referenced by modifyMesh().

◆ isDisabled()

static bool isDisabled ( const struct Scene UNUSEDscene,
ModifierData md,
bool   UNUSEDuseRenderParams 
)
static

Definition at line 397 of file MOD_mask.cc.

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

◆ modifyMesh()

static Mesh* modifyMesh ( ModifierData md,
const ModifierEvalContext ctx,
Mesh mesh 
)
static

◆ panel_draw()

static void panel_draw ( const bContext UNUSEDC,
Panel panel 
)
static

◆ panelRegister()

static void panelRegister ( ARegionType region_type)
static

Definition at line 441 of file MOD_mask.cc.

References eModifierType_Mask, modifier_panel_register(), and panel_draw().

◆ requiredDataMask()

static void requiredDataMask ( Object UNUSEDob,
ModifierData UNUSEDmd,
CustomData_MeshMasks r_cddata_masks 
)
static

Definition at line 81 of file MOD_mask.cc.

References CD_MASK_MDEFORMVERT, and CustomData_MeshMasks::vmask.

◆ updateDepsgraph()

static void updateDepsgraph ( ModifierData md,
const ModifierUpdateDepsgraphContext ctx 
)
static

Variable Documentation

◆ modifierType_Mask

ModifierTypeInfo modifierType_Mask

Definition at line 446 of file MOD_mask.cc.