Blender  V3.3
Classes | Macros | Functions | Variables
extract_mesh.hh File Reference

Extraction of Mesh data into VBO to feed to GPU. More...

#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "draw_cache_extract.hh"

Go to the source code of this file.

Classes

struct  MeshRenderData
 
struct  MeshExtract
 
struct  EditLoopData
 

Macros

#define MIN_RANGE_LEN   1024
 

Typedefs

Mesh Elements Extract Struct
using ExtractTriBMeshFn = void(const MeshRenderData *mr, BMLoop **elt, int elt_index, void *data)
 
using ExtractTriMeshFn = void(const MeshRenderData *mr, const MLoopTri *mlt, int elt_index, void *data)
 
using ExtractPolyBMeshFn = void(const MeshRenderData *mr, const BMFace *f, int f_index, void *data)
 
using ExtractPolyMeshFn = void(const MeshRenderData *mr, const MPoly *mp, int mp_index, void *data)
 
using ExtractLEdgeBMeshFn = void(const MeshRenderData *mr, const BMEdge *eed, int ledge_index, void *data)
 
using ExtractLEdgeMeshFn = void(const MeshRenderData *mr, const MEdge *med, int ledge_index, void *data)
 
using ExtractLVertBMeshFn = void(const MeshRenderData *mr, const BMVert *eve, int lvert_index, void *data)
 
using ExtractLVertMeshFn = void(const MeshRenderData *mr, const MVert *mv, int lvert_index, void *data)
 
using ExtractLooseGeomSubdivFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *buffer, void *data)
 
using ExtractInitFn = void(const MeshRenderData *mr, MeshBatchCache *cache, void *buffer, void *r_data)
 
using ExtractFinishFn = void(const MeshRenderData *mr, MeshBatchCache *cache, void *buffer, void *data)
 
using ExtractTaskReduceFn = void(void *userdata, void *task_userdata)
 
using ExtractInitSubdivFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *data)
 
using ExtractIterSubdivBMeshFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *data, uint subdiv_quad_index, const BMFace *coarse_quad)
 
using ExtractIterSubdivMeshFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *data, uint subdiv_quad_index, const MPoly *coarse_quad)
 
using ExtractFinishSubdivFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *data)
 

Functions

MeshRenderDatamesh_render_data_create (Object *object, Mesh *me, bool is_editmode, bool is_paint_mode, bool is_mode_active, const float obmat[4][4], bool do_final, bool do_uvedit, const ToolSettings *ts)
 
void mesh_render_data_free (MeshRenderData *mr)
 
void mesh_render_data_update_normals (MeshRenderData *mr, eMRDataType data_flag)
 
void mesh_render_data_update_loose_geom (MeshRenderData *mr, MeshBufferCache *cache, eMRIterType iter_type, eMRDataType data_flag)
 
void mesh_render_data_update_polys_sorted (MeshRenderData *mr, MeshBufferCache *cache, eMRDataType data_flag)
 
void mesh_render_data_update_looptris (MeshRenderData *mr, eMRIterType iter_type, eMRDataType data_flag)
 
voidmesh_extract_buffer_get (const MeshExtract *extractor, MeshBufferList *mbuflist)
 
eMRIterType mesh_extract_iter_type (const MeshExtract *ext)
 
const MeshExtractmesh_extract_override_get (const MeshExtract *extractor, bool do_hq_normals, bool do_single_mat)
 
void mesh_render_data_face_flag (const MeshRenderData *mr, const BMFace *efa, int cd_ofs, EditLoopData *eattr)
 
void mesh_render_data_loop_flag (const MeshRenderData *mr, BMLoop *l, int cd_ofs, EditLoopData *eattr)
 
void mesh_render_data_loop_edge_flag (const MeshRenderData *mr, BMLoop *l, int cd_ofs, EditLoopData *eattr)
 

Variables

const MeshExtract extract_tris
 
const MeshExtract extract_tris_single_mat
 
const MeshExtract extract_lines
 
const MeshExtract extract_lines_with_lines_loose
 
const MeshExtract extract_lines_loose_only
 
