45 using Alembic::Abc::Int32ArraySamplePtr;
46 using Alembic::Abc::P3fArraySamplePtr;
47 using Alembic::Abc::PropertyHeader;
49 using Alembic::AbcGeom::IC3fGeomParam;
50 using Alembic::AbcGeom::IC4fGeomParam;
51 using Alembic::AbcGeom::IFaceSet;
52 using Alembic::AbcGeom::IFaceSetSchema;
53 using Alembic::AbcGeom::IN3fGeomParam;
54 using Alembic::AbcGeom::IObject;
55 using Alembic::AbcGeom::IPolyMesh;
56 using Alembic::AbcGeom::IPolyMeshSchema;
57 using Alembic::AbcGeom::ISampleSelector;
58 using Alembic::AbcGeom::ISubD;
59 using Alembic::AbcGeom::ISubDSchema;
60 using Alembic::AbcGeom::IV2fGeomParam;
61 using Alembic::AbcGeom::kWrapExisting;
62 using Alembic::AbcGeom::N3fArraySample;
63 using Alembic::AbcGeom::N3fArraySamplePtr;
64 using Alembic::AbcGeom::UInt32ArraySamplePtr;
65 using Alembic::AbcGeom::V2fArraySamplePtr;
76 std::map<std::string, Material *> mat_map;
85 const std::map<std::string, int> &mat_index_map)
87 std::map<std::string, int>::const_iterator it;
88 for (it = mat_index_map.begin(); it != mat_index_map.end(); ++it) {
95 std::map<std::string, Material *>::iterator mat_iter;
97 for (it = mat_index_map.begin(); it != mat_index_map.end(); ++it) {
98 const std::string mat_name = it->first;
99 const int mat_index = it->second;
102 mat_iter = matname_to_material.find(mat_name);
103 if (mat_iter == matname_to_material.end()) {
105 matname_to_material[mat_name] = assigned_mat;
108 assigned_mat = mat_iter->second;
129 const P3fArraySamplePtr &positions,
130 const P3fArraySamplePtr &ceil_positions,
134 for (
int i = 0; i < positions->size(); i++) {
135 MVert &mvert = mverts[i];
136 const Imath::V3f &floor_pos = (*positions)[i];
137 const Imath::V3f &ceil_pos = (*ceil_positions)[i];
139 interp_v3_v3v3(tmp, floor_pos.getValue(), ceil_pos.getValue(), weight);
149 const P3fArraySamplePtr &positions = mesh_data.
positions;
163 for (
int i = 0; i < positions->size(); i++) {
164 MVert &mvert = mverts[i];
165 Imath::V3f pos_in = (*positions)[i];
172 Imath::V3f nor_in = (*normals)[i];
188 const Int32ArraySamplePtr &face_indices = mesh_data.
face_indices;
189 const Int32ArraySamplePtr &face_counts = mesh_data.
face_counts;
190 const V2fArraySamplePtr &uvs = mesh_data.
uvs;
191 const size_t uvs_size = uvs ==
nullptr ? 0 : uvs->size();
193 const UInt32ArraySamplePtr &uvs_indices = mesh_data.
uvs_indices;
195 const bool do_uvs = (mloopuvs && uvs && uvs_indices) &&
196 (uvs_indices->size() == face_indices->size());
197 unsigned int loop_index = 0;
198 unsigned int rev_loop_index = 0;
199 unsigned int uv_index = 0;
200 bool seen_invalid_geometry =
false;
202 for (
int i = 0; i < face_counts->size(); i++) {
203 const int face_size = (*face_counts)[i];
205 MPoly &poly = mpolys[i];
214 rev_loop_index = loop_index + (face_size - 1);
216 uint last_vertex_index = 0;
217 for (
int f = 0; f < face_size; f++, loop_index++, rev_loop_index--) {
218 MLoop &loop = mloops[rev_loop_index];
219 loop.
v = (*face_indices)[loop_index];
221 if (f > 0 && loop.
v == last_vertex_index) {
224 seen_invalid_geometry =
true;
226 last_vertex_index = loop.
v;
229 MLoopUV &loopuv = mloopuvs[rev_loop_index];
231 uv_index = (*uvs_indices)[loop_index];
234 if (uv_index >= uvs_size) {
238 loopuv.
uv[0] = (*uvs)[uv_index][0];
239 loopuv.
uv[1] = (*uvs)[uv_index][1];
245 if (seen_invalid_geometry) {
261 size_t loop_count = loop_normals_ptr->size();
263 if (loop_count == 0) {
278 float(*lnors)[3] =
static_cast<float(*)[3]
>(
282 const N3fArraySample &loop_normals = *loop_normals_ptr;
286 for (
int j = mpoly->
totloop - 1; j >= 0; j--, abc_index++) {
287 int blender_index = mpoly->
loopstart + j;
299 const N3fArraySamplePtr vertex_normals_ptr)
301 size_t normals_count = vertex_normals_ptr->size();
302 if (normals_count == 0) {
307 float(*vnors)[3] =
static_cast<float(*)[3]
>(
310 const N3fArraySample &vertex_normals = *vertex_normals_ptr;
311 for (
int index = 0; index < normals_count; index++) {
322 const ISampleSelector &selector)
329 IN3fGeomParam::Sample normsamp =
normals.getExpandedValue(selector);
330 Alembic::AbcGeom::GeometryScope scope =
normals.getScope();
333 case Alembic::AbcGeom::kFacevaryingScope:
336 case Alembic::AbcGeom::kVertexScope:
337 case Alembic::AbcGeom::kVaryingScope:
340 case Alembic::AbcGeom::kConstantScope:
341 case Alembic::AbcGeom::kUniformScope:
342 case Alembic::AbcGeom::kUnknownScope:
350 const IV2fGeomParam &uv,
351 const ISampleSelector &selector)
357 IV2fGeomParam::Sample uvsamp;
358 uv.getIndexed(uvsamp, selector);
360 abc_data.
uvs = uvsamp.getVals();
364 std::string name = Alembic::Abc::GetSourceName(uv.getMetaData());
392 if (cd_ptr !=
nullptr) {
404 Alembic::AbcCoreAbstract::TimeSamplingPtr time_sampling,
405 size_t samples_number)
407 Alembic::AbcGeom::index_t i0,
i1;
417 const IPolyMeshSchema &schema,
418 const ISampleSelector &selector,
421 const IPolyMeshSchema::Sample
sample = schema.getValue(selector);
430 if (config.
weight != 0.0f) {
431 Alembic::AbcGeom::IPolyMeshSchema::Sample ceil_sample;
432 schema.get(ceil_sample, Alembic::Abc::ISampleSelector(config.
ceil_index));
437 read_uvs_params(config, abc_mesh_data, schema.getUVsParam(), selector);
450 read_custom_data(iobject_full_name, schema.getArbGeomParams(), config, selector);
480 IPolyMesh ipoly_mesh(
m_iobject, kWrapExisting);
481 m_schema = ipoly_mesh.getSchema();
488 return m_schema.valid();
491 template<
class typedGeomParam>
492 bool is_valid_animated(
const ICompoundProperty arbGeomParams,
const PropertyHeader &prop_header)
494 if (!typedGeomParam::matches(prop_header)) {
498 typedGeomParam geom_param(arbGeomParams, prop_header.getName());
499 return geom_param.valid() && !geom_param.isConstant();
504 if (!arbGeomParams.valid()) {
508 const int num_props = arbGeomParams.getNumProperties();
509 for (
int i = 0; i < num_props; i++) {
510 const PropertyHeader &prop_header = arbGeomParams.getPropertyHeader(i);
513 if (is_valid_animated<IC3fGeomParam>(arbGeomParams, prop_header)) {
516 if (is_valid_animated<IC4fGeomParam>(arbGeomParams, prop_header)) {
527 if (settings->
is_sequence || !schema.isConstant()) {
531 IV2fGeomParam uvsParam = schema.getUVsParam();
532 if (uvsParam.valid() && !uvsParam.isConstant()) {
536 IN3fGeomParam normalsParam = schema.getNormalsParam();
537 if (normalsParam.valid() && !normalsParam.isConstant()) {
541 ICompoundProperty arbGeomParams = schema.getArbGeomParams();
569 readFaceSetsSample(bmain,
mesh, sample_sel);
577 const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header,
579 const char **err_str)
const
581 if (!Alembic::AbcGeom::IPolyMesh::matches(alembic_header)) {
583 "Object type mismatch, Alembic object path pointed to PolyMesh when importing, but not "
589 *err_str =
"Object type mismatch, Alembic object path points to PolyMesh.";
598 IPolyMeshSchema::Sample
sample;
600 sample = m_schema.getValue(sample_sel);
602 catch (Alembic::Util::Exception &ex) {
603 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
605 m_schema.getName().c_str(),
606 sample_sel.getRequestedTime(),
612 const P3fArraySamplePtr &positions =
sample.getPositions();
613 const Alembic::Abc::Int32ArraySamplePtr &face_indices =
sample.getFaceIndices();
614 const Alembic::Abc::Int32ArraySamplePtr &face_counts =
sample.getFaceCounts();
616 return positions->size() != existing_mesh->
totvert ||
617 face_counts->size() != existing_mesh->
totpoly ||
618 face_indices->size() != existing_mesh->
totloop;
622 const ISampleSelector &sample_sel,
624 const char **err_str)
626 IPolyMeshSchema::Sample
sample;
628 sample = m_schema.getValue(sample_sel);
630 catch (Alembic::Util::Exception &ex) {
631 if (err_str !=
nullptr) {
632 *err_str =
"Error reading mesh sample; more detail on the console";
634 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
636 m_schema.getName().c_str(),
637 sample_sel.getRequestedTime(),
639 return existing_mesh;
642 const P3fArraySamplePtr &positions =
sample.getPositions();
643 const Alembic::Abc::Int32ArraySamplePtr &face_indices =
sample.getFaceIndices();
644 const Alembic::Abc::Int32ArraySamplePtr &face_counts =
sample.getFaceCounts();
647 const int poly_count = face_counts->size();
648 const int loop_count = face_indices->size();
650 if (poly_count > 0 && loop_count < poly_count * 2) {
651 if (err_str !=
nullptr) {
652 *err_str =
"Invalid mesh; more detail on the console";
654 printf(
"Alembic: invalid mesh sample for '%s/%s' at time %f, less than 2 loops per face\n",
656 m_schema.getName().c_str(),
657 sample_sel.getRequestedTime());
658 return existing_mesh;
661 Mesh *new_mesh =
nullptr;
669 existing_mesh, positions->
size(), 0, 0, face_indices->size(), face_counts->size());
677 if (face_counts->size() != existing_mesh->
totpoly ||
678 face_indices->size() != existing_mesh->
totloop) {
683 "Topology has changed, perhaps by triangulating the"
684 " mesh. Only vertices will be read!";
689 Mesh *mesh_to_export = new_mesh ? new_mesh : existing_mesh;
692 config.
time = sample_sel.getRequestedTime();
701 size_t num_polys = new_mesh->
totpoly;
703 std::map<std::string, int> mat_map;
704 assign_facesets_to_mpoly(sample_sel, new_mesh->
mpoly, num_polys, mat_map);
710 return existing_mesh;
713 void AbcMeshReader::assign_facesets_to_mpoly(
const ISampleSelector &sample_sel,
716 std::map<std::string, int> &r_mat_map)
718 std::vector<std::string> face_sets;
719 m_schema.getFaceSetNames(face_sets);
721 if (face_sets.empty()) {
727 for (
const std::string &grp_name : face_sets) {
728 if (r_mat_map.find(grp_name) == r_mat_map.end()) {
729 r_mat_map[grp_name] = ++current_mat;
732 const int assigned_mat = r_mat_map[grp_name];
734 const IFaceSet faceset = m_schema.getFaceSet(grp_name);
736 if (!faceset.valid()) {
737 std::cerr <<
" Face set " << grp_name <<
" invalid for " <<
m_object_name <<
"\n";
741 const IFaceSetSchema face_schem = faceset.getSchema();
742 const IFaceSetSchema::Sample face_sample = face_schem.getValue(sample_sel);
743 const Int32ArraySamplePtr group_faces = face_sample.getFaces();
744 const size_t num_group_faces = group_faces->size();
746 for (
size_t l = 0;
l < num_group_faces;
l++) {
747 size_t pos = (*group_faces)[
l];
749 if (
pos >= totpoly) {
750 std::cerr <<
"Faceset overflow on " << faceset.getName() <<
'\n';
755 poly.
mat_nr = assigned_mat - 1;
760 void AbcMeshReader::readFaceSetsSample(
Main *bmain,
Mesh *
mesh,
const ISampleSelector &sample_sel)
762 std::map<std::string, int> mat_map;
771 for (
int i = 0,
e = totedge; i <
e; i++) {
772 MEdge &edge = edges[i];
774 if (edge.
v1 ==
v1 && edge.
v2 ==
v2) {
784 const ISubDSchema &schema,
785 const ISampleSelector &selector,
788 const ISubDSchema::Sample
sample = schema.getValue(selector);
797 if (config.
weight != 0.0f) {
798 Alembic::AbcGeom::ISubDSchema::Sample ceil_sample;
799 schema.get(ceil_sample, Alembic::Abc::ISampleSelector(config.
ceil_index));
804 read_uvs_params(config, abc_mesh_data, schema.getUVsParam(), selector);
820 read_custom_data(iobject_full_name, schema.getArbGeomParams(), config, selector);
831 ISubD isubd_mesh(
m_iobject, kWrapExisting);
832 m_schema = isubd_mesh.getSchema();
839 return m_schema.valid();
843 const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header,
845 const char **err_str)
const
847 if (!Alembic::AbcGeom::ISubD::matches(alembic_header)) {
849 "Object type mismatch, Alembic object path pointed to SubD when importing, but not any "
855 *err_str =
"Object type mismatch, Alembic object path points to SubD.";
874 ISubDSchema::Sample
sample;
876 sample = m_schema.getValue(sample_sel);
878 catch (Alembic::Util::Exception &ex) {
879 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
881 m_schema.getName().c_str(),
882 sample_sel.getRequestedTime(),
888 Alembic::Abc::FloatArraySamplePtr sharpnesses =
sample.getCreaseSharpnesses();
894 for (
int i = 0, s = 0,
e =
indices->size(); i <
e; i += 2, s++) {
895 int v1 = (*indices)[i];
896 int v2 = (*indices)[i + 1];
905 if (edge ==
nullptr) {
927 const ISampleSelector &sample_sel,
929 const char **err_str)
931 ISubDSchema::Sample
sample;
933 sample = m_schema.getValue(sample_sel);
935 catch (Alembic::Util::Exception &ex) {
936 if (err_str !=
nullptr) {
937 *err_str =
"Error reading mesh sample; more detail on the console";
939 printf(
"Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n",
941 m_schema.getName().c_str(),
942 sample_sel.getRequestedTime(),
944 return existing_mesh;
947 const P3fArraySamplePtr &positions =
sample.getPositions();
948 const Alembic::Abc::Int32ArraySamplePtr &face_indices =
sample.getFaceIndices();
949 const Alembic::Abc::Int32ArraySamplePtr &face_counts =
sample.getFaceCounts();
951 Mesh *new_mesh =
nullptr;
956 if (existing_mesh->
totvert != positions->size()) {
958 existing_mesh, positions->
size(), 0, 0, face_indices->size(), face_counts->size());
966 if (face_counts->size() != existing_mesh->
totpoly ||
967 face_indices->size() != existing_mesh->
totloop) {
972 "Topology has changed, perhaps by triangulating the"
973 " mesh. Only vertices will be read!";
979 Mesh *mesh_to_export = new_mesh ? new_mesh : existing_mesh;
982 config.
time = sample_sel.getRequestedTime();
985 return mesh_to_export;
typedef float(TangentPoint)[2]
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)
const CustomData_MeshMasks CD_MASK_MESH
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)
struct Material * BKE_material_add(struct Main *bmain, const char *name)
bool BKE_object_material_slot_add(struct Main *bmain, struct Object *ob)
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)
void BKE_mesh_calc_normals(struct Mesh *me)
void BKE_mesh_calc_edges(struct Mesh *mesh, bool keep_existing_edges, const bool select_new_edges)
void BKE_mesh_set_custom_normals_from_vertices(struct Mesh *mesh, float(*r_custom_vertnors)[3])
void BKE_mesh_set_custom_normals(struct Mesh *mesh, float(*r_custom_loopnors)[3])
bool BKE_mesh_validate(struct Mesh *me, const bool do_verbose, const bool cddata_check_mask)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_NONNULL(1) ATTR_RETURNS_NONNULL
#define LISTBASE_FOREACH(type, var, list)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE void normal_float_to_short_v3(short r[3], const float n[3])
@ MOD_MESHSEQ_INTERPOLATE_VERTICES
#define MOD_MESHSEQ_READ_ALL
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
struct Mesh * read_mesh(struct Mesh *existing_mesh, const Alembic::Abc::ISampleSelector &sample_sel, int read_flag, 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(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
void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel)
bool accepts_object_type(const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header, const Object *const ob, const char **err_str) const
struct Mesh * read_mesh(struct Mesh *existing_mesh, const Alembic::Abc::ISampleSelector &sample_sel, int read_flag, const char **err_str)
AbcSubDReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
static float normals[][3]
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 sample(SocketReader *reader, int x, int y, float color[4])
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)
BLI_INLINE MEdge * find_edge(MEdge *edges, int totedge, int v1, int v2)
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_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_mverts_interp(MVert *mverts, const P3fArraySamplePtr &positions, const P3fArraySamplePtr &ceil_positions, const float weight)
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_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 process_no_normals(CDStreamConfig &config)
static void read_mverts(CDStreamConfig &config, const AbcMeshData &mesh_data)
static void * add_customdata_cb(Mesh *mesh, const char *name, int data_type)
bool has_animations(Alembic::AbcGeom::IPolyMeshSchema &schema, ImportSettings *settings)
struct CustomData pdata ldata
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
bool use_vertex_interpolation