Blender V5.3
mesh.cc File Reference
#include <optional>
#include "MEM_guardedalloc.h"
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_array_utils.hh"
#include "BLI_bounds.hh"
#include "BLI_hash_c.hh"
#include "BLI_implicit_sharing.hh"
#include "BLI_index_range.hh"
#include "BLI_listbase.hh"
#include "BLI_math_matrix.hh"
#include "BLI_math_vector.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_memory_counter.hh"
#include "BLI_resource_scope.hh"
#include "BLI_set.hh"
#include "BLI_span.hh"
#include "BLI_string.hh"
#include "BLI_task.hh"
#include "BLI_time.hh"
#include "BLI_utildefines.hh"
#include "BLI_vector.hh"
#include "BLI_virtual_array.hh"
#include "BLT_translation.hh"
#include "BKE_anim_data.hh"
#include "BKE_anonymous_attribute_id.hh"
#include "BKE_attribute.hh"
#include "BKE_attribute_legacy_convert.hh"
#include "BKE_attribute_storage.hh"
#include "BKE_attribute_storage_blend_write.hh"
#include "BKE_bake_data_block_id.hh"
#include "BKE_bpath.hh"
#include "BKE_deform.hh"
#include "BKE_editmesh.hh"
#include "BKE_editmesh_cache.hh"
#include "BKE_global.hh"
#include "BKE_idtype.hh"
#include "BKE_key.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_main.hh"
#include "BKE_material.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_legacy_convert.hh"
#include "BKE_mesh_runtime.hh"
#include "BKE_mesh_wrapper.hh"
#include "BKE_modifier.hh"
#include "BKE_multires.hh"
#include "BKE_object.hh"
#include "BKE_paint_bvh.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "BLO_read_write.hh"
#include "CLG_log.h"
#include "attribute_storage_access.hh"

Go to the source code of this file.

Classes

struct  blender::bke::NonContiguousGroup

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::bke
namespace  blender::bke::mesh

Macros

#define DNA_DEPRECATED_ALLOW
#define STACK_FIXED_DEPTH   100
#define MAT_NR_REMAP(n)

Functions