const MeshExtract extract_points
 
const MeshExtract extract_fdots
 
const MeshExtract extract_lines_paint_mask
 
const MeshExtract extract_lines_adjacency
 
const MeshExtract extract_edituv_tris
 
const MeshExtract extract_edituv_lines
 
const MeshExtract extract_edituv_points
 
const MeshExtract extract_edituv_fdots
 
const MeshExtract extract_pos_nor
 
const MeshExtract extract_pos_nor_hq
 
const MeshExtract extract_lnor_hq
 
const MeshExtract extract_lnor
 
const MeshExtract extract_uv
 
const MeshExtract extract_tan
 
const MeshExtract extract_tan_hq
 
const MeshExtract extract_sculpt_data
 
const MeshExtract extract_vcol
 
const MeshExtract extract_orco
 
const MeshExtract extract_edge_fac
 
const MeshExtract extract_weights
 
const MeshExtract extract_edit_data
 
const MeshExtract extract_edituv_data
 
const MeshExtract extract_edituv_stretch_area
 
const MeshExtract extract_edituv_stretch_angle
 
const MeshExtract extract_mesh_analysis
 
const MeshExtract extract_fdots_pos
 
const MeshExtract extract_fdots_nor
 
const MeshExtract extract_fdots_nor_hq
 
const MeshExtract extract_fdots_uv
 
const MeshExtract extract_fdots_edituv_data
 
const MeshExtract extract_skin_roots
 
const MeshExtract extract_poly_idx
 
const MeshExtract extract_edge_idx
 
const MeshExtract extract_vert_idx
 
const MeshExtract extract_fdot_idx
 
const MeshExtract extract_attr [GPU_MAX_ATTR]
 

Mesh Render Data

enum  eMRExtractType { MR_EXTRACT_BMESH , MR_EXTRACT_MAPPED , MR_EXTRACT_MESH }
 
BLI_INLINE const Mesheditmesh_final_or_this (const Object *object, const Mesh *me)
 
BLI_INLINE const CustomDatamesh_cd_ldata_get_from_mesh (const Mesh *me)
 
BLI_INLINE const CustomDatamesh_cd_pdata_get_from_mesh (const Mesh *me)
 
BLI_INLINE const CustomDatamesh_cd_edata_get_from_mesh (const Mesh *me)
 
BLI_INLINE const CustomDatamesh_cd_vdata_get_from_mesh (const Mesh *me)
 
BLI_INLINE BMFacebm_original_face_get (const MeshRenderData *mr, int idx)
 
BLI_INLINE BMEdgebm_original_edge_get (const MeshRenderData *mr, int idx)
 
BLI_INLINE BMVertbm_original_vert_get (const MeshRenderData *mr, int idx)
 
BLI_INLINE const floatbm_vert_co_get (const MeshRenderData *mr, const BMVert *eve)
 
BLI_INLINE const floatbm_vert_no_get (const MeshRenderData *mr, const BMVert *eve)
 
BLI_INLINE const floatbm_face_no_get (const MeshRenderData *mr, const BMFace *efa)
 

Detailed Description

Extraction of Mesh data into VBO to feed to GPU.

Definition in file extract_mesh.hh.

Macro Definition Documentation

◆ MIN_RANGE_LEN

#define MIN_RANGE_LEN   1024

Definition at line 24 of file extract_mesh.hh.

Typedef Documentation

◆ ExtractFinishFn

Definition at line 274 of file extract_mesh.hh.

◆ ExtractFinishSubdivFn

using ExtractFinishSubdivFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *data)

Definition at line 295 of file extract_mesh.hh.

◆ ExtractInitFn

using ExtractInitFn = void(const MeshRenderData *mr, MeshBatchCache *cache, void *buffer, void *r_data)

Definition at line 270 of file extract_mesh.hh.

◆ ExtractInitSubdivFn

using ExtractInitSubdivFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *data)

Definition at line 280 of file extract_mesh.hh.

◆ ExtractIterSubdivBMeshFn

using ExtractIterSubdivBMeshFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *data, uint subdiv_quad_index, const BMFace *coarse_quad)

