36 using Alembic::Abc::FloatArraySamplePtr;
37 using Alembic::Abc::Int32ArraySamplePtr;
38 using Alembic::Abc::IV3fArrayProperty;
39 using Alembic::Abc::P3fArraySamplePtr;
40 using Alembic::Abc::PropertyHeader;
41 using Alembic::Abc::V3fArraySamplePtr;
43 using Alembic::AbcGeom::IC3fGeomParam;
44 using Alembic::AbcGeom::IC4fGeomParam;
45 using Alembic::AbcGeom::IFaceSet;
46 using Alembic::AbcGeom::IFaceSetSchema;
47 using Alembic::AbcGeom::IN3fGeomParam;
48 using Alembic::AbcGeom::IObject;
49 using Alembic::AbcGeom::IPolyMesh;
50 using Alembic::AbcGeom::IPolyMeshSchema;
51 using Alembic::AbcGeom::ISampleSelector;
52 using Alembic::AbcGeom::ISubD;
53 using Alembic::AbcGeom::ISubDSchema;
54 using Alembic::AbcGeom::IV2fGeomParam;
55 using Alembic::AbcGeom::kWrapExisting;
56 using Alembic::AbcGeom::N3fArraySample;
57 using Alembic::AbcGeom::N3fArraySamplePtr;
58 using Alembic::AbcGeom::UInt32ArraySamplePtr;
59 using Alembic::AbcGeom::V2fArraySamplePtr;
70 std::map<std::string, Material *> mat_map;
79 const std::map<std::string, int> &mat_index_map)
81 std::map<std::string, int>::const_iterator it;
82 if (mat_index_map.size() >
MAXMAT) {
87 std::map<std::string, Material *>::iterator mat_iter;
89 for (it = mat_index_map.begin(); it != mat_index_map.end(); ++it) {
90 const std::string mat_name = it->first;
91 const int mat_index = it->second;
94 mat_iter = matname_to_material.find(mat_name);
95 if (mat_iter == matname_to_material.end()) {
98 matname_to_material[mat_name] = assigned_mat;
101 assigned_mat = mat_iter->second;
127 const P3fArraySamplePtr &ceil_positions,
131 for (
int i = 0; i <
positions->size(); i++) {
132 MVert &mvert = mverts[i];
133 const Imath::V3f &floor_pos = (*positions)[i];
134 const Imath::V3f &ceil_pos = (*ceil_positions)[i];
136 interp_v3_v3v3(tmp, floor_pos.getValue(), ceil_pos.getValue(),
static_cast<float>(weight));
160 for (
int i = 0; i <
positions->size(); i++) {
162 Imath::V3f pos_in = (*positions)[i];
171 Imath::V3f nor_in = (*normals)[i];
184 const Int32ArraySamplePtr &face_indices = mesh_data.
face_indices;
185 const Int32ArraySamplePtr &face_counts = mesh_data.
face_counts;
186 const V2fArraySamplePtr &uvs = mesh_data.
uvs;
187 const size_t uvs_size = uvs ==
nullptr ? 0 : uvs->size();
189 const UInt32ArraySamplePtr &uvs_indices = mesh_data.
uvs_indices;
191 const bool do_uvs = (mloopuvs && uvs && uvs_indices);
194 unsigned int loop_index = 0;
195 unsigned int rev_loop_index = 0;
196 unsigned int uv_index = 0;
197 bool seen_invalid_geometry =
false;
199 for (
int i = 0; i < face_counts->size(); i++) {
200 const int face_size = (*face_counts)[i];
202 MPoly &poly = mpolys[i];
211 rev_loop_index = loop_index + (face_size - 1);
213 uint last_vertex_index = 0;
214 for (
int f = 0; f < face_size; f++, loop_index++, rev_loop_index--) {
215 MLoop &loop = mloops[rev_loop_index];
216 loop.
v = (*face_indices)[loop_index];
218 if (f > 0 && loop.
v == last_vertex_index) {
221 seen_invalid_geometry =
true;
223 last_vertex_index = loop.
v;
226 MLoopUV &loopuv = mloopuvs[rev_loop_index];
227 uv_index = (*uvs_indices)[do_uvs_per_loop ? loop_index : loop.
v];
230 if (uv_index >= uvs_size) {
234 loopuv.
uv[0] = (*uvs)[uv_index][0];
235 loopuv.
uv[1] = (*uvs)[uv_index][1];
241 if (seen_invalid_geometry) {
257 size_t loop_count = loop_normals_ptr->size();
259 if (loop_count == 0) {
274 float(*lnors)[3] =
static_cast<float(*)[3]
>(
278 const N3fArraySample &loop_normals = *loop_normals_ptr;
282 for (
int j = mpoly->
totloop - 1; j >= 0; j--, abc_index++) {
283 int blender_index = mpoly->
loopstart + j;
295 const N3fArraySamplePtr vertex_normals_ptr)
297 size_t normals_count = vertex_normals_ptr->size();
298 if (normals_count == 0) {
303 float(*vnors)[3] =
static_cast<float(*)[3]
>(
306 const N3fArraySample &vertex_normals = *vertex_normals_ptr;
307 for (
int index = 0; index < normals_count; index++) {
318 const ISampleSelector &selector)
325 IN3fGeomParam::Sample normsamp =
normals.getExpandedValue(selector);
326 Alembic::AbcGeom::GeometryScope scope =
normals.getScope();
329 case Alembic::AbcGeom::kFacevaryingScope:
332 case Alembic::AbcGeom::kVertexScope:
333 case Alembic::AbcGeom::kVaryingScope:
336 case Alembic::AbcGeom::kConstantScope:
337 case Alembic::AbcGeom::kUniformScope:
338 case Alembic::AbcGeom::kUnknownScope:
346 const IV2fGeomParam &uv,
347 const ISampleSelector &selector)
353 IV2fGeomParam::Sample uvsamp;
354 uv.getIndexed(uvsamp, selector);
356 UInt32ArraySamplePtr uvs_indices = uvsamp.getIndices();
365 abc_data.
uvs = uvsamp.getVals();
368 std::string name = Alembic::Abc::GetSourceName(uv.getMetaData());
391 if (cd_ptr !=
nullptr) {
404 Alembic::AbcCoreAbstract::TimeSamplingPtr time_sampling,
405 size_t samples_number)
407 Alembic::AbcGeom::index_t i0,
i1;
416 const ISampleSelector &selector,
417 const std::string &name)
419 for (
size_t i = 0; i < schema.getNumProperties(); i++) {
420 const PropertyHeader &header = schema.getPropertyHeader(i);
422 if (header.isCompound()) {
423 const ICompoundProperty &prop = ICompoundProperty(schema, header.getName());
428 const PropertyHeader *header = prop.getPropertyHeader(name);
429 if (!IV3fArrayProperty::matches(*header)) {
433 const IV3fArrayProperty &velocity_prop = IV3fArrayProperty(prop, name, 0);
435 return velocity_prop.getValue(selector);
439 else if (header.isArray()) {
440 if (header.getName() == name && IV3fArrayProperty::matches(header)) {
441 const IV3fArrayProperty &velocity_prop = IV3fArrayProperty(schema, name, 0);
442 return velocity_prop.getValue(selector);
447 return V3fArraySamplePtr();
452 const float velocity_scale)
454 const int num_velocity_vectors =
static_cast<int>(velocities->size());
455 if (num_velocity_vectors != config.
mesh->
totvert) {
465 for (
int i = 0; i < num_velocity_vectors; i++) {
466 const Imath::V3f &vel_in = (*velocities)[i];
474 const IPolyMeshSchema &schema,
475 const ISampleSelector &selector,
478 const IPolyMeshSchema::Sample
sample = schema.getValue(selector);
487 if (config.
weight != 0.0f) {
488 Alembic::AbcGeom::IPolyMeshSchema::Sample ceil_sample;
489 schema.get(ceil_sample, Alembic::Abc::ISampleSelector(config.
ceil_index));
494 read_uvs_params(config, abc_mesh_data, schema.getUVsParam(), selector);
508 read_custom_data(iobject_full_name, schema.getArbGeomParams(), config, selector);
546 IPolyMesh ipoly_mesh(
m_iobject, kWrapExisting);
547 m_schema = ipoly_mesh.getSchema();
554 return m_schema.valid();
557 template<
class typedGeomParam>
558 bool is_valid_animated(
const ICompoundProperty arbGeomParams,
const PropertyHeader &prop_header)
560 if (!typedGeomParam::matches(prop_header)) {
564 typedGeomParam geom_param(arbGeomParams, prop_header.getName());
565 return geom_param.valid() && !geom_param.isConstant();
570 if (!arbGeomParams.valid()) {
574 const int num_props = arbGeomParams.getNumProperties();
575 for (
int i = 0; i < num_props; i++) {
576 const PropertyHeader &prop_header = arbGeomParams.getPropertyHeader(i);
579 if (is_valid_animated<IC3fGeomParam>(arbGeomParams, prop_header)) {
582 if (is_valid_animated<IC4fGeomParam>(arbGeomParams, prop_header)) {
593 if (settings->
is_sequence || !schema.isConstant()) {
597 IV2fGeomParam uvsParam = schema.getUVsParam();
598 if (uvsParam.valid() && !uvsParam.isConstant()) {
602 IN3fGeomParam normalsParam = schema.getNormalsParam();
603 if (normalsParam.valid() && !normalsParam.isConstant()) {
607 ICompoundProperty arbGeomParams = schema.getArbGeomParams();
635 readFaceSetsSample(bmain,
mesh, sample_sel);
643 const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header,
645 const char **err_str)
const
647 if (!Alembic::AbcGeom::IPolyMesh::matches(alembic_header)) {
649 "Object type mismatch, Alembic object path pointed to PolyMesh when importing, but not "
655 *err_str =
"Object type mismatch, Alembic object path points to PolyMesh.";
664 IPolyMeshSchema::Sample
sample;
666 sample = m_schema.getValue(sample_sel);
668 catch (Alembic::Util::Exception &ex) {
669 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
671 m_schema.getName().c_str(),
672 sample_sel.getRequestedTime(),
679 const Alembic::Abc::Int32ArraySamplePtr &face_indices =
sample.getFaceIndices();
680 const Alembic::Abc::Int32ArraySamplePtr &face_counts =
sample.getFaceCounts();
683 face_counts->size() != existing_mesh->
totpoly ||
684 face_indices->size() != existing_mesh->
totloop;
688 const ISampleSelector &sample_sel,
690 const char *velocity_name,
691 const float velocity_scale,
692 const char **err_str)
694 IPolyMeshSchema::Sample
sample;
696 sample = m_schema.getValue(sample_sel);
698 catch (Alembic::Util::Exception &ex) {
699 if (err_str !=
nullptr) {
700 *err_str =
"Error reading mesh sample; more detail on the console";
702 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
704 m_schema.getName().c_str(),
705 sample_sel.getRequestedTime(),
707 return existing_mesh;
711 const Alembic::Abc::Int32ArraySamplePtr &face_indices =
sample.getFaceIndices();
712 const Alembic::Abc::Int32ArraySamplePtr &face_counts =
sample.getFaceCounts();
715 const int poly_count = face_counts->size();
716 const int loop_count = face_indices->size();
718 if (poly_count > 0 && loop_count < poly_count * 2) {
719 if (err_str !=
nullptr) {
720 *err_str =
"Invalid mesh; more detail on the console";
722 printf(
"Alembic: invalid mesh sample for '%s/%s' at time %f, less than 2 loops per face\n",
724 m_schema.getName().c_str(),
725 sample_sel.getRequestedTime());
726 return existing_mesh;
729 Mesh *new_mesh =
nullptr;
739 existing_mesh,
positions->size(), 0, 0, face_indices->size(), face_counts->size());
747 if (face_counts->size() != existing_mesh->
totpoly ||
748 face_indices->size() != existing_mesh->
totloop) {
753 "Topology has changed, perhaps by triangulating the"
754 " mesh. Only vertices will be read!";
759 Mesh *mesh_to_export = new_mesh ? new_mesh : existing_mesh;
762 config.
time = sample_sel.getRequestedTime();
771 size_t num_polys = new_mesh->
totpoly;
773 std::map<std::string, int> mat_map;
774 assign_facesets_to_mpoly(sample_sel, new_mesh->
mpoly, num_polys, mat_map);
780 return existing_mesh;
783 void AbcMeshReader::assign_facesets_to_mpoly(
const ISampleSelector &sample_sel,
786 std::map<std::string, int> &r_mat_map)
788 std::vector<std::string> face_sets;
789 m_schema.getFaceSetNames(face_sets);
791 if (face_sets.empty()) {
797 for (
const std::string &grp_name : face_sets) {
798 if (r_mat_map.find(grp_name) == r_mat_map.end()) {
799 r_mat_map[grp_name] = ++current_mat;
802 const int assigned_mat = r_mat_map[grp_name];
804 const IFaceSet faceset = m_schema.getFaceSet(grp_name);
806 if (!faceset.valid()) {
807 std::cerr <<
" Face set " << grp_name <<
" invalid for " <<
m_object_name <<
"\n";
811 const IFaceSetSchema face_schem = faceset.getSchema();
812 const IFaceSetSchema::Sample face_sample = face_schem.getValue(sample_sel);
813 const Int32ArraySamplePtr group_faces = face_sample.getFaces();
814 const size_t num_group_faces = group_faces->size();
816 for (
size_t l = 0;
l < num_group_faces;
l++) {
817 size_t pos = (*group_faces)[
l];
819 if (
pos >= totpoly) {
820 std::cerr <<
"Faceset overflow on " << faceset.getName() <<
'\n';
825 poly.
mat_nr = assigned_mat - 1;
830 void AbcMeshReader::readFaceSetsSample(
Main *bmain,
Mesh *
mesh,
const ISampleSelector &sample_sel)
832 std::map<std::string, int> mat_map;
841 const ISubDSchema &schema,
842 const ISampleSelector &selector,
845 const ISubDSchema::Sample
sample = schema.getValue(selector);
854 if (config.
weight != 0.0f) {
855 Alembic::AbcGeom::ISubDSchema::Sample ceil_sample;
856 schema.get(ceil_sample, Alembic::Abc::ISampleSelector(config.
ceil_index));
861 read_uvs_params(config, abc_mesh_data, schema.getUVsParam(), selector);
877 read_custom_data(iobject_full_name, schema.getArbGeomParams(), config, selector);
889 const Int32ArraySamplePtr &
indices,
890 const FloatArraySamplePtr &sharpnesses)
892 if (!(
indices && sharpnesses &&
indices->size() == sharpnesses->size() &&
901 for (
int i = 0,
v =
indices->size(); i <
v; ++i) {
902 const int idx = (*indices)[i];
904 if (idx >= totvert) {
908 vertex_crease_data[idx] = (*sharpnesses)[i];
915 const Int32ArraySamplePtr &
indices,
916 const FloatArraySamplePtr &sharpnesses)
918 if (!(
indices && sharpnesses)) {
927 for (
int i = 0; i < totedge; i++) {
928 MEdge *edge = &edges[i];
932 for (
int i = 0, s = 0,
e =
indices->size(); i <
e; i += 2, s++) {
933 int v1 = (*indices)[i];
934 int v2 = (*indices)[i + 1];
943 if (edge ==
nullptr) {
964 ISubD isubd_mesh(
m_iobject, kWrapExisting);
965 m_schema = isubd_mesh.getSchema();
972 return m_schema.valid();
976 const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header,
978 const char **err_str)
const
980 if (!Alembic::AbcGeom::ISubD::matches(alembic_header)) {
982 "Object type mismatch, Alembic object path pointed to SubD when importing, but not any "
988 *err_str =
"Object type mismatch, Alembic object path points to SubD.";
1007 ISubDSchema::Sample
sample;
1009 sample = m_schema.getValue(sample_sel);
1011 catch (Alembic::Util::Exception &ex) {
1012 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
1014 m_schema.getName().c_str(),
1015 sample_sel.getRequestedTime(),
1034 const ISampleSelector &sample_sel,
1035 const int read_flag,
1036 const char *velocity_name,
1037 const float velocity_scale,
1038 const char **err_str)
1040 ISubDSchema::Sample
sample;
1042 sample = m_schema.getValue(sample_sel);
1044 catch (Alembic::Util::Exception &ex) {
1045 if (err_str !=
nullptr) {
1046 *err_str =
"Error reading mesh sample; more detail on the console";
1048 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
1050 m_schema.getName().c_str(),
1051 sample_sel.getRequestedTime(),
1053 return existing_mesh;
1057 const Alembic::Abc::Int32ArraySamplePtr &face_indices =
sample.getFaceIndices();
1058 const Alembic::Abc::Int32ArraySamplePtr &face_counts =
sample.getFaceCounts();
1060 Mesh *new_mesh =
nullptr;
1069 existing_mesh,
positions->size(), 0, 0, face_indices->size(), face_counts->size());
1077 if (face_counts->size() != existing_mesh->
totpoly ||
1078 face_indices->size() != existing_mesh->
totloop) {
1083 "Topology has changed, perhaps by triangulating the"
1084 " mesh. Only vertices will be read!";
1090 Mesh *mesh_to_export = new_mesh ? new_mesh : existing_mesh;
1093 config.
time = sample_sel.getRequestedTime();
1096 return mesh_to_export;
typedef float(TangentPoint)[2]
Generic geometry attributes built on CustomData.
struct CustomDataLayer * BKE_id_attribute_new(struct ID *id, const char *name, int type, eAttrDomain domain, struct ReportList *reports)
const CustomData_MeshMasks CD_MASK_EVERYTHING
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_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
void id_us_min(struct ID *id)
General operations, lookup, etc. for materials.
void BKE_object_material_assign_single_obdata(struct Main *bmain, struct Object *ob, struct Material *ma, short act)
struct Material * BKE_material_add(struct Main *bmain, const char *name)
float(* BKE_mesh_vertex_normals_for_write(struct Mesh *mesh))[3]
struct Mesh * BKE_mesh_new_nomain_from_template(const struct Mesh *me_src, int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len)
void BKE_mesh_nomain_to_mesh(struct Mesh *mesh_src, struct Mesh *mesh_dst, struct Object *ob, const struct CustomData_MeshMasks *mask, bool take_ownership)
struct Mesh * BKE_mesh_add(struct Main *bmain, const char *name)
bool BKE_mesh_validate(struct Mesh *me, bool do_verbose, bool cddata_check_mask)
void BKE_mesh_vertex_normals_clear_dirty(struct Mesh *mesh)
void BKE_mesh_set_custom_normals_from_vertices(struct Mesh *mesh, float(*r_custom_vertnors)[3])
void BKE_mesh_normals_tag_dirty(struct Mesh *mesh)
void BKE_mesh_set_custom_normals(struct Mesh *mesh, float(*r_custom_loopnors)[3])
void BKE_mesh_calc_edges(struct Mesh *mesh, bool keep_existing_edges, bool select_new_edges)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_RETURNS_NONNULL
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP free_value)
void BLI_edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
EdgeHash * BLI_edgehash_new_ex(const char *info, unsigned int nentries_reserve)
void * BLI_edgehash_lookup(const EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT
#define LISTBASE_FOREACH(type, var, list)
MINLINE void mul_v3_fl(float r[3], float f)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
#define MOD_MESHSEQ_READ_ALL
@ MOD_MESHSEQ_INTERPOLATE_VERTICES
Object is a sort of wrapper for general info.
_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 i1
_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 const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
struct Mesh * read_mesh(struct Mesh *existing_mesh, const Alembic::Abc::ISampleSelector &sample_sel, int read_flag, const char *velocity_name, float velocity_scale, const char **err_str) override
void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel) override
bool accepts_object_type(const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header, const Object *const ob, const char **err_str) const override
bool topology_changed(const Mesh *existing_mesh, const Alembic::Abc::ISampleSelector &sample_sel) override
bool valid() const override
AbcMeshReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
std::string m_object_name
Alembic::Abc::IObject m_iobject
ImportSettings * m_settings
struct Mesh * read_mesh(struct Mesh *existing_mesh, const Alembic::Abc::ISampleSelector &sample_sel, int read_flag, const char *velocity_name, float velocity_scale, const char **err_str) override
void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel) override
bool valid() const override
AbcSubDReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
bool accepts_object_type(const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header, const Object *const ob, const char **err_str) const override
ccl_gpu_kernel_postfix int ccl_global int * indices
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
static void assign_materials(Main *bmain, Object *ob, const std::map< std::string, int > &mat_index_map)
static std::map< std::string, Material * > build_material_map(const Main *bmain)
AbcUvScope get_uv_scope(const Alembic::AbcGeom::GeometryScope scope, const CDStreamConfig &config, const Alembic::AbcGeom::UInt32ArraySamplePtr &indices)
static void process_normals(CDStreamConfig &config, const IN3fGeomParam &normals, const ISampleSelector &selector)
static void get_weight_and_index(CDStreamConfig &config, Alembic::AbcCoreAbstract::TimeSamplingPtr time_sampling, size_t samples_number)
void get_min_max_time(const Alembic::AbcGeom::IObject &object, const Schema &schema, chrono_t &min, chrono_t &max)
static void read_mverts_interp(MVert *mverts, const P3fArraySamplePtr &positions, const P3fArraySamplePtr &ceil_positions, const double weight)
static void read_mesh_sample(const std::string &iobject_full_name, ImportSettings *settings, const IPolyMeshSchema &schema, const ISampleSelector &selector, CDStreamConfig &config)
BLI_INLINE void read_uvs_params(CDStreamConfig &config, AbcMeshData &abc_data, const IV2fGeomParam &uv, const ISampleSelector &selector)
static void process_loop_normals(CDStreamConfig &config, const N3fArraySamplePtr loop_normals_ptr)
bool is_valid_animated(const ICompoundProperty arbGeomParams, const PropertyHeader &prop_header)
static void read_vertex_creases(Mesh *mesh, const Int32ArraySamplePtr &indices, const FloatArraySamplePtr &sharpnesses)
BLI_INLINE void copy_zup_from_yup(float zup[3], const float yup[3])
static void process_vertex_normals(CDStreamConfig &config, const N3fArraySamplePtr vertex_normals_ptr)
void read_custom_data(const std::string &iobject_full_name, const ICompoundProperty &prop, const CDStreamConfig &config, const Alembic::Abc::ISampleSelector &iss)
static void read_mpolys(CDStreamConfig &config, const AbcMeshData &mesh_data)
CDStreamConfig get_config(Mesh *mesh, const bool use_vertex_interpolation)
static void read_edge_creases(Mesh *mesh, const Int32ArraySamplePtr &indices, const FloatArraySamplePtr &sharpnesses)
static void read_subd_sample(const std::string &iobject_full_name, ImportSettings *settings, const ISubDSchema &schema, const ISampleSelector &selector, CDStreamConfig &config)
static bool has_animated_geom_params(const ICompoundProperty arbGeomParams)
static void read_velocity(const V3fArraySamplePtr &velocities, const CDStreamConfig &config, const float velocity_scale)
void read_generated_coordinates(const ICompoundProperty &prop, const CDStreamConfig &config, const Alembic::Abc::ISampleSelector &iss)
static V3fArraySamplePtr get_velocity_prop(const ICompoundProperty &schema, const ISampleSelector &selector, const std::string &name)
static void process_no_normals(CDStreamConfig &config)
static void read_mverts(CDStreamConfig &config, const AbcMeshData &mesh_data)
bool has_property(const Alembic::Abc::ICompoundProperty &prop, const std::string &name)
static void * add_customdata_cb(Mesh *mesh, const char *name, int data_type)
bool has_animations(Alembic::AbcGeom::IPolyMeshSchema &schema, ImportSettings *settings)
MutableSpan< float3 > positions
MutableSpan< float3 > normals
P3fArraySamplePtr ceil_positions
Int32ArraySamplePtr face_indices
UInt32ArraySamplePtr uvs_indices
Int32ArraySamplePtr face_counts
P3fArraySamplePtr positions
Alembic::AbcGeom::index_t index
Alembic::AbcGeom::index_t ceil_index
void *(* add_customdata_cb)(Mesh *mesh, const char *name, int data_type)
const char ** modifier_error_message
Alembic::Abc::chrono_t time
bool use_vertex_interpolation
bool always_add_cache_reader
std::string velocity_name