static void blender::mesh_tessface_clear_intern (Mesh *mesh, int free_customdata)
static void blender::mesh_init_data (ID *id)
static void blender::mesh_copy_data (Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag)
static void blender::mesh_free_data (ID *id)
static void blender::mesh_foreach_id (ID *id, LibraryForeachIDData *data)
static void blender::mesh_foreach_path (ID *id, BPathForeachPathData *bpath_data)
static void blender::mesh_foreach_working_space_color (ID *id, const IDTypeForeachColorFunctionCallback &fn)
static void blender::mesh_blend_write (BlendWriter *writer, ID *id, const void *id_address)
static void blender::mesh_blend_read_data (BlendDataReader *reader, ID *id)
bool blender::BKE_mesh_attribute_required (StringRef name)
void blender::BKE_mesh_ensure_skin_customdata (Mesh *mesh)
bool blender::BKE_mesh_has_custom_loop_normals (Mesh *mesh)
static StringRefNull blender::bke::get_first_uv_map_name (const Mesh &mesh)
static Bounds< float3 > blender::bke::merge_bounds (const Bounds< float3 > &a, const Bounds< float3 > &b)
static Bounds< float3 > blender::bke::negative_bounds ()
static void blender::bke::partition_faces_recursively (const Span< float3 > face_centers, MutableSpan< int > face_indices, Vector< NonContiguousGroup > &groups, int node_index, int depth, const std::optional< Bounds< float3 > > &bounds_precalc, const Span< int > material_indices, int target_group_size)
static void blender::bke::build_vertex_groups_for_leaves (const int verts_num, const OffsetIndices< int > faces, const Span< int > corner_verts, Vector< NonContiguousGroup > &groups)
static Vector< NonContiguousGroup > blender::bke::compute_local_mesh_groups (Mesh &mesh)
static void blender::mesh_clear_geometry (Mesh &mesh)
static void blender::clear_attribute_names (Mesh &mesh)
void blender::BKE_mesh_clear_geometry (Mesh *mesh)
void blender::BKE_mesh_clear_geometry_and_metadata (Mesh *mesh)
Mesh * blender::BKE_mesh_add (Main *bmain, const char *name)
void blender::BKE_mesh_face_offsets_ensure_alloc (Mesh *mesh)
Mesh * blender::BKE_mesh_new_nomain (int verts_num, int edges_num, int faces_num, int corners_num)
bool blender::bke::mesh::is_uv_map (const AttributeMetaData &meta_data)
bool blender::bke::mesh::is_uv_map (const std::optional< AttributeMetaData > &meta_data)
bool blender::bke::mesh::is_color_attribute (const AttributeMetaData &meta_data)
bool blender::bke::mesh::is_color_attribute (const std::optional< bke::AttributeMetaData > &meta_data)
static void blender::copy_attribute_names (const Mesh &mesh_src, Mesh &mesh_dst)
void blender::BKE_mesh_copy_parameters (Mesh *me_dst, const Mesh *me_src)
void blender::BKE_mesh_copy_parameters_for_eval (Mesh *me_dst, const Mesh *me_src)
Mesh * blender::BKE_mesh_new_nomain_from_template_ex (const Mesh *me_src, int verts_num, int edges_num, int tessface_num, int faces_num, int corners_num, CustomData_MeshMasks mask)
Mesh * blender::BKE_mesh_new_nomain_from_template (const Mesh *me_src, int verts_num, int edges_num, int faces_num, int corners_num)
Mesh * blender::BKE_mesh_copy_for_eval (const Mesh &source)
BMesh * blender::BKE_mesh_to_bmesh_ex (const Mesh *mesh, const BMeshCreateParams *create_params, const BMeshFromMeshParams *convert_params)
BMesh * blender::BKE_mesh_to_bmesh (Mesh *mesh, int active_shapekey, bool add_key_index, const BMeshCreateParams *params)
Mesh * blender::BKE_mesh_from_bmesh_nomain (BMesh *bm, const BMeshToMeshParams *params, const Mesh *me_settings)
Mesh * blender::BKE_mesh_from_bmesh_for_eval_nomain (BMesh *bm, const CustomData_MeshMasks *cd_mask_extra, const Mesh *me_settings)
static void blender::ensure_orig_index_layer (CustomData &data, const int size)
void blender::BKE_mesh_ensure_default_orig_index_customdata (Mesh *mesh)
void blender::BKE_mesh_ensure_default_orig_index_customdata_no_check (Mesh *mesh)
void blender::BKE_mesh_texspace_calc (Mesh *mesh)
void blender::BKE_mesh_texspace_ensure (Mesh *mesh)
void blender::BKE_mesh_texspace_get (Mesh *mesh, float r_texspace_location[3], float r_texspace_size[3])
void blender::BKE_mesh_texspace_get_reference (Mesh *mesh, char **r_texspace_flag, float **r_texspace_location, float **r_texspace_size)
Array< float3 > blender::BKE_mesh_orco_verts_get (const Object *ob)
void blender::BKE_mesh_orco_verts_transform (Mesh *mesh, MutableSpan< float3 > orco, bool invert)
void blender::BKE_mesh_orco_verts_transform (Mesh *mesh, float(*orco)[3], int totvert, bool invert)
void blender::BKE_mesh_orco_ensure (Object *ob, Mesh *mesh)
Mesh * blender::BKE_mesh_from_object (Object *ob)
void blender::BKE_mesh_assign_object (Main *bmain, Object *ob, Mesh *mesh)
void blender::BKE_mesh_material_index_remove (Mesh *mesh, short index)
bool blender::BKE_mesh_material_index_used (Mesh *mesh, short index)
void blender::BKE_mesh_material_index_clear (Mesh *mesh)
void blender::BKE_mesh_material_remap (Mesh *mesh, const unsigned int *remap, unsigned int remap_len)
static bool blender::use_bmesh_material_indices (const Mesh &mesh)
static void blender::bke::translate_positions (MutableSpan< float3 > positions, const float3 &translation)
void blender::BKE_mesh_tessface_clear (Mesh *mesh)
void blender::BKE_mesh_mselect_clear (Mesh *mesh)
void blender::BKE_mesh_mselect_validate (Mesh *mesh)
int blender::BKE_mesh_mselect_find (const Mesh *mesh, int index, eMSelect_Type type)
int blender::BKE_mesh_mselect_active_get (const Mesh *mesh, eMSelect_Type type)
void blender::BKE_mesh_mselect_active_set (Mesh *mesh, int index, eMSelect_Type type)
void blender::BKE_mesh_count_selected_items (const Mesh *mesh, int r_count[3])
void blender::BKE_mesh_eval_geometry (Depsgraph *depsgraph, Mesh *mesh)
Topology Queries
void blender::bke::mesh_ensure_default_color_attribute_on_add (Mesh &mesh, StringRef name, AttrDomain domain, bke::AttrType data_type)
void blender::bke::mesh_ensure_default_uv_attribute_on_add (Mesh &mesh, StringRef name, AttrDomain domain, bke::AttrType data_type)
void blender::bke::mesh_ensure_required_data_layers (Mesh &mesh)
void blender::bke::mesh_ensure_active_uv_map (Mesh &mesh)
void blender::bke::mesh_ensure_default_uv_map (Mesh &mesh)
void blender::bke::mesh_remove_invalid_attribute_strings (Mesh &mesh)
void blender::bke::mesh_apply_spatial_organization (Mesh &mesh)
Mesh * blender::bke::mesh_new_no_attributes (int verts_num, int edges_num, int faces_num, int corners_num)
void blender::bke::mesh_smooth_set (Mesh &mesh, bool use_smooth, bool keep_sharp_edges=false)
void blender::bke::mesh_sharp_edges_set_from_angle (Mesh &mesh, float angle, bool keep_sharp_edges=false)
void blender::bke::mesh_translate (Mesh &mesh, const float3 &translation, bool do_shape_keys)
void blender::bke::mesh_transform (Mesh &mesh, const float4x4 &transform, bool do_shape_keys)

Variables

static CLG_LogRef blender::LOG = {"geom.mesh"}

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 14 of file blenkernel/intern/mesh.cc.

◆ MAT_NR_REMAP

#define MAT_NR_REMAP ( n)
Value:
if (n < remap_len_short) { \
BLI_assert(n >= 0 && remap[n] < remap_len_short); \
n = remap[n]; \
} \
((void)0)

◆ STACK_FIXED_DEPTH

#define STACK_FIXED_DEPTH   100

Using STACK_FIXED_DEPTH to keep the implementation in line with pbvh.cc.

Definition at line 85 of file blenkernel/intern/mesh.cc.

Referenced by blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), and blender::bke::partition_faces_recursively().