Blender
V3.3
|
#include "subdiv_converter.h"
#include <string.h>
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_bitmap.h"
#include "BLI_utildefines.h"
#include "BKE_customdata.h"
#include "BKE_mesh_mapping.h"
#include "BKE_subdiv.h"
#include "MEM_guardedalloc.h"
#include "opensubdiv_capi.h"
#include "opensubdiv_converter_capi.h"
#include "bmesh_class.h"
Go to the source code of this file.
Classes | |
struct | ConverterStorage |
Macros | |
#define | BUGGY_SIMPLE_SCHEME_WORKAROUND 1 |
Typedefs | |
typedef struct ConverterStorage | ConverterStorage |
#define BUGGY_SIMPLE_SCHEME_WORKAROUND 1 |
Definition at line 31 of file subdiv_converter_mesh.c.
typedef struct ConverterStorage ConverterStorage |
void BKE_subdiv_converter_init_for_mesh | ( | struct OpenSubdiv_Converter * | converter, |
const SubdivSettings * | settings, | ||
const Mesh * | mesh | ||
) |
Definition at line 390 of file subdiv_converter_mesh.c.
References init_functions(), init_user_data(), and mesh.
|
static |
Definition at line 230 of file subdiv_converter_mesh.c.
Referenced by init_functions().
|
static |
Definition at line 249 of file subdiv_converter_mesh.c.
References MEM_freeN, MEM_SAFE_FREE, OpenSubdiv_Converter::user_data, and user_data.
Referenced by init_functions().
|
static |
Definition at line 146 of file subdiv_converter_mesh.c.
References BKE_subdiv_crease_to_sharpness_char(), SubdivSettings::is_simple, ConverterStorage::manifold_edge_index_reverse, Mesh::medge, ConverterStorage::mesh, ConverterStorage::settings, SubdivSettings::use_creases, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 135 of file subdiv_converter_mesh.c.
References ConverterStorage::manifold_edge_index_reverse, ConverterStorage::manifold_vertex_index, Mesh::medge, ConverterStorage::mesh, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 240 of file subdiv_converter_mesh.c.
References ConverterStorage::loop_uv_indices, MPoly::loopstart, ConverterStorage::mesh, Mesh::mpoly, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 122 of file subdiv_converter_mesh.c.
References MPoly::loopstart, ConverterStorage::manifold_vertex_index, ConverterStorage::mesh, Mesh::mloop, Mesh::mpoly, MPoly::totloop, OpenSubdiv_Converter::user_data, and MLoop::v.
Referenced by init_functions().
|
static |
Definition at line 86 of file subdiv_converter_mesh.c.
References BKE_subdiv_converter_fvar_linear_from_settings(), ConverterStorage::settings, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 104 of file subdiv_converter_mesh.c.
References ConverterStorage::num_manifold_edges, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 116 of file subdiv_converter_mesh.c.
References ConverterStorage::mesh, Mesh::mpoly, MPoly::totloop, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 98 of file subdiv_converter_mesh.c.
References ConverterStorage::mesh, Mesh::totpoly, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 185 of file subdiv_converter_mesh.c.
References CD_MLOOPUV, CustomData_number_of_layers(), Mesh::ldata, ConverterStorage::mesh, mesh, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 234 of file subdiv_converter_mesh.c.
References ConverterStorage::num_uv_coordinates, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 110 of file subdiv_converter_mesh.c.
References ConverterStorage::num_manifold_vertices, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 63 of file subdiv_converter_mesh.c.
References SubdivSettings::is_simple, OSD_SCHEME_BILINEAR, OSD_SCHEME_CATMARK, ConverterStorage::settings, OpenSubdiv_Converter::user_data, and void.
Referenced by init_functions().
|
static |
Definition at line 175 of file subdiv_converter_mesh.c.
References BKE_subdiv_crease_to_sharpness_f(), ConverterStorage::cd_vertex_crease, ConverterStorage::manifold_vertex_index_reverse, NULL, ConverterStorage::settings, SubdivSettings::use_creases, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 79 of file subdiv_converter_mesh.c.
References BKE_subdiv_converter_vtx_boundary_interpolation_from_settings(), ConverterStorage::settings, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 260 of file subdiv_converter_mesh.c.
References finish_uv_layer(), OpenSubdiv_Converter::finishUVLayer, free_user_data(), OpenSubdiv_Converter::freeUserData, get_edge_sharpness(), get_edge_vertices(), get_face_corner_uv_index(), get_face_vertices(), get_fvar_linear_interpolation(), get_num_edges(), get_num_face_vertices(), get_num_faces(), get_num_uv_layers(), get_num_uvs(), get_num_vertices(), get_scheme_type(), get_vertex_sharpness(), get_vtx_boundary_interpolation(), OpenSubdiv_Converter::getEdgeFaces, OpenSubdiv_Converter::getEdgeSharpness, OpenSubdiv_Converter::getEdgeVertices, OpenSubdiv_Converter::getFaceCornerUVIndex, OpenSubdiv_Converter::getFaceEdges, OpenSubdiv_Converter::getFaceVertices, OpenSubdiv_Converter::getFVarLinearInterpolation, OpenSubdiv_Converter::getNumEdgeFaces, OpenSubdiv_Converter::getNumEdges, OpenSubdiv_Converter::getNumFaces, OpenSubdiv_Converter::getNumFaceVertices, OpenSubdiv_Converter::getNumUVCoordinates, OpenSubdiv_Converter::getNumUVLayers, OpenSubdiv_Converter::getNumVertexEdges, OpenSubdiv_Converter::getNumVertexFaces, OpenSubdiv_Converter::getNumVertices, OpenSubdiv_Converter::getSchemeType, OpenSubdiv_Converter::getVertexEdges, OpenSubdiv_Converter::getVertexFaces, OpenSubdiv_Converter::getVertexSharpness, OpenSubdiv_Converter::getVtxBoundaryInterpolation, is_infinite_sharp_vertex(), OpenSubdiv_Converter::isInfiniteSharpVertex, NULL, precalc_uv_layer(), OpenSubdiv_Converter::precalcUVLayer, specifies_full_topology(), and OpenSubdiv_Converter::specifiesFullTopology.
Referenced by BKE_subdiv_converter_init_for_mesh().
|
static |
Definition at line 377 of file subdiv_converter_mesh.c.
References CD_CREASE, CustomData_get_layer(), initialize_manifold_indices(), MEM_mallocN, mesh, NULL, OpenSubdiv_Converter::user_data, user_data, and Mesh::vdata.
Referenced by BKE_subdiv_converter_init_for_mesh().
|
static |
Definition at line 296 of file subdiv_converter_mesh.c.
References BLI_BITMAP_TEST_BOOL, indices, MEM_malloc_arrayN, NULL, and offset.
Referenced by initialize_manifold_indices().
|
static |
Definition at line 336 of file subdiv_converter_mesh.c.
References BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST_BOOL, MLoop::e, ConverterStorage::infinite_sharp_vertices_map, initialize_manifold_index_array(), MPoly::loopstart, ConverterStorage::manifold_edge_index_reverse, ConverterStorage::manifold_vertex_index, ConverterStorage::manifold_vertex_index_reverse, Mesh::medge, MEM_freeN, ConverterStorage::mesh, mesh, Mesh::mloop, Mesh::mpoly, NULL, ConverterStorage::num_manifold_edges, ConverterStorage::num_manifold_vertices, Mesh::totedge, MPoly::totloop, Mesh::totpoly, Mesh::totvert, and MLoop::v.
Referenced by init_user_data().
|
static |
Definition at line 162 of file subdiv_converter_mesh.c.
References BLI_BITMAP_TEST_BOOL, ConverterStorage::infinite_sharp_vertices_map, SubdivSettings::is_simple, ConverterStorage::manifold_vertex_index_reverse, ConverterStorage::settings, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 192 of file subdiv_converter_mesh.c.
References BKE_mesh_uv_vert_map_create(), BKE_mesh_uv_vert_map_free(), BKE_mesh_uv_vert_map_get_vert(), CD_MLOOPUV, CustomData_get_layer_n(), Mesh::ldata, UvMapVert::loop_of_poly_index, ConverterStorage::loop_uv_indices, MPoly::loopstart, MEM_malloc_arrayN, ConverterStorage::mesh, mesh, Mesh::mloop, Mesh::mpoly, UvMapVert::next, NULL, ConverterStorage::num_uv_coordinates, UvMapVert::poly_index, UvMapVert::separate, STD_UV_CONNECT_LIMIT, Mesh::totloop, Mesh::totpoly, Mesh::totvert, and OpenSubdiv_Converter::user_data.
Referenced by init_functions().
|
static |
Definition at line 93 of file subdiv_converter_mesh.c.
Referenced by init_functions().