Definition at line 285 of file extract_mesh.hh.

◆ ExtractIterSubdivMeshFn

using ExtractIterSubdivMeshFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *data, uint subdiv_quad_index, const MPoly *coarse_quad)

Definition at line 290 of file extract_mesh.hh.

◆ ExtractLEdgeBMeshFn

using ExtractLEdgeBMeshFn = void(const MeshRenderData *mr, const BMEdge *eed, int ledge_index, void *data)

Definition at line 250 of file extract_mesh.hh.

◆ ExtractLEdgeMeshFn

using ExtractLEdgeMeshFn = void(const MeshRenderData *mr, const MEdge *med, int ledge_index, void *data)

Definition at line 254 of file extract_mesh.hh.

◆ ExtractLooseGeomSubdivFn

using ExtractLooseGeomSubdivFn = void(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *buffer, void *data)

Definition at line 266 of file extract_mesh.hh.

◆ ExtractLVertBMeshFn

using ExtractLVertBMeshFn = void(const MeshRenderData *mr, const BMVert *eve, int lvert_index, void *data)

Definition at line 258 of file extract_mesh.hh.

◆ ExtractLVertMeshFn

using ExtractLVertMeshFn = void(const MeshRenderData *mr, const MVert *mv, int lvert_index, void *data)

Definition at line 262 of file extract_mesh.hh.

◆ ExtractPolyBMeshFn

using ExtractPolyBMeshFn = void(const MeshRenderData *mr, const BMFace *f, int f_index, void *data)

Definition at line 242 of file extract_mesh.hh.

◆ ExtractPolyMeshFn

using ExtractPolyMeshFn = void(const MeshRenderData *mr, const MPoly *mp, int mp_index, void *data)

Definition at line 246 of file extract_mesh.hh.

◆ ExtractTaskReduceFn

using ExtractTaskReduceFn = void(void *userdata, void *task_userdata)

Definition at line 278 of file extract_mesh.hh.

◆ ExtractTriBMeshFn

using ExtractTriBMeshFn = void(const MeshRenderData *mr, BMLoop **elt, int elt_index, void *data)

Definition at line 237 of file extract_mesh.hh.

◆ ExtractTriMeshFn

using ExtractTriMeshFn = void(const MeshRenderData *mr, const MLoopTri *mlt, int elt_index, void *data)

Definition at line 238 of file extract_mesh.hh.

Enumeration Type Documentation

◆ eMRExtractType

Enumerator
MR_EXTRACT_BMESH 
MR_EXTRACT_MAPPED 
MR_EXTRACT_MESH 

Definition at line 30 of file extract_mesh.hh.

Function Documentation

◆ bm_face_no_get()

BLI_INLINE const float* bm_face_no_get ( const MeshRenderData mr,
const BMFace efa 
)

◆ bm_original_edge_get()

BLI_INLINE BMEdge* bm_original_edge_get ( const MeshRenderData mr,
int  idx 
)

◆ bm_original_face_get()

BLI_INLINE BMFace* bm_original_face_get ( const MeshRenderData mr,
int  idx 
)

◆ bm_original_vert_get()

BLI_INLINE BMVert* bm_original_vert_get ( const MeshRenderData mr,
int  idx 
)

◆ bm_vert_co_get()

BLI_INLINE const float* bm_vert_co_get ( const MeshRenderData mr,
const BMVert eve 
)

◆ bm_vert_no_get()

BLI_INLINE const float* bm_vert_no_get ( const MeshRenderData mr,
const BMVert eve 
)

◆ editmesh_final_or_this()

BLI_INLINE const Mesh* editmesh_final_or_this ( const Object object,
const Mesh me 
)

◆ mesh_cd_edata_get_from_mesh()

BLI_INLINE const CustomData* mesh_cd_edata_get_from_mesh ( const Mesh me)

◆ mesh_cd_ldata_get_from_mesh()

BLI_INLINE const CustomData* mesh_cd_ldata_get_from_mesh ( const Mesh me)

◆ mesh_cd_pdata_get_from_mesh()

