Blender V4.3
mesh_data.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
#include "BLI_array.hh"
#include "BLI_utildefines.h"
#include "BKE_attribute.hh"
#include "BKE_context.hh"
#include "BKE_customdata.hh"
#include "BKE_editmesh.hh"
#include "BKE_key.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_runtime.hh"
#include "BKE_report.hh"
#include "DEG_depsgraph.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "BLT_translation.hh"
#include "ED_mesh.hh"
#include "ED_object.hh"
#include "ED_paint.hh"
#include "ED_screen.hh"
#include "GEO_mesh_split_edges.hh"
#include "mesh_intern.hh"

Go to the source code of this file.

Functions

static CustomDatamesh_customdata_get_type (Mesh *mesh, const char htype, int *r_tot)
 
static void mesh_uv_reset_array (float **fuv, const int len)
 
static void mesh_uv_reset_bmface (BMFace *f, const int cd_loop_uv_offset)
 
static void mesh_uv_reset_mface (const blender::IndexRange face, float2 *mloopuv)
 
void ED_mesh_uv_loop_reset_ex (Mesh *mesh, const int layernum)
 
void ED_mesh_uv_loop_reset (bContext *C, Mesh *mesh)
 
int ED_mesh_uv_add (Mesh *mesh, const char *name, const bool active_set, const bool do_init, ReportList *reports)
 
static const bool * mesh_loop_boolean_custom_data_get_by_name (const Mesh &mesh, const char *name)
 
const bool * ED_mesh_uv_map_vert_select_layer_get (const Mesh *mesh, const int uv_index)
 
const bool * ED_mesh_uv_map_edge_select_layer_get (const Mesh *mesh, const int uv_index)
 
const bool * ED_mesh_uv_map_pin_layer_get (const Mesh *mesh, const int uv_index)
 
static bool * ensure_corner_boolean_attribute (Mesh &mesh, const blender::StringRefNull name)
 
bool * ED_mesh_uv_map_vert_select_layer_ensure (Mesh *mesh, const int uv_index)
 
bool * ED_mesh_uv_map_edge_select_layer_ensure (Mesh *mesh, const int uv_index)
 
bool * ED_mesh_uv_map_pin_layer_ensure (Mesh *mesh, const int uv_index)
 
void ED_mesh_uv_ensure (Mesh *mesh, const char *name)
 
int ED_mesh_color_add (Mesh *mesh, const char *name, const bool active_set, const bool do_init, ReportList *reports)
 
bool ED_mesh_color_ensure (Mesh *mesh, const char *name)
 
static bool layers_poll (bContext *C)
 
static bool uv_texture_remove_poll (bContext *C)
 
static int mesh_uv_texture_add_exec (bContext *C, wmOperator *op)
 
void MESH_OT_uv_texture_add (wmOperatorType *ot)
 
static int mesh_uv_texture_remove_exec (bContext *C, wmOperator *op)
 
void MESH_OT_uv_texture_remove (wmOperatorType *ot)
 
static int mesh_customdata_clear_exec__internal (bContext *C, char htype, const eCustomDataType type)
 
static bool mesh_customdata_mask_clear_poll (bContext *C)
 
static int mesh_customdata_mask_clear_exec (bContext *C, wmOperator *op)
 
void MESH_OT_customdata_mask_clear (wmOperatorType *ot)
 
static int mesh_customdata_skin_state (bContext *C)
 
static bool mesh_customdata_skin_add_poll (bContext *C)
 
static int mesh_customdata_skin_add_exec (bContext *C, wmOperator *)
 
void MESH_OT_customdata_skin_add (wmOperatorType *ot)
 
static bool mesh_customdata_skin_clear_poll (bContext *C)
 
static int mesh_customdata_skin_clear_exec (bContext *C, wmOperator *)
 
void MESH_OT_customdata_skin_clear (wmOperatorType *ot)
 
static int mesh_customdata_custom_splitnormals_add_exec (bContext *C, wmOperator *)
 
void MESH_OT_customdata_custom_splitnormals_add (wmOperatorType *ot)
 
static int mesh_customdata_custom_splitnormals_clear_exec (bContext *C, wmOperator *)
 
void MESH_OT_customdata_custom_splitnormals_clear (wmOperatorType *ot)
 
static void mesh_add_verts (Mesh *mesh, int len)
 
static void mesh_add_edges (Mesh *mesh, int len)
 
static void mesh_add_loops (Mesh *mesh, int len)
 
