25 #include "COLLADABUPlatform.h"
27 #include "COLLADAFWMeshPrimitive.h"
28 #include "COLLADAFWMeshVertexData.h"
29 #include "COLLADAFWPolygons.h"
53 return node->getName().empty() ?
node->getOriginalId() :
node->getName();
59 case COLLADAFW::MeshPrimitive::LINES:
61 case COLLADAFW::MeshPrimitive::LINE_STRIPS:
63 case COLLADAFW::MeshPrimitive::POLYGONS:
65 case COLLADAFW::MeshPrimitive::POLYLIST:
67 case COLLADAFW::MeshPrimitive::TRIANGLES:
69 case COLLADAFW::MeshPrimitive::TRIANGLE_FANS:
70 return "TRIANGLE_FANS";
71 case COLLADAFW::MeshPrimitive::TRIANGLE_STRIPS:
72 return "TRIANGLE_STRIPS";
73 case COLLADAFW::MeshPrimitive::POINTS:
75 case COLLADAFW::MeshPrimitive::UNDEFINED_PRIMITIVE_TYPE:
76 return "UNDEFINED_PRIMITIVE_TYPE";
84 case COLLADAFW::Geometry::GEO_TYPE_MESH:
86 case COLLADAFW::Geometry::GEO_TYPE_SPLINE:
88 case COLLADAFW::Geometry::GEO_TYPE_CONVEX_MESH:
90 case COLLADAFW::Geometry::GEO_TYPE_UNKNOWN:
101 void WVDataWrapper::print()
103 fprintf(stderr,
"UVs:\n");
104 switch (mVData->getType()) {
105 case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT: {
106 COLLADAFW::ArrayPrimitiveType<float> *values = mVData->getFloatValues();
107 if (values->getCount()) {
108 for (
int i = 0; i < values->getCount(); i += 2) {
109 fprintf(stderr,
"%.1f, %.1f\n", (*values)[i], (*values)[i + 1]);
113 case COLLADAFW::MeshVertexData::DATA_TYPE_DOUBLE: {
114 COLLADAFW::ArrayPrimitiveType<double> *values = mVData->getDoubleValues();
115 if (values->getCount()) {
116 for (
int i = 0; i < values->getCount(); i += 2) {
117 fprintf(stderr,
"%.1f, %.1f\n", (
float)(*values)[i], (
float)(*values)[i + 1]);
122 fprintf(stderr,
"\n");
128 int stride = mVData->getStride(0);
133 switch (mVData->getType()) {
134 case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT: {
135 COLLADAFW::ArrayPrimitiveType<float> *values = mVData->getFloatValues();
136 if (values->empty()) {
139 uv[0] = (*values)[uv_index *
stride];
140 uv[1] = (*values)[uv_index *
stride + 1];
143 case COLLADAFW::MeshVertexData::DATA_TYPE_DOUBLE: {
144 COLLADAFW::ArrayPrimitiveType<double> *values = mVData->getDoubleValues();
145 if (values->empty()) {
152 case COLLADAFW::MeshVertexData::DATA_TYPE_UNKNOWN:
154 fprintf(stderr,
"MeshImporter.getUV(): unknown data type\n");
165 if (values->empty() || values->getCount() < (v_index + 1) *
stride) {
167 "VCOLDataWrapper.getvcol(): Out of Bounds error: index %d points outside value "
168 "list of length %zd (with stride=%d) \n",
185 int stride = mVData->getStride(0);
190 switch (mVData->getType()) {
191 case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT: {
192 COLLADAFW::ArrayPrimitiveType<float> *values = mVData->getFloatValues();
193 colladaAddColor<COLLADAFW::ArrayPrimitiveType<float> *>(values, mloopcol, v_index,
stride);
196 case COLLADAFW::MeshVertexData::DATA_TYPE_DOUBLE: {
197 COLLADAFW::ArrayPrimitiveType<double> *values = mVData->getDoubleValues();
198 colladaAddColor<COLLADAFW::ArrayPrimitiveType<double> *>(values, mloopcol, v_index,
stride);
202 fprintf(stderr,
"VCOLDataWrapper.getvcol(): unknown data type\n");
208 : unitconverter(unitconv),
211 view_layer(view_layer),
212 armature_importer(arm)
217 bool MeshImporter::set_poly_indices(
218 MPoly *mpoly,
MLoop *mloop,
int loop_index,
const unsigned int *
indices,
int loop_count)
222 bool broken_loop =
false;
223 for (
int index = 0; index < loop_count; index++) {
227 for (
int i = 0; i < index; i++) {
241 void MeshImporter::set_vcol(
MLoopCol *mloopcol,
244 COLLADAFW::IndexList &index_list,
248 for (index = 0; index <
count; index++, mloopcol++) {
249 int v_index = index_list.getIndex(index + loop_index);
254 void MeshImporter::set_face_uv(
MLoopUV *mloopuv,
257 COLLADAFW::IndexList &index_list,
261 COLLADAFW::UIntValuesArray &
indices = index_list.getIndices();
263 for (
int index = 0; index <
count; index++) {
264 int uv_index =
indices[index + start_index];
265 uvs.
getUV(uv_index, mloopuv[index].uv);
270 void MeshImporter::print_index_list(COLLADAFW::IndexList &index_list)
272 fprintf(stderr,
"Index list for \"%s\":\n", index_list.getName().c_str());
273 for (
int i = 0; i < index_list.getIndicesCount(); i += 2) {
274 fprintf(stderr,
"%u, %u\n", index_list.getIndex(i), index_list.getIndex(i + 1));
276 fprintf(stderr,
"\n");
283 COLLADAFW::MeshPrimitiveArray &prim_arr =
mesh->getMeshPrimitives();
287 for (
unsigned int i = 0; i < prim_arr.getCount(); i++) {
289 COLLADAFW::MeshPrimitive *mp = prim_arr[i];
295 if (
type == COLLADAFW::MeshPrimitive::POLYLIST ||
type == COLLADAFW::MeshPrimitive::POLYGONS) {
297 COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons *)mp;
298 COLLADAFW::Polygons::VertexCountArray &vca = mpvc->getGroupedVerticesVertexCountArray();
301 int nonface_count = 0;
303 for (
unsigned int j = 0; j < vca.getCount(); j++) {
314 if (hole_count > 0) {
316 "WARNING: Primitive %s in %s: %d holes not imported (unsupported)\n",
322 if (nonface_count > 0) {
324 "WARNING: Primitive %s in %s: %d faces with vertex count < 3 (rejected)\n",
331 else if (
type == COLLADAFW::MeshPrimitive::LINES) {
335 else if (
type != COLLADAFW::MeshPrimitive::TRIANGLES &&
336 type != COLLADAFW::MeshPrimitive::TRIANGLE_FANS) {
337 fprintf(stderr,
"ERROR: Primitive type %s is not supported.\n", type_str);
348 COLLADAFW::MeshVertexData &
pos =
mesh->getPositions();
364 for (i = 0, mvert = me->
mvert; i < me->totvert; i++, mvert++) {
375 bool MeshImporter::primitive_has_useable_normals(COLLADAFW::MeshPrimitive *mp)
378 bool has_useable_normals =
false;
380 int normals_count = mp->getNormalIndices().getCount();
381 if (normals_count > 0) {
382 int index_count = mp->getPositionIndices().getCount();
383 if (index_count == normals_count) {
384 has_useable_normals =
true;
388 "Warning: Number of normals %d is different from the number of vertices %d, "
389 "skipping normals\n",
395 return has_useable_normals;
402 bool MeshImporter::primitive_has_faces(COLLADAFW::MeshPrimitive *mp)
405 bool has_faces =
false;
406 int type = mp->getPrimitiveType();
408 case COLLADAFW::MeshPrimitive::TRIANGLES:
409 case COLLADAFW::MeshPrimitive::TRIANGLE_FANS:
410 case COLLADAFW::MeshPrimitive::POLYLIST:
411 case COLLADAFW::MeshPrimitive::POLYGONS: {
425 std::string colname = collada_id;
426 int spos = colname.find(
"-mesh-colors-");
427 if (spos != std::string::npos) {
428 colname = colname.substr(spos + 13);
441 COLLADAFW::MeshPrimitiveArray &prim_arr = collada_mesh->getMeshPrimitives();
442 int total_poly_count = 0;
443 int total_loop_count = 0;
446 for (
int i = 0; i < prim_arr.getCount(); i++) {
447 COLLADAFW::MeshPrimitive *mp = prim_arr[i];
448 int type = mp->getPrimitiveType();
450 case COLLADAFW::MeshPrimitive::TRIANGLES:
451 case COLLADAFW::MeshPrimitive::TRIANGLE_FANS:
452 case COLLADAFW::MeshPrimitive::POLYLIST:
453 case COLLADAFW::MeshPrimitive::POLYGONS: {
454 COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons *)mp;
455 size_t prim_poly_count = mpvc->getFaceCount();
457 size_t prim_loop_count = 0;
458 for (
int index = 0; index < prim_poly_count; index++) {
459 int vcount = get_vertex_count(mpvc, index);
461 prim_loop_count += vcount;
469 total_loop_count += prim_loop_count;
479 if (total_poly_count > 0) {
480 me->
totpoly = total_poly_count;
481 me->
totloop = total_loop_count;
487 unsigned int totuvset = collada_mesh->getUVCoords().getInputInfosArray().getCount();
488 for (
int i = 0; i < totuvset; i++) {
489 if (collada_mesh->getUVCoords().getLength(i) == 0) {
496 for (
int i = 0; i < totuvset; i++) {
497 COLLADAFW::MeshVertexData::InputInfos *info =
498 collada_mesh->getUVCoords().getInputInfosArray()[i];
508 int totcolset = collada_mesh->getColors().getInputInfosArray().getCount();
510 for (
int i = 0; i < totcolset; i++) {
511 COLLADAFW::MeshVertexData::InputInfos *info =
512 collada_mesh->getColors().getInputInfosArray()[i];
522 unsigned int MeshImporter::get_vertex_count(COLLADAFW::Polygons *mp,
int index)
524 int type = mp->getPrimitiveType();
527 case COLLADAFW::MeshPrimitive::TRIANGLES:
528 case COLLADAFW::MeshPrimitive::TRIANGLE_FANS: {
532 case COLLADAFW::MeshPrimitive::POLYLIST:
533 case COLLADAFW::MeshPrimitive::POLYGONS: {
534 result = mp->getGroupedVerticesVertexCountArray()[index];
547 COLLADAFW::MeshPrimitiveArray &prim_arr =
mesh->getMeshPrimitives();
548 int loose_edge_count = 0;
551 for (
int i = 0; i < prim_arr.getCount(); i++) {
552 COLLADAFW::MeshPrimitive *mp = prim_arr[i];
553 int type = mp->getPrimitiveType();
555 case COLLADAFW::MeshPrimitive::LINES: {
556 size_t prim_totface = mp->getFaceCount();
557 loose_edge_count += prim_totface;
564 return loose_edge_count;
574 void MeshImporter::mesh_add_edges(
Mesh *
mesh,
int len)
600 for (
int i = 0; i <
len; i++, medge++) {
615 unsigned int loose_edge_count = get_loose_edge_count(
mesh);
616 if (loose_edge_count > 0) {
618 unsigned int face_edge_count = me->
totedge;
621 mesh_add_edges(me, loose_edge_count);
624 COLLADAFW::MeshPrimitiveArray &prim_arr =
mesh->getMeshPrimitives();
626 for (
int index = 0; index < prim_arr.getCount(); index++) {
627 COLLADAFW::MeshPrimitive *mp = prim_arr[index];
629 int type = mp->getPrimitiveType();
630 if (
type == COLLADAFW::MeshPrimitive::LINES) {
631 unsigned int edge_count = mp->getFaceCount();
632 unsigned int *
indices = mp->getPositionIndices().getData();
634 for (
int j = 0; j < edge_count; j++, med++) {
657 allocate_poly_data(collada_mesh, me);
666 MaterialIdPrimitiveArrayMap mat_prim_map;
668 COLLADAFW::MeshPrimitiveArray &prim_arr = collada_mesh->getMeshPrimitives();
669 COLLADAFW::MeshVertexData &
nor = collada_mesh->getNormals();
671 for (i = 0; i < prim_arr.getCount(); i++) {
673 COLLADAFW::MeshPrimitive *mp = prim_arr[i];
676 size_t prim_totpoly = mp->getFaceCount();
677 unsigned int *position_indices = mp->getPositionIndices().getData();
678 unsigned int *normal_indices = mp->getNormalIndices().getData();
680 bool mp_has_normals = primitive_has_useable_normals(mp);
681 bool mp_has_faces = primitive_has_faces(mp);
683 int collada_meshtype = mp->getPrimitiveType();
686 Primitive prim = {mpoly, 0};
692 if (collada_meshtype == COLLADAFW::MeshPrimitive::TRIANGLE_FANS) {
693 unsigned int grouped_vertex_count = mp->getGroupedVertexElementsCount();
694 for (
unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++) {
695 unsigned int first_vertex = position_indices[0];
696 unsigned int first_normal = normal_indices[0];
697 unsigned int vertex_count = mp->getGroupedVerticesVertexCount(group_index);
699 for (
unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++) {
701 unsigned int triangle_vertex_indices[3] = {
702 first_vertex, position_indices[1], position_indices[2]};
703 set_poly_indices(mpoly, mloop, loop_index, triangle_vertex_indices, 3);
705 if (mp_has_normals) {
707 unsigned int vertex_normal_indices[3] = {
708 first_normal, normal_indices[1], normal_indices[2]};
709 if (!is_flat_face(vertex_normal_indices,
nor, 3)) {
722 if (mp_has_normals) {
726 position_indices += 2;
730 if (collada_meshtype == COLLADAFW::MeshPrimitive::POLYLIST ||
731 collada_meshtype == COLLADAFW::MeshPrimitive::POLYGONS ||
732 collada_meshtype == COLLADAFW::MeshPrimitive::TRIANGLES) {
733 COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons *)mp;
734 unsigned int start_index = 0;
736 COLLADAFW::IndexListArray &index_list_array_uvcoord = mp->getUVCoordIndicesArray();
737 COLLADAFW::IndexListArray &index_list_array_vcolor = mp->getColorIndicesArray();
739 int invalid_loop_holes = 0;
740 for (
unsigned int j = 0; j < prim_totpoly; j++) {
743 int vcount = get_vertex_count(mpvc, j);
748 bool broken_loop = set_poly_indices(mpoly, mloop, loop_index, position_indices, vcount);
750 invalid_loop_holes += 1;
753 for (
unsigned int uvset_index = 0; uvset_index < index_list_array_uvcoord.getCount();
756 COLLADAFW::IndexList &index_list = *index_list_array_uvcoord[uvset_index];
759 if (mloopuv ==
nullptr) {
761 "Collada import: Mesh [%s] : Unknown reference to TEXCOORD [#%s].\n",
763 index_list.getName().c_str());
766 set_face_uv(mloopuv + loop_index,
769 *index_list_array_uvcoord[uvset_index],
774 if (mp_has_normals) {
775 if (!is_flat_face(normal_indices,
nor, vcount)) {
780 if (mp->hasColorIndices()) {
781 int vcolor_count = index_list_array_vcolor.getCount();
783 for (
unsigned int vcolor_index = 0; vcolor_index < vcolor_count; vcolor_index++) {
785 COLLADAFW::IndexList &color_index_list = *mp->getColorIndices(vcolor_index);
789 if (mloopcol ==
nullptr) {
791 "Collada import: Mesh [%s] : Unknown reference to VCOLOR [#%s].\n",
793 color_index_list.getName().c_str());
796 set_vcol(mloopcol + loop_index, vcol, start_index, color_index_list, vcount);
803 loop_index += vcount;
804 start_index += vcount;
807 if (mp_has_normals) {
808 normal_indices += vcount;
811 position_indices += vcount;
814 if (invalid_loop_holes > 0) {
816 "Collada import: Mesh [%s] : contains %d unsupported loops (holes).\n",
822 else if (collada_meshtype == COLLADAFW::MeshPrimitive::LINES) {
827 mat_prim_map[mp->getMaterialId()].push_back(prim);
831 geom_uid_mat_mapping_map[collada_mesh->getUniqueId()] = mat_prim_map;
834 void MeshImporter::get_vector(
float v[3], COLLADAFW::MeshVertexData &arr,
int i,
int stride)
838 switch (arr.getType()) {
839 case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT: {
840 COLLADAFW::ArrayPrimitiveType<float> *values = arr.getFloatValues();
841 if (values->empty()) {
845 v[0] = (*values)[i++];
846 v[1] = (*values)[i++];
855 case COLLADAFW::MeshVertexData::DATA_TYPE_DOUBLE: {
856 COLLADAFW::ArrayPrimitiveType<double> *values = arr.getDoubleValues();
857 if (values->empty()) {
861 v[0] = (
float)(*values)[i++];
862 v[1] = (
float)(*values)[i++];
864 v[2] = (
float)(*values)[i];
875 bool MeshImporter::is_flat_face(
unsigned int *nind, COLLADAFW::MeshVertexData &
nor,
int count)
879 get_vector(
a,
nor, *nind, 3);
884 for (
int i = 1; i <
count; i++, nind++) {
885 get_vector(b,
nor, *nind, 3);
890 if (dp < 0.99999f || dp > 1.00001f) {
900 if (uid_object_map.find(geom_uid) != uid_object_map.end()) {
901 return uid_object_map[geom_uid];
908 if (uid_mesh_map.find(geom_uid) != uid_mesh_map.end()) {
909 return uid_mesh_map[geom_uid];
916 if (this->mesh_geom_map.find(mesh_name) != this->mesh_geom_map.end()) {
917 return &this->mesh_geom_map[mesh_name];
936 for (
int index = 0; index < ob1->
totcol; index++) {
940 if (ob1->
matbits[index] == 0) {
943 if (ob1->
mat[index] != ob2->
mat[index]) {
959 for (
int index = 0; index < ob->
totcol; index++) {
961 me->
mat[index] = ob->
mat[index];
972 for (
int index = 0; index < ob->
totcol; index++) {
974 ob->
mat[index] =
nullptr;
983 std::vector<Object *> MeshImporter::get_all_users_of(
Mesh *reference_mesh)
985 std::vector<Object *> mesh_users;
986 for (
Object *ob : imported_objects) {
990 if (me == reference_mesh) {
991 mesh_users.push_back(ob);
1018 for (
Object *ob : imported_objects) {
1026 bool can_move =
true;
1027 std::vector<Object *> mesh_users = get_all_users_of(me);
1028 if (mesh_users.size() > 1) {
1029 Object *ref_ob = mesh_users[0];
1030 for (
int index = 1; index < mesh_users.size(); index++) {
1038 for (
Object *
object : mesh_users) {
1057 COLLADAFW::MaterialBinding cmaterial,
1058 std::map<COLLADAFW::UniqueId, Material *> &uid_material_map,
1060 const COLLADAFW::UniqueId *geom_uid,
1063 const COLLADAFW::UniqueId &ma_uid = cmaterial.getReferencedMaterial();
1066 if (uid_material_map.find(ma_uid) == uid_material_map.end()) {
1068 fprintf(stderr,
"Cannot find material by UID.\n");
1073 materials_mapped_to_geom.insert(
1074 std::pair<COLLADAFW::UniqueId, COLLADAFW::UniqueId>(*geom_uid, ma_uid));
1076 Material *ma = uid_material_map[ma_uid];
1083 MaterialIdPrimitiveArrayMap &mat_prim_map = geom_uid_mat_mapping_map[*geom_uid];
1084 COLLADAFW::MaterialId mat_id = cmaterial.getMaterialId();
1087 if (mat_prim_map.find(mat_id) != mat_prim_map.end()) {
1089 std::vector<Primitive> &prims = mat_prim_map[mat_id];
1091 std::vector<Primitive>::iterator it;
1093 for (it = prims.begin(); it != prims.end(); it++) {
1094 Primitive &prim = *it;
1095 MPoly *mpoly = prim.mpoly;
1097 for (
int i = 0; i < prim.totpoly; i++, mpoly++) {
1098 mpoly->
mat_nr = mat_index;
1105 COLLADAFW::Node *
node,
1106 COLLADAFW::InstanceGeometry *geom,
1108 std::map<COLLADAFW::UniqueId, Material *> &uid_material_map)
1110 const COLLADAFW::UniqueId *geom_uid = &geom->getInstanciatedObjectId();
1118 fprintf(stderr,
"Couldn't find a mesh UID by controller's UID.\n");
1124 if (uid_mesh_map.find(*geom_uid) == uid_mesh_map.end()) {
1127 fprintf(stderr,
"Couldn't find a mesh by UID.\n");
1131 if (!uid_mesh_map[*geom_uid]) {
1136 const std::string &
id =
node->getName().empty() ?
node->getOriginalId() :
node->getName();
1137 const char *name = (
id.length()) ?
id.c_str() :
nullptr;
1144 uid_object_map[*geom_uid] = ob;
1145 imported_objects.push_back(ob);
1149 Mesh *new_mesh = uid_mesh_map[*geom_uid];
1159 COLLADAFW::MaterialBindingArray &mat_array = geom->getMaterialBindings();
1162 for (
unsigned int i = 0; i < mat_array.getCount(); i++) {
1164 if (mat_array[i].getReferencedMaterial().isValid()) {
1168 fprintf(stderr,
"invalid referenced material for %s\n", mat_array[i].
getName().c_str());
1182 if (geom->getType() != COLLADAFW::Geometry::GEO_TYPE_MESH) {
1184 fprintf(stderr,
"Mesh type %s is not supported\n",
bc_geomTypeToStr(geom->getType()));
1190 if (!is_nice_mesh(
mesh)) {
1195 const std::string &str_geom_id =
mesh->getName().empty() ?
mesh->getOriginalId() :
1202 this->uid_mesh_map[
mesh->getUniqueId()] = me;
1203 this->mesh_geom_map[std::string(me->
id.
name)] = str_geom_id;
1205 read_vertices(
mesh, me);
1206 read_polys(
mesh, me);
1210 read_lines(
mesh, me);
typedef float(TangentPoint)[2]
CustomData interface, see also DNA_customdata_types.h.
void CustomData_free(struct CustomData *data, int totelem)
bool CustomData_has_layer(const struct CustomData *data, int type)
void * CustomData_add_layer_named(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem, const char *name)
void * CustomData_get_layer_named(const struct CustomData *data, int type, const char *name)
void * CustomData_get_layer_n(const struct CustomData *data, int type, int n)
void * CustomData_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
void CustomData_copy(const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, eCDAllocType alloctype, int totelem)
void CustomData_copy_data(const struct CustomData *source, struct CustomData *dest, int source_index, int dest_index, int count)
const CustomData_MeshMasks CD_MASK_MESH
display list (or rather multi purpose list) stuff.
void id_us_min(struct ID *id)
void id_us_plus(struct ID *id)
void BKE_id_free_us(struct Main *bmain, void *idv) ATTR_NONNULL()
General operations, lookup, etc. for materials.
void BKE_object_material_assign(struct Main *bmain, struct Object *ob, struct Material *ma, short act, int assign_type)
void BKE_mesh_assign_object(struct Main *bmain, struct Object *ob, struct Mesh *me)
struct Mesh * BKE_mesh_add(struct Main *bmain, const char *name)
void BKE_mesh_calc_normals(struct Mesh *me)
void BKE_mesh_update_customdata_pointers(struct Mesh *me, const bool do_ensure_tess_cd)
void BKE_mesh_calc_edges(struct Mesh *mesh, bool keep_existing_edges, const bool select_new_edges)
bool BKE_mesh_validate(struct Mesh *me, const bool do_verbose, const bool cddata_check_mask)
General operations, lookup, etc. for blender objects.
MINLINE float normalize_v3(float r[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void bc_remove_mark(Object *ob)
int bc_is_marked(Object *ob)
void bc_set_mark(Object *ob)
#define ID_REAL_USERS(id)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
Read Guarded memory(de)allocation.
static bool bc_has_same_material_configuration(Object *ob1, Object *ob2)
static void bc_copy_materials_to_data(Object *ob, Mesh *me)
static const char * bc_geomTypeToStr(COLLADAFW::Geometry::GeometryType type)
static std::string extract_vcolname(const COLLADAFW::String &collada_id)
static void bc_remove_materials_from_object(Object *ob, Mesh *me)
static void colladaAddColor(T values, MLoopCol *mloopcol, int v_index, int stride)
static std::string bc_get_dae_name(T *node)
static const char * bc_primTypeToStr(COLLADAFW::MeshPrimitive::PrimitiveType type)
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Geometry
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC Boolean Random String
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual const char * getName() const
COLLADAFW::UniqueId * get_geometry_uid(const COLLADAFW::UniqueId &controller_uid)
virtual Mesh * get_mesh_by_geom_uid(const COLLADAFW::UniqueId &geom_uid)
virtual Object * get_object_by_geom_uid(const COLLADAFW::UniqueId &geom_uid)
void optimize_material_assignements()
bool write_geometry(const COLLADAFW::Geometry *geom)
void assign_material_to_geom(COLLADAFW::MaterialBinding cmaterial, std::map< COLLADAFW::UniqueId, Material * > &uid_material_map, Object *ob, const COLLADAFW::UniqueId *geom_uid, short mat_index)
Object * create_mesh_object(COLLADAFW::Node *node, COLLADAFW::InstanceGeometry *geom, bool isController, std::map< COLLADAFW::UniqueId, Material * > &uid_material_map)
MeshImporter(UnitConverter *unitconv, ArmatureImporter *arm, Main *bmain, Scene *sce, ViewLayer *view_layer)
std::string * get_geometry_name(const std::string &mesh_name)
UVDataWrapper(COLLADAFW::MeshVertexData &vdata)
void getUV(int uv_index, float *uv)
void get_vcol(int v_index, MLoopCol *mloopcol)
VCOLDataWrapper(COLLADAFW::MeshVertexData &vdata)
Object * bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name)
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
struct CustomData pdata ldata
struct MLoopCol * mloopcol
__forceinline const avxi abs(const avxi &a)