BLI_INLINE const CustomData* mesh_cd_pdata_get_from_mesh ( const Mesh me)

◆ mesh_cd_vdata_get_from_mesh()

BLI_INLINE const CustomData* mesh_cd_vdata_get_from_mesh ( const Mesh me)

◆ mesh_extract_buffer_get()

void* mesh_extract_buffer_get ( const MeshExtract extractor,
MeshBufferList mbuflist 
)

◆ mesh_extract_iter_type()

eMRIterType mesh_extract_iter_type ( const MeshExtract ext)

◆ mesh_extract_override_get()

const MeshExtract* mesh_extract_override_get ( const MeshExtract extractor,
bool  do_hq_normals,
bool  do_single_mat 
)

◆ mesh_render_data_create()

MeshRenderData* mesh_render_data_create ( Object object,
Mesh me,
bool  is_editmode,
bool  is_paint_mode,
bool  is_mode_active,
const float  obmat[4][4],
bool  do_final,
bool  do_uvedit,
const ToolSettings ts 
)
Parameters
is_mode_activeWhen true, use the modifiers from the edit-data, otherwise don't use modifiers as they are not from this object.

Definition at line 458 of file draw_cache_extract_mesh_render_data.cc.

References BKE_editmesh_cache_ensure_poly_normals(), BKE_editmesh_cache_ensure_vert_normals(), BKE_object_get_editmesh_eval_cage(), BKE_object_get_editmesh_eval_final(), BLI_assert, BMEditMesh::bm, bm, MeshRenderData::bm, BM_EDGE, BM_FACE, BM_LOOP, BM_mesh_active_edge_get(), BM_mesh_active_face_get(), BM_mesh_active_vert_get(), BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), MeshRenderData::bm_poly_centers, MeshRenderData::bm_poly_normals, BM_VERT, MeshRenderData::bm_vert_coords, MeshRenderData::bm_vert_normals, MeshRenderData::bweight_ofs, CD_BWEIGHT, CD_CREASE, CD_FREESTYLE_EDGE, CD_FREESTYLE_FACE, CD_MEDGE, CD_MLOOP, CD_MPOLY, CD_MVERT, CD_ORIGINDEX, copy_m4_m4(), CustomData_get_layer(), CustomData_get_offset(), MeshRenderData::e_origindex, BMesh::edata, Mesh::edata, EDBM_uv_active_face_get(), MeshRenderData::edge_crease_ofs, MeshRenderData::edge_len, MeshRenderData::edit_bmesh, MeshRenderData::edit_data, Mesh_Runtime::edit_data, Mesh::edit_mesh, MeshRenderData::eed_act, MeshRenderData::efa_act, MeshRenderData::efa_act_uv, ELEM, MeshRenderData::eve_act, MeshRenderData::extract_type, MeshRenderData::freestyle_edge_ofs, MeshRenderData::freestyle_face_ofs, Mesh_Runtime::is_original, Mesh::ldata, MeshRenderData::loop_len, MeshRenderData::mat_len, MeshRenderData::me, ME_WRAPPER_TYPE_MDATA, ME_WRAPPER_TYPE_SUBD, MeshRenderData::medge, MEM_callocN, mesh_render_mat_len_get(), MeshRenderData::mloop, MeshRenderData::mpoly, MR_EXTRACT_BMESH, MR_EXTRACT_MAPPED, MR_EXTRACT_MESH, MeshRenderData::mvert, MeshRenderData::obmat, MeshRenderData::p_origindex, BMesh::pdata, Mesh::pdata, MeshRenderData::poly_len, poly_to_tri_count(), EditMeshData::polyCos, EditMeshData::polyNos, retrieve_active_attribute_names(), Mesh::runtime, MeshRenderData::toolsettings, BMesh::totedge, Mesh::totedge, BMesh::totface, BMesh::totloop, Mesh::totloop, Mesh::totpoly, BMesh::totvert, Mesh::totvert, MeshRenderData::tri_len, MeshRenderData::v_origindex, BMesh::vdata, Mesh::vdata, MeshRenderData::vert_crease_ofs, MeshRenderData::vert_len, EditMeshData::vertexCos, EditMeshData::vertexNos, and Mesh_Runtime::wrapper_type.

