Blender  V2.93
Classes | Namespaces | Macros | Functions
geometry_component_mesh.cc File Reference
#include "BLI_listbase.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_attribute_access.hh"
#include "BKE_attribute_math.hh"
#include "BKE_deform.h"
#include "BKE_geometry_set.hh"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "attribute_access_intern.hh"

Go to the source code of this file.

Classes

class  blender::bke::VertexWeightWriteAttribute
 
class  blender::bke::VertexWeightReadAttribute
 
class  blender::bke::VertexGroupsAttributeProvider
 
class  blender::bke::NormalAttributeProvider
 

Namespaces

 blender
 
 blender::bke
 

Macros

#define MAKE_MUTABLE_CUSTOM_DATA_GETTER(NAME)
 
#define MAKE_CONST_CUSTOM_DATA_GETTER(NAME)
 

Functions

MDeformVertBKE_object_defgroup_data_create (ID *id)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_corner_to_point_impl (const Mesh &mesh, const TypedReadAttribute< T > &attribute, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_corner_to_point (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_point_to_corner_impl (const Mesh &mesh, const TypedReadAttribute< T > &attribute, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_point_to_corner (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_corner_to_face_impl (const Mesh &mesh, Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_corner_to_face (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_corner_to_edge_impl (const Mesh &mesh, Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_corner_to_edge (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
void blender::bke::adapt_mesh_domain_face_to_point_impl (const Mesh &mesh, Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_face_to_point (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
void blender::bke::adapt_mesh_domain_face_to_corner_impl (const Mesh &mesh, const Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_face_to_corner (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
void blender::bke::adapt_mesh_domain_face_to_edge_impl (const Mesh &mesh, const Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_face_to_edge (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_point_to_face_impl (const Mesh &mesh, const Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_point_to_face (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_point_to_edge_impl (const Mesh &mesh, const Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_point_to_edge (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
void blender::bke::adapt_mesh_domain_edge_to_corner_impl (const Mesh &mesh, const Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_edge_to_corner (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_edge_to_point_impl (const Mesh &mesh, const Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_edge_to_point (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename T >
static void blender::bke::adapt_mesh_domain_edge_to_face_impl (const Mesh &mesh, const Span< T > old_values, MutableSpan< T > r_values)
 
static ReadAttributePtr blender::bke::adapt_mesh_domain_edge_to_face (const Mesh &mesh, ReadAttributePtr attribute)
 
template<typename StructT , typename ElemT , ElemT(*)(const StructT &) GetFunc, AttributeDomain Domain>
static ReadAttributePtr blender::bke::make_derived_read_attribute (const void *data, const int domain_size)
 
template<typename StructT , typename ElemT , ElemT(*)(const StructT &) GetFunc, void(*)(StructT &, const ElemT &) SetFunc, AttributeDomain Domain>
static WriteAttributePtr blender::bke::make_derived_write_attribute (void *data, const int domain_size)
 
static float3 blender::bke::get_vertex_position (const MVert &vert)
 
static void blender::bke::set_vertex_position (MVert &vert, const float3 &position)
 
static void blender::bke::tag_normals_dirty_when_writing_position (GeometryComponent &component)
 
static int blender::bke::get_material_index (const MPoly &mpoly)
 
static void blender::bke::set_material_index (MPoly &mpoly, const int &index)
 
static bool blender::bke::get_shade_smooth (const MPoly &mpoly)
 
static void blender::bke::set_shade_smooth (MPoly &mpoly, const bool &value)
 
static float2 blender::bke::get_loop_uv (const MLoopUV &uv)
 
static void blender::bke::set_loop_uv (MLoopUV &uv, const float2 &co)
 
static Color4f blender::bke::get_loop_color (const MLoopCol &col)
 
static void blender::bke::set_loop_color (MLoopCol &col, const Color4f &linear_color)
 
static float blender::bke::get_crease (const MEdge &edge)
 
static void blender::bke::set_crease (MEdge &edge, const float &value)
 
static ComponentAttributeProviders blender::bke::create_attribute_providers_for_mesh ()
 
Attribute Access
static Meshget_mesh_from_component_for_write (GeometryComponent &component)
 
static const Meshget_mesh_from_component_for_read (const GeometryComponent &component)
 

Macro Definition Documentation

◆ MAKE_CONST_CUSTOM_DATA_GETTER

#define MAKE_CONST_CUSTOM_DATA_GETTER (   NAME)
Value:
[](const GeometryComponent &component) -> const CustomData * { \
return mesh ? &mesh->NAME : nullptr; \
}
static uint8 component(Color32 c, uint i)
Definition: ColorBlock.cpp:126
static const Mesh * get_mesh_from_component_for_read(const GeometryComponent &component)

◆ MAKE_MUTABLE_CUSTOM_DATA_GETTER

#define MAKE_MUTABLE_CUSTOM_DATA_GETTER (   NAME)
Value:
return mesh ? &mesh->NAME : nullptr; \
}
static Mesh * get_mesh_from_component_for_write(GeometryComponent &component)

Function Documentation

◆ BKE_object_defgroup_data_create()

MDeformVert* BKE_object_defgroup_data_create ( ID id)

Create MDeformVert data for given ID. Work in Object mode only.

Definition at line 143 of file object_deform.c.

Referenced by blender::bke::VertexGroupsAttributeProvider::try_get_for_write().

◆ get_mesh_from_component_for_read()

static const Mesh* get_mesh_from_component_for_read ( const GeometryComponent component)
static

◆ get_mesh_from_component_for_write()

static Mesh* get_mesh_from_component_for_write ( GeometryComponent component)
static