Blender V5.0
mesh_data.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_array.hh"
#include "BLI_math_constants.h"
#include "BKE_attribute.hh"
#include "BKE_context.hh"
#include "BKE_customdata.hh"
#include "BKE_editmesh.hh"
#include "BKE_key.hh"
#include "BKE_library.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.

Typedefs

using float2
using float3

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 reset_uvs_bmesh (BMFace *f, const int cd_loop_uv_offset)
static void reset_uvs_mesh (const blender::IndexRange face, MutableSpan< float2 > uv_map)
static void reset_uv_map (Mesh *mesh, const StringRef name)
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 blender::VArray< bool > get_corner_boolean_attribute (const Mesh &mesh, const StringRef name)
blender::VArray< bool > ED_mesh_uv_map_pin_layer_get (const Mesh *mesh, const int uv_index)
static blender::bke::AttributeWriter< bool > ensure_corner_boolean_attribute (Mesh &mesh, const StringRef name)
blender::bke::AttributeWriter< 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 wmOperatorStatus mesh_uv_texture_add_exec (bContext *C, wmOperator *op)
void MESH_OT_uv_texture_add (wmOperatorType *ot)
static wmOperatorStatus mesh_uv_texture_remove_exec (bContext *C, wmOperator *op)
void MESH_OT_uv_texture_remove (wmOperatorType *ot)
static wmOperatorStatus mesh_customdata_clear_exec__internal (bContext *C, char htype, const eCustomDataType type)
static bool mesh_customdata_mask_clear_poll (bContext *C)
static wmOperatorStatus 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 wmOperatorStatus 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 wmOperatorStatus mesh_customdata_skin_clear_exec (bContext *C, wmOperator *)
void MESH_OT_customdata_skin_clear (wmOperatorType *ot)
static wmOperatorStatus mesh_customdata_custom_splitnormals_add_exec (bContext *C, wmOperator *)
void MESH_OT_customdata_custom_splitnormals_add (wmOperatorType *ot)
static wmOperatorStatus 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 (ReportList &reports, int totmirr, int totfail, char selectmode)
void ED_mesh_report_mirror (ReportList &reports, 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)

Typedef Documentation

◆ float2

Definition at line 618 of file BLI_math_vector_types.hh.

◆ float3

Definition at line 619 of file BLI_math_vector_types.hh.

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 911 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 1002 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 929 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 1030 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 920 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 1016 of file mesh_data.cc.

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

◆ ED_mesh_report_mirror()

void ED_mesh_report_mirror ( ReportList & reports,
int totmirr,
int totfail )

◆ ED_mesh_report_mirror_ex()

void ED_mesh_report_mirror_ex ( ReportList & reports,
int totmirr,
int totfail,
char selectmode )

◆ ED_mesh_split_faces()

◆ 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_map_pin_layer_ensure()

blender::bke::AttributeWriter< bool > ED_mesh_uv_map_pin_layer_ensure ( Mesh * mesh,
const int uv_index )

◆ ED_mesh_uv_map_pin_layer_get()

blender::VArray< bool > ED_mesh_uv_map_pin_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 902 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 988 of file mesh_data.cc.

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

◆ ensure_corner_boolean_attribute()

blender::bke::AttributeWriter< bool > ensure_corner_boolean_attribute ( Mesh & mesh,
const StringRef name )
static

◆ get_corner_boolean_attribute()

blender::VArray< bool > get_corner_boolean_attribute ( const Mesh & mesh,
const StringRef name )
static

◆ layers_poll()

◆ 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()

bool mesh_customdata_skin_add_poll ( bContext * C)
static

Definition at line 611 of file mesh_data.cc.

References C, and mesh_customdata_skin_state().

Referenced by MESH_OT_customdata_skin_add().

◆ mesh_customdata_skin_clear_exec()

wmOperatorStatus mesh_customdata_skin_clear_exec ( bContext * C,
wmOperator *  )
static

Definition at line 649 of file mesh_data.cc.

References BM_VERT, C, CD_MVERT_SKIN, and mesh_customdata_clear_exec__internal().

Referenced by MESH_OT_customdata_skin_clear().

◆ mesh_customdata_skin_clear_poll()

bool mesh_customdata_skin_clear_poll ( bContext * C)
static

Definition at line 644 of file mesh_data.cc.

References C, and mesh_customdata_skin_state().

Referenced by MESH_OT_customdata_skin_clear().

◆ mesh_customdata_skin_state()

int mesh_customdata_skin_state ( bContext * C)
static

◆ MESH_OT_customdata_custom_splitnormals_add()

void MESH_OT_customdata_custom_splitnormals_add ( wmOperatorType * ot)

◆ MESH_OT_customdata_custom_splitnormals_clear()

void MESH_OT_customdata_custom_splitnormals_clear ( wmOperatorType * ot)

◆ MESH_OT_customdata_mask_clear()

void MESH_OT_customdata_mask_clear ( wmOperatorType * ot)

◆ MESH_OT_customdata_skin_add()

void MESH_OT_customdata_skin_add ( wmOperatorType * ot)

◆ MESH_OT_customdata_skin_clear()

void MESH_OT_customdata_skin_clear ( wmOperatorType * ot)

◆ MESH_OT_uv_texture_add()

void MESH_OT_uv_texture_add ( wmOperatorType * ot)

Definition at line 455 of file mesh_data.cc.

References layers_poll(), mesh_uv_texture_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.

Referenced by ED_operatortypes_mesh().

◆ MESH_OT_uv_texture_remove()

void MESH_OT_uv_texture_remove ( wmOperatorType * ot)

◆ mesh_remove_edges()

void mesh_remove_edges ( Mesh * mesh,
int len )
static

◆ mesh_remove_faces()

void mesh_remove_faces ( Mesh * mesh,
int len )
static

◆ mesh_remove_loops()

void mesh_remove_loops ( Mesh * mesh,
int len )
static

◆ mesh_remove_verts()

void mesh_remove_verts ( Mesh * mesh,
int len )
static

◆ mesh_uv_reset_array()

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

Definition at line 112 of file mesh_data.cc.

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

Referenced by reset_uvs_bmesh(), and reset_uvs_mesh().

◆ mesh_uv_texture_add_exec()

◆ mesh_uv_texture_remove_exec()

◆ reset_uv_map()

◆ reset_uvs_bmesh()

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

◆ reset_uvs_mesh()

void reset_uvs_mesh ( const blender::IndexRange face,
MutableSpan< float2 > uv_map )
static

◆ uv_texture_remove_poll()