static void mesh_add_faces (Mesh *mesh, int len)
 
void ED_mesh_report_mirror_ex (wmOperator *op, int totmirr, int totfail, char selectmode)
 
void ED_mesh_report_mirror (wmOperator *op, int totmirr, int totfail)
 
KeyBlockED_mesh_get_edit_shape_key (const Mesh *me)
 
MeshED_mesh_context (bContext *C)
 
void ED_mesh_split_faces (Mesh *mesh)
 
Add Geometry
void ED_mesh_verts_add (Mesh *mesh, ReportList *reports, int count)
 
void ED_mesh_edges_add (Mesh *mesh, ReportList *reports, int count)
 
void ED_mesh_loops_add (Mesh *mesh, ReportList *reports, int count)
 
void ED_mesh_faces_add (Mesh *mesh, ReportList *reports, int count)
 
Remove Geometry
static void mesh_remove_verts (Mesh *mesh, int len)
 
static void mesh_remove_edges (Mesh *mesh, int len)
 
static void mesh_remove_loops (Mesh *mesh, int len)
 
static void mesh_remove_faces (Mesh *mesh, int len)
 
void ED_mesh_verts_remove (Mesh *mesh, ReportList *reports, int count)
 
void ED_mesh_edges_remove (Mesh *mesh, ReportList *reports, int count)
 
void ED_mesh_loops_remove (Mesh *mesh, ReportList *reports, int count)
 
void ED_mesh_faces_remove (Mesh *mesh, ReportList *reports, int count)
 
void ED_mesh_geometry_clear (Mesh *mesh)
 

Function Documentation

◆ ED_mesh_color_add()

◆ ED_mesh_color_ensure()

◆ ED_mesh_context()

◆ ED_mesh_edges_add()

void ED_mesh_edges_add ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 949 of file mesh_data.cc.

References BKE_report(), count, mesh_add_edges(), and RPT_ERROR.

◆ ED_mesh_edges_remove()

void ED_mesh_edges_remove ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 1040 of file mesh_data.cc.

References BKE_report(), count, mesh_remove_edges(), and RPT_ERROR.

◆ ED_mesh_faces_add()

void ED_mesh_faces_add ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 967 of file mesh_data.cc.

References BKE_report(), count, mesh_add_faces(), and RPT_ERROR.

◆ ED_mesh_faces_remove()

void ED_mesh_faces_remove ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 1068 of file mesh_data.cc.

References BKE_report(), count, mesh_remove_faces(), and RPT_ERROR.

◆ ED_mesh_geometry_clear()

void ED_mesh_geometry_clear ( Mesh * mesh)

◆ ED_mesh_get_edit_shape_key()

KeyBlock * ED_mesh_get_edit_shape_key ( const Mesh * me)

◆ ED_mesh_loops_add()

void ED_mesh_loops_add ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 958 of file mesh_data.cc.

References BKE_report(), count, mesh_add_loops(), and RPT_ERROR.

◆ ED_mesh_loops_remove()

void ED_mesh_loops_remove ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 1054 of file mesh_data.cc.

References BKE_report(), count, mesh_remove_loops(), and RPT_ERROR.

◆ ED_mesh_report_mirror()

void ED_mesh_report_mirror ( wmOperator * op,
int totmirr,
int totfail )

◆ ED_mesh_report_mirror_ex()

void ED_mesh_report_mirror_ex ( wmOperator * op,
int totmirr,
int totfail,
char selectmode )

◆ ED_mesh_split_faces()

void ED_mesh_split_faces ( Mesh * mesh)

Split all edges that would appear sharp based on face and edge sharpness tags and the auto smooth angle.

Definition at line 1147 of file mesh_data.cc.

References blender::VArrayCommon< T >::materialize().

Referenced by blender::ed::object::bake_mesh_new_from_object().

◆ ED_mesh_uv_add()

◆ ED_mesh_uv_ensure()

◆ ED_mesh_uv_loop_reset()

void ED_mesh_uv_loop_reset ( bContext * C,
Mesh * mesh )

◆ ED_mesh_uv_loop_reset_ex()

◆ ED_mesh_uv_map_edge_select_layer_ensure()

bool * ED_mesh_uv_map_edge_select_layer_ensure ( Mesh * mesh,
const int uv_index )

◆ ED_mesh_uv_map_edge_select_layer_get()

const bool * ED_mesh_uv_map_edge_select_layer_get ( const Mesh * mesh,
const int uv_index )

