|
Blender V5.3
|
#include <algorithm>#include <optional>#include "blender/attribute_convert.h"#include "blender/session.h"#include "blender/sync.h"#include "blender/util.h"#include "scene/camera.h"#include "scene/mesh.h"#include "scene/object.h"#include "scene/scene.h"#include "subd/split.h"#include "util/algorithm.h"#include "util/disjoint_set.h"#include "util/hash.h"#include "util/log.h"#include "util/math.h"#include "DNA_modifier_types.h"#include "BKE_anonymous_attribute_id.hh"#include "BKE_attribute.h"#include "BKE_attribute.hh"#include "BKE_attribute_math.hh"#include "BKE_customdata.hh"#include "BKE_mesh.hh"#include "GEO_mesh_split_edges.hh"Go to the source code of this file.
Classes | |
| class | VertexAverageComparator |
Functions | |
| static CCL_NAMESPACE_BEGIN void | attr_create_motion_corner_normals (const blender::Mesh &b_mesh, const blender::Span< blender::float3 > positions, packed_normal *N) |
| static bool | attr_need_motion_vertex_normals (const blender::Mesh &b_mesh) |
| static void | attr_create_motion_vertex_normals (const blender::Mesh &b_mesh, packed_normal *N) |
| static void | attr_create_motion_from_velocity (Mesh *mesh, const blender::Mesh &b_mesh, const blender::Span< blender::float3 > b_attr, const float motion_scale) |
| static AttributeElement | blender_domain_to_attr_element (const blender::bke::AttrDomain b_domain) |
| static void | attr_create_generic (Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const bool subdivision, const bool need_motion, const float motion_scale) |
| static set< ustring > | get_blender_uv_names (const blender::Mesh &b_mesh) |
| static void | attr_create_uv_map (Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const set< ustring > &blender_uv_names) |
| static void | attr_create_subd_uv_map (Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const set< ustring > &blender_uv_names) |
| static void | attr_create_pointiness (Mesh *mesh, const blender::Span< blender::float3 > positions, const blender::Span< blender::float3 > b_vert_normals, const blender::Span< blender::int2 > edges, bool subdivision) |
| static void | attr_create_random_per_island (Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, bool subdivision) |
| static void | create_mesh (Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const array< Node * > &used_shaders, const bool need_motion, const float motion_scale, const bool subdivision=false) |
| static void | create_subd_mesh (Scene *scene, Mesh *mesh, BObjectInfo &b_ob_info, const blender::Mesh &b_mesh, const array< Node * > &used_shaders, const bool need_motion, const float motion_scale, const float dicing_rate, const int max_subdivisions) |
|
static |
Definition at line 179 of file blender/mesh.cpp.
References AttributeSet::add(), attr_create_generic(), attr_create_motion_from_velocity(), ATTR_ELEMENT_CORNER_BYTE, ATTR_STD_VERTEX_COLOR, Geometry::attributes, blender::bke::ColorByte, blender::bke::Corner, blender::bke::Attribute::data_for_write(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::GAttributeReader::domain, blender::bke::Edge, AttributeSet::find(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::Mesh::id, blender::Span< T >::index_range(), blender::GVArrayCommon::is_empty(), make_uchar4(), blender::bke::AttributeIter::name, Geometry::need_attribute(), blender::bke::Point, Mesh::subd_attributes, blender::bke::attribute_math::to_static_type(), blender::GVArrayCommon::type(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by attr_create_generic(), and create_mesh().
|
static |
Definition at line 43 of file blender/mesh.cpp.
References attr_create_motion_corner_normals(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::Span< T >::data(), blender::bke::Edge, blender::bke::Face, blender::Span< T >::index_range(), blender::CPPType::is(), blender::bke::AttributeAccessor::lookup(), make_float3(), N, blender::bke::mesh::normals_calc_corners(), blender::bke::mesh::normals_calc_faces(), packed_normal::packed_normal(), blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), blender::GVArrayCommon::type(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by attr_create_motion_corner_normals(), and attr_create_motion_from_velocity().
|
static |
Definition at line 108 of file blender/mesh.cpp.
References attr_create_motion_corner_normals(), attr_create_motion_from_velocity(), attr_create_motion_vertex_normals(), attr_need_motion_vertex_normals(), ATTR_STD_CORNER_NORMAL, ATTR_STD_POSITION, ATTR_STD_VERTEX_NORMAL, Geometry::attributes, blender::bke::Attribute::data_for_write(), AttributeSet::find(), Geometry::get_position(), make_float3(), Mesh::num_verts(), P, step, Mesh::subd_attributes, and Mesh::SUBDIVISION_NONE.
Referenced by attr_create_generic(), and attr_create_motion_from_velocity().
|
static |
Definition at line 100 of file blender/mesh.cpp.
References attr_create_motion_vertex_normals(), blender::Span< T >::index_range(), make_float3(), N, and packed_normal::packed_normal().
Referenced by attr_create_motion_from_velocity(), and attr_create_motion_vertex_normals().
|
static |
Definition at line 502 of file blender/mesh.cpp.
References AttributeSet::add(), angle(), attr_create_pointiness(), ATTR_STD_POINTINESS, Geometry::attributes, EdgeMap::clear(), blender::bke::Attribute::data_for_write(), dot(), EdgeMap::exists(), FLT_EPSILON, vector< value_type, allocator_type >::free_memory(), Geometry::get_position(), blender::Span< T >::index_range(), EdgeMap::insert(), blender::Span< T >::is_empty(), len_squared(), M_1_PI_F, make_float3(), normalize, Mesh::num_verts(), safe_acosf(), safe_normalize(), blender::Span< T >::size(), sort(), Mesh::subd_attributes, float3::x, float3::y, float3::z, and zero_float3().
Referenced by attr_create_pointiness(), and create_mesh().
|
static |
Definition at line 657 of file blender/mesh.cpp.
References AttributeSet::add(), attr_create_random_per_island(), ATTR_STD_RANDOM_PER_ISLAND, attribute, Geometry::attributes, DisjointSet::find(), hash_uint_to_float(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::Span< T >::index_range(), blender::offset_indices::OffsetIndices< T >::is_empty(), blender::Span< T >::is_empty(), DisjointSet::join(), Geometry::need_attribute(), Mesh::subd_attributes, and blender::Mesh::verts_num.
Referenced by attr_create_random_per_island(), and create_mesh().
|
static |
Definition at line 409 of file blender/mesh.cpp.
References AttributeSet::add(), AttributeSet::add_shared(), attr_create_subd_uv_map(), ATTR_ELEMENT_CORNER, ATTR_STD_NONE, ATTR_STD_UV, ATTR_SUBDIVIDE_SMOOTH_FVAR, blender::bke::Corner, blender::CommonVArrayInfo::data, blender::bke::Attribute::data_for_write(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::offset_indices::OffsetIndices< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), make_float2, Geometry::need_attribute(), blender::bke::AttributeReader< T >::sharing_info, blender::CommonVArrayInfo::Span, Mesh::subd_attributes, blender::CommonVArrayInfo::type, and blender::bke::AttributeReader< T >::varray.
Referenced by attr_create_subd_uv_map(), and create_mesh().
|
static |
Definition at line 366 of file blender/mesh.cpp.
References AttributeSet::add(), attr_create_uv_map(), ATTR_ELEMENT_CORNER, ATTR_STD_NONE, ATTR_STD_UV, Geometry::attributes, blender::bke::Corner, blender::bke::Attribute::data_for_write(), blender::Span< T >::index_range(), blender::bke::AttributeAccessor::lookup(), make_float2, and Geometry::need_attribute().
Referenced by attr_create_uv_map(), and create_mesh().
|
static |
Definition at line 93 of file blender/mesh.cpp.
References attr_need_motion_vertex_normals(), blender::bke::GAttributeReader::domain, blender::CPPType::is(), blender::bke::Point, blender::GVArrayCommon::type(), and blender::bke::GAttributeReader::varray.
Referenced by attr_create_motion_from_velocity(), and attr_need_motion_vertex_normals().
|
static |
Definition at line 161 of file blender/mesh.cpp.
References assert, ATTR_ELEMENT_CORNER, ATTR_ELEMENT_FACE, ATTR_ELEMENT_NONE, ATTR_ELEMENT_VERTEX, blender_domain_to_attr_element(), blender::bke::Corner, blender::bke::Face, and blender::bke::Point.
Referenced by blender_domain_to_attr_element().
|
static |
Definition at line 705 of file blender/mesh.cpp.
References AttributeSet::add(), attr_create_generic(), attr_create_pointiness(), attr_create_random_per_island(), attr_create_subd_uv_map(), attr_create_uv_map(), ATTR_STD_CORNER_NORMAL, ATTR_STD_GENERATED, ATTR_STD_GENERATED_TRANSFORM, ATTR_STD_POINTINESS, ATTR_STD_POSITION, ATTR_STD_UV_TANGENT, ATTR_STD_VERTEX_NORMAL, Geometry::attributes, cast(), blender::CD_ORCO, clamp(), blender::bke::Corner, create_mesh(), blender::Span< T >::data(), blender::bke::Attribute::data_for_write(), blender::bke::Face, blender::bke::mesh::face_triangles_range(), float, get_blender_uv_names(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::Span< T >::index_range(), blender::blender::Span< T >::is_empty(), blender::offset_indices::OffsetIndices< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), make_float3(), N, Geometry::need_attribute(), packed_normal::packed_normal(), Mesh::resize_mesh(), Mesh::resize_subd_faces(), array< T, alignment >::size(), blender::IndexRange::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), smooth, blender::IndexRange::start(), Mesh::subd_attributes, Mesh::SUBDIVISION_CATMULL_CLARK, Geometry::tag_position_modified(), blender::Mesh::texcomesh, transform_scale(), transform_translate(), blender::Mesh::vert_data, and blender::bke::mesh::vert_tris_from_corner_tris().
Referenced by create_mesh(), and create_subd_mesh().
|
static |
Definition at line 943 of file blender/mesh.cpp.
References Mesh::add_edge_crease(), Mesh::add_vertex_crease(), create_mesh(), create_subd_mesh(), blender::bke::Edge, blender::eSubsurfModifierFlag_UseCrease, blender::blender::Span< T >::index_range(), blender::Span< T >::index_range(), blender::blender::Span< T >::is_empty(), max, blender::Object::modifiers, blender::bke::Point, BObjectInfo::real_object, Mesh::reserve_subd_creases(), Mesh::SUBDIVISION_ADAPTIVE_SPACE_OBJECT, Mesh::SUBDIVISION_ADAPTIVE_SPACE_PIXEL, blender::SUBSURF_ADAPTIVE_SPACE_OBJECT, and blender::SUBSURF_ADAPTIVE_SPACE_PIXEL.
Referenced by create_subd_mesh().
|
static |
Definition at line 350 of file blender/mesh.cpp.
References blender::bke::attribute_name_is_anonymous(), blender::bke::Corner, blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::Float2, get_blender_uv_names(), and blender::bke::AttributeIter::name.
Referenced by create_mesh(), and get_blender_uv_names().