Referenced by draw_subdiv_create_requested_buffers(), and blender::draw::mesh_buffer_cache_create_requested().

◆ mesh_render_data_face_flag()

void mesh_render_data_face_flag ( const MeshRenderData mr,
const BMFace efa,
int  cd_ofs,
EditLoopData eattr 
)

◆ mesh_render_data_free()

void mesh_render_data_free ( MeshRenderData mr)

◆ mesh_render_data_loop_edge_flag()

void mesh_render_data_loop_edge_flag ( const MeshRenderData mr,
BMLoop l,
int  cd_ofs,
EditLoopData eattr 
)

◆ mesh_render_data_loop_flag()

void mesh_render_data_loop_flag ( const MeshRenderData mr,
BMLoop l,
int  cd_ofs,
EditLoopData eattr 
)

◆ mesh_render_data_update_looptris()

void mesh_render_data_update_looptris ( MeshRenderData mr,
eMRIterType  iter_type,
eMRDataType  data_flag 
)

◆ mesh_render_data_update_loose_geom()

void mesh_render_data_update_loose_geom ( MeshRenderData mr,
MeshBufferCache cache,
eMRIterType  iter_type,
eMRDataType  data_flag 
)

◆ mesh_render_data_update_normals()

void mesh_render_data_update_normals ( MeshRenderData mr,
eMRDataType  data_flag 
)

◆ mesh_render_data_update_polys_sorted()

void mesh_render_data_update_polys_sorted ( MeshRenderData mr,
MeshBufferCache cache,
eMRDataType  data_flag 
)

Variable Documentation

◆ extract_attr

const MeshExtract extract_attr[GPU_MAX_ATTR]
extern

Definition at line 444 of file extract_mesh_vbo_attributes.cc.

◆ extract_edge_fac

const MeshExtract extract_edge_fac
extern

Definition at line 306 of file extract_mesh_vbo_edge_fac.cc.

◆ extract_edge_idx

const MeshExtract extract_edge_idx
extern

Definition at line 415 of file extract_mesh_vbo_select_idx.cc.

◆ extract_edit_data

const MeshExtract extract_edit_data
extern

Definition at line 370 of file extract_mesh_vbo_edit_data.cc.

◆ extract_edituv_data

const MeshExtract extract_edituv_data
extern

Definition at line 202 of file extract_mesh_vbo_edituv_data.cc.

◆ extract_edituv_fdots

const MeshExtract extract_edituv_fdots
extern

Definition at line 608 of file extract_mesh_ibo_edituv.cc.

◆ extract_edituv_lines

const MeshExtract extract_edituv_lines
extern

Definition at line 606 of file extract_mesh_ibo_edituv.cc.

◆ extract_edituv_points

const MeshExtract extract_edituv_points
extern

Definition at line 607 of file extract_mesh_ibo_edituv.cc.

◆ extract_edituv_stretch_angle

const MeshExtract extract_edituv_stretch_angle
extern

Definition at line 295 of file extract_mesh_vbo_edituv_stretch_angle.cc.

◆ extract_edituv_stretch_area

const MeshExtract extract_edituv_stretch_area
extern

Definition at line 176 of file extract_mesh_vbo_edituv_stretch_area.cc.

◆ extract_edituv_tris

const MeshExtract extract_edituv_tris
extern

Definition at line 605 of file extract_mesh_ibo_edituv.cc.

◆ extract_fdot_idx

const MeshExtract extract_fdot_idx
extern

Definition at line 417 of file extract_mesh_vbo_select_idx.cc.

◆ extract_fdots

const MeshExtract extract_fdots
extern

Definition at line 98 of file extract_mesh_ibo_fdots.cc.

◆ extract_fdots_edituv_data

const MeshExtract extract_fdots_edituv_data
extern

Definition at line 84 of file extract_mesh_vbo_fdots_edituv_data.cc.

◆ extract_fdots_nor

const MeshExtract extract_fdots_nor
extern

Definition at line 183 of file extract_mesh_vbo_fdots_nor.cc.

Referenced by mesh_extract_override_hq_normals().

◆ extract_fdots_nor_hq

const MeshExtract extract_fdots_nor_hq
extern

Definition at line 184 of file extract_mesh_vbo_fdots_nor.cc.

Referenced by mesh_extract_override_hq_normals().

◆ extract_fdots_pos

const MeshExtract extract_fdots_pos
extern

◆ extract_fdots_uv

const MeshExtract extract_fdots_uv
extern

Definition at line 112 of file extract_mesh_vbo_fdots_uv.cc.

◆ extract_lines

const MeshExtract extract_lines
extern

◆ extract_lines_adjacency

const MeshExtract extract_lines_adjacency
extern

Definition at line 256 of file extract_mesh_ibo_lines_adjacency.cc.

◆ extract_lines_loose_only

const MeshExtract extract_lines_loose_only
extern

◆ extract_lines_paint_mask

const MeshExtract extract_lines_paint_mask
extern

Definition at line 185 of file extract_mesh_ibo_lines_paint_mask.cc.

◆ extract_lines_with_lines_loose

const MeshExtract extract_lines_with_lines_loose
extern

◆ extract_lnor

const MeshExtract extract_lnor
extern

Definition at line 237 of file extract_mesh_vbo_lnor.cc.

Referenced by mesh_extract_override_hq_normals().

◆ extract_lnor_hq

const MeshExtract extract_lnor_hq
extern

Definition at line 238 of file extract_mesh_vbo_lnor.cc.

Referenced by mesh_extract_override_hq_normals().

◆ extract_mesh_analysis

const MeshExtract extract_mesh_analysis
extern

Definition at line 636 of file extract_mesh_vbo_mesh_analysis.cc.

◆ extract_orco

const MeshExtract extract_orco
extern

Definition at line 97 of file extract_mesh_vbo_orco.cc.

◆ extract_points

const MeshExtract extract_points
extern

Definition at line 325 of file extract_mesh_ibo_points.cc.

◆ extract_poly_idx

const MeshExtract extract_poly_idx
extern

Definition at line 414 of file extract_mesh_vbo_select_idx.cc.

◆ extract_pos_nor

const MeshExtract extract_pos_nor
extern

◆ extract_pos_nor_hq

const MeshExtract extract_pos_nor_hq
extern

Definition at line 556 of file extract_mesh_vbo_pos_nor.cc.

Referenced by mesh_extract_override_hq_normals().

◆ extract_sculpt_data

const MeshExtract extract_sculpt_data
extern

Definition at line 218 of file extract_mesh_vbo_sculpt_data.cc.

◆ extract_skin_roots

const MeshExtract extract_skin_roots
extern

Definition at line 75 of file extract_mesh_vbo_skin_roots.cc.

◆ extract_tan

const MeshExtract extract_tan
extern

Definition at line 370 of file extract_mesh_vbo_tan.cc.

Referenced by mesh_extract_override_hq_normals().

◆ extract_tan_hq

const MeshExtract extract_tan_hq
extern

Definition at line 371 of file extract_mesh_vbo_tan.cc.

Referenced by mesh_extract_override_hq_normals().

◆ extract_tris

const MeshExtract extract_tris
extern

Definition at line 246 of file extract_mesh_ibo_tris.cc.

Referenced by mesh_extract_override_single_material().

◆ extract_tris_single_mat

const MeshExtract extract_tris_single_mat
extern

Definition at line 247 of file extract_mesh_ibo_tris.cc.

Referenced by mesh_extract_override_single_material().

◆ extract_uv

const MeshExtract extract_uv
extern

Definition at line 171 of file extract_mesh_vbo_uv.cc.

◆ extract_vcol

const MeshExtract extract_vcol
extern

◆ extract_vert_idx

const MeshExtract extract_vert_idx
extern

Definition at line 416 of file extract_mesh_vbo_select_idx.cc.

◆ extract_weights

const MeshExtract extract_weights
extern

Definition at line 211 of file extract_mesh_vbo_weights.cc.