◆ ED_mesh_uv_map_pin_layer_ensure()

bool * ED_mesh_uv_map_pin_layer_ensure ( Mesh * mesh,
const int uv_index )

◆ ED_mesh_uv_map_pin_layer_get()

const bool * ED_mesh_uv_map_pin_layer_get ( const Mesh * mesh,
const int uv_index )

◆ ED_mesh_uv_map_vert_select_layer_ensure()

bool * ED_mesh_uv_map_vert_select_layer_ensure ( Mesh * mesh,
const int uv_index )

◆ ED_mesh_uv_map_vert_select_layer_get()

const bool * ED_mesh_uv_map_vert_select_layer_get ( const Mesh * mesh,
const int uv_index )

◆ ED_mesh_verts_add()

void ED_mesh_verts_add ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 940 of file mesh_data.cc.

References BKE_report(), count, mesh_add_verts(), and RPT_ERROR.

◆ ED_mesh_verts_remove()

void ED_mesh_verts_remove ( Mesh * mesh,
ReportList * reports,
int count )

Definition at line 1026 of file mesh_data.cc.

References BKE_report(), count, mesh_remove_verts(), and RPT_ERROR.

◆ ensure_corner_boolean_attribute()

◆ layers_poll()

static bool layers_poll ( bContext * C)
static

◆ mesh_add_edges()

◆ mesh_add_faces()

◆ mesh_add_loops()

◆ mesh_add_verts()

◆ mesh_customdata_clear_exec__internal()

◆ mesh_customdata_custom_splitnormals_add_exec()

◆ mesh_customdata_custom_splitnormals_clear_exec()

◆ mesh_customdata_get_type()

◆ mesh_customdata_mask_clear_exec()

◆ mesh_customdata_mask_clear_poll()

◆ mesh_customdata_skin_add_exec()

◆ mesh_customdata_skin_add_poll()

static bool mesh_customdata_skin_add_poll ( bContext * C)
static

Definition at line 653 of file mesh_data.cc.

References mesh_customdata_skin_state().

Referenced by MESH_OT_customdata_skin_add().

◆ mesh_customdata_skin_clear_exec()

static int mesh_customdata_skin_clear_exec ( bContext * C,
wmOperator *  )
static

◆ mesh_customdata_skin_clear_poll()

static bool mesh_customdata_skin_clear_poll ( bContext * C)
static

Definition at line 686 of file mesh_data.cc.

References mesh_customdata_skin_state().

Referenced by MESH_OT_customdata_skin_clear().

◆ mesh_customdata_skin_state()

static int mesh_customdata_skin_state ( bContext * C)
static

◆ mesh_loop_boolean_custom_data_get_by_name()

static const bool * mesh_loop_boolean_custom_data_get_by_name ( const Mesh & mesh,
const char * name )
static

◆ MESH_OT_customdata_custom_splitnormals_add()

◆ MESH_OT_customdata_custom_splitnormals_clear()

◆ MESH_OT_customdata_mask_clear()

◆ MESH_OT_customdata_skin_add()

◆ MESH_OT_customdata_skin_clear()

◆ MESH_OT_uv_texture_add()

◆ MESH_OT_uv_texture_remove()

◆ mesh_remove_edges()

static void mesh_remove_edges ( Mesh * mesh,
int len )
static

◆ mesh_remove_faces()

static void mesh_remove_faces ( Mesh * mesh,
int len )
static

◆ mesh_remove_loops()

static void mesh_remove_loops ( Mesh * mesh,
int len )
static

◆ mesh_remove_verts()

static void mesh_remove_verts ( Mesh * mesh,
int len )
static

◆ mesh_uv_reset_array()

static void mesh_uv_reset_array ( float ** fuv,
const int len )
static

Definition at line 111 of file mesh_data.cc.

References cosf, float, len, M_PI, and sinf.

Referenced by mesh_uv_reset_bmface(), and mesh_uv_reset_mface().

◆ mesh_uv_reset_bmface()

static void mesh_uv_reset_bmface ( BMFace * f,
const int cd_loop_uv_offset )
static

◆ mesh_uv_reset_mface()

static void mesh_uv_reset_mface ( const blender::IndexRange face,
float2 * mloopuv )
static

◆ mesh_uv_texture_add_exec()

◆ mesh_uv_texture_remove_exec()

◆ uv_texture_remove_poll()

static bool uv_texture_remove_poll ( bContext * C)
static