Cleanup: Alembic, move the C++ code to blender::io::alembic namespace

This commit only moves code into the `blender::io::alembic` namespace,
it does not move `static` functions into an anonymous namespace.

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2020-06-19 14:31:04 +02:00
parent 89b7f785e6
commit 1a448c66ed
48 changed files with 370 additions and 10 deletions

@ -49,6 +49,8 @@ extern "C" {
#include "WM_types.h"
}
using namespace blender::io::alembic;
struct ExportJobData {
ViewLayer *view_layer;
Main *bmain;

@ -67,6 +67,10 @@ using Alembic::Abc::TimeSamplingPtr;
/* ************************************************************************** */
namespace blender {
namespace io {
namespace alembic {
ExportSettings::ExportSettings()
: scene(NULL),
view_layer(NULL),
@ -671,3 +675,7 @@ void AbcExporter::setCurrentFrame(Main *bmain, double t)
m_settings.scene->r.subframe = static_cast<float>(t) - m_settings.scene->r.cfra;
BKE_scene_graph_update_for_newframe(m_settings.depsgraph, bmain);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -28,10 +28,6 @@
#include "intern/abc_util.h"
class AbcObjectWriter;
class AbcTransformWriter;
class ArchiveWriter;
struct Base;
struct Depsgraph;
struct Main;
@ -39,6 +35,14 @@ struct Object;
struct Scene;
struct ViewLayer;
namespace blender {
namespace io {
namespace alembic {
class AbcObjectWriter;
class AbcTransformWriter;
class ArchiveWriter;
struct ExportSettings {
ExportSettings();
@ -124,4 +128,8 @@ class AbcExporter {
void setCurrentFrame(Main *bmain, double t);
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_EXPORTER_H__ */

@ -40,6 +40,10 @@ using Alembic::Abc::ErrorHandler;
using Alembic::Abc::kWrapExisting;
using Alembic::Abc::OArchive;
namespace blender {
namespace io {
namespace alembic {
/* This kinda duplicates CreateArchiveWithInfo, but Alembic does not seem to
* have a version supporting streams. */
static OArchive create_archive(std::ostream *ostream,
@ -96,3 +100,7 @@ OArchive &ArchiveWriter::archive()
{
return m_archive;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -32,6 +32,10 @@
struct Main;
struct Scene;
namespace blender {
namespace io {
namespace alembic {
/* Wrappers around input and output archives. The goal is to be able to use
* streams so that unicode paths work on Windows (T49112), and to make sure that
* the stream objects remain valid as long as the archives are open.
@ -47,4 +51,8 @@ class ArchiveWriter {
Alembic::Abc::OArchive &archive();
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_ARCHIVE_H__ */

@ -27,6 +27,10 @@
using Alembic::AbcGeom::OCamera;
using Alembic::AbcGeom::OFloatProperty;
namespace blender {
namespace io {
namespace alembic {
AbcCameraWriter::AbcCameraWriter(Object *ob,
AbcTransformWriter *parent,
uint32_t time_sampling,
@ -77,3 +81,7 @@ void AbcCameraWriter::do_write()
m_camera_sample.setLensSqueezeRatio(1.0);
m_camera_schema.set(m_camera_sample);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -25,6 +25,10 @@
/* ************************************************************************** */
namespace blender {
namespace io {
namespace alembic {
class AbcCameraWriter : public AbcObjectWriter {
Alembic::AbcGeom::OCameraSchema m_camera_schema;
Alembic::AbcGeom::CameraSample m_camera_sample;
@ -42,4 +46,8 @@ class AbcCameraWriter : public AbcObjectWriter {
virtual void do_write();
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_CAMERA_H__ */

@ -40,6 +40,10 @@ using Alembic::AbcGeom::OInt16Property;
using Alembic::AbcGeom::ON3fGeomParam;
using Alembic::AbcGeom::OV2fGeomParam;
namespace blender {
namespace io {
namespace alembic {
AbcCurveWriter::AbcCurveWriter(Object *ob,
AbcTransformWriter *parent,
uint32_t time_sampling,
@ -186,3 +190,7 @@ Mesh *AbcCurveMeshWriter::getEvaluatedMesh(Scene * /*scene_eval*/,
r_needsfree = true;
return BKE_mesh_new_nomain_from_curve(ob_eval);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -27,6 +27,10 @@
#include "abc_writer_mesh.h"
#include "abc_writer_object.h"
namespace blender {
namespace io {
namespace alembic {
class AbcCurveWriter : public AbcObjectWriter {
Alembic::AbcGeom::OCurvesSchema m_schema;
Alembic::AbcGeom::OCurvesSchema::Sample m_sample;
@ -52,4 +56,8 @@ class AbcCurveMeshWriter : public AbcGenericMeshWriter {
Mesh *getEvaluatedMesh(Scene *scene_eval, Object *ob_eval, bool &r_needsfree);
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_CURVES_H__ */

@ -44,6 +44,10 @@ using Alembic::AbcGeom::OV2fGeomParam;
/* ************************************************************************** */
namespace blender {
namespace io {
namespace alembic {
AbcHairWriter::AbcHairWriter(Object *ob,
AbcTransformWriter *parent,
uint32_t time_sampling,
@ -289,3 +293,7 @@ void AbcHairWriter::write_hair_child_sample(Mesh *mesh,
}
}
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -23,9 +23,14 @@
#include "abc_writer_object.h"
struct Mesh;
struct ParticleSettings;
struct ParticleSystem;
namespace blender {
namespace io {
namespace alembic {
class AbcHairWriter : public AbcObjectWriter {
ParticleSystem *m_psys;
@ -59,4 +64,8 @@ class AbcHairWriter : public AbcObjectWriter {
std::vector<int32_t> &hvertices);
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_HAIR_H__ */

@ -33,6 +33,10 @@
#include "BLI_utildefines.h"
namespace blender {
namespace io {
namespace alembic {
AbcMBallWriter::AbcMBallWriter(Main *bmain,
Object *ob,
AbcTransformWriter *parent,
@ -93,3 +97,7 @@ bool AbcMBallWriter::isBasisBall(Scene *scene, Object *ob)
Object *basis_ob = BKE_mball_basis_find(scene, ob);
return ob == basis_ob;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -27,6 +27,10 @@
struct Main;
struct Object;
namespace blender {
namespace io {
namespace alembic {
/* AbcMBallWriter converts the metaballs to meshes at every frame,
* and defers to AbcGenericMeshWriter to perform the writing
* to the Alembic file. Only the basis balls are exported, as this
@ -53,4 +57,8 @@ class AbcMBallWriter : public AbcGenericMeshWriter {
bool isAnimated() const override;
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_MBALL_H__ */

@ -58,6 +58,10 @@ using Alembic::AbcGeom::OSubDSchema;
using Alembic::AbcGeom::OV2fGeomParam;
using Alembic::AbcGeom::UInt32ArraySample;
namespace blender {
namespace io {
namespace alembic {
/* NOTE: Alembic's polygon winding order is clockwise, to match with Renderman. */
static void get_vertices(struct Mesh *mesh, std::vector<Imath::V3f> &points)
@ -589,3 +593,7 @@ Mesh *AbcMeshWriter::getEvaluatedMesh(Scene *scene_eval,
{
return mesh_get_eval_final(m_settings.depsgraph, scene_eval, ob_eval, &CD_MASK_MESH);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -27,6 +27,10 @@
struct Mesh;
struct ModifierData;
namespace blender {
namespace io {
namespace alembic {
/* Writer for Alembic meshes. Does not assume the object is a mesh object. */
class AbcGenericMeshWriter : public AbcObjectWriter {
protected:
@ -88,4 +92,8 @@ class AbcMeshWriter : public AbcGenericMeshWriter {
virtual Mesh *getEvaluatedMesh(Scene *scene_eval, Object *ob_eval, bool &r_needsfree) override;
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_MESH_H__ */

@ -35,6 +35,10 @@ using Alembic::AbcGeom::OCompoundProperty;
using Alembic::AbcGeom::ONuPatch;
using Alembic::AbcGeom::ONuPatchSchema;
namespace blender {
namespace io {
namespace alembic {
AbcNurbsWriter::AbcNurbsWriter(Object *ob,
AbcTransformWriter *parent,
uint32_t time_sampling,
@ -168,3 +172,7 @@ void AbcNurbsWriter::do_write()
m_nurbs_schema[count].set(sample);
}
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -23,6 +23,10 @@
#include "abc_writer_object.h"
namespace blender {
namespace io {
namespace alembic {
class AbcNurbsWriter : public AbcObjectWriter {
std::vector<Alembic::AbcGeom::ONuPatchSchema> m_nurbs_schema;
bool m_is_animated;
@ -39,4 +43,8 @@ class AbcNurbsWriter : public AbcObjectWriter {
bool isAnimated() const;
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_NURBS_H__ */

@ -24,6 +24,10 @@
#include "BKE_object.h"
namespace blender {
namespace io {
namespace alembic {
AbcObjectWriter::AbcObjectWriter(Object *ob,
uint32_t time_sampling,
ExportSettings &settings,
@ -85,3 +89,7 @@ void AbcObjectWriter::write()
do_write();
m_first_frame = false;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -28,11 +28,15 @@
#include "DNA_ID.h"
class AbcTransformWriter;
struct Main;
struct Object;
namespace blender {
namespace io {
namespace alembic {
class AbcTransformWriter;
class AbcObjectWriter {
protected:
Object *m_object;
@ -66,4 +70,8 @@ class AbcObjectWriter {
virtual void do_write() = 0;
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_OBJECT_H__ */

@ -42,6 +42,10 @@ using Alembic::AbcGeom::OPointsSchema;
/* ************************************************************************** */
namespace blender {
namespace io {
namespace alembic {
AbcPointsWriter::AbcPointsWriter(Object *ob,
AbcTransformWriter *parent,
uint32_t time_sampling,
@ -120,3 +124,7 @@ void AbcPointsWriter::do_write()
m_schema.set(m_sample);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -31,6 +31,10 @@ struct ParticleSystem;
/* ************************************************************************** */
namespace blender {
namespace io {
namespace alembic {
class AbcPointsWriter : public AbcObjectWriter {
Alembic::AbcGeom::OPointsSchema m_schema;
Alembic::AbcGeom::OPointsSchema::Sample m_sample;
@ -46,4 +50,8 @@ class AbcPointsWriter : public AbcObjectWriter {
void do_write();
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_POINTS_H__ */

@ -32,6 +32,10 @@
using Alembic::AbcGeom::OObject;
using Alembic::AbcGeom::OXform;
namespace blender {
namespace io {
namespace alembic {
AbcTransformWriter::AbcTransformWriter(Object *ob,
const OObject &abc_parent,
AbcTransformWriter *parent,
@ -122,3 +126,7 @@ bool AbcTransformWriter::hasAnimation(Object * /*ob*/) const
{
return true;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -25,6 +25,10 @@
#include <Alembic/AbcGeom/All.h>
namespace blender {
namespace io {
namespace alembic {
class AbcTransformWriter : public AbcObjectWriter {
Alembic::AbcGeom::OXform m_xform;
Alembic::AbcGeom::OXformSchema m_schema;
@ -57,4 +61,8 @@ class AbcTransformWriter : public AbcObjectWriter {
bool hasAnimation(Object *ob) const;
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_WRITER_TRANSFORM_H__ */

@ -27,6 +27,10 @@ extern "C" {
#include "BLI_math_geom.h"
}
namespace blender {
namespace io {
namespace alembic {
void create_swapped_rotation_matrix(float rot_x_mat[3][3],
float rot_y_mat[3][3],
float rot_z_mat[3][3],
@ -72,7 +76,8 @@ void create_swapped_rotation_matrix(float rot_x_mat[3][3],
rot_z_mat[1][0] = -sin(rz);
rot_z_mat[0][1] = sin(rz);
rot_z_mat[1][1] = cos(rz);
}
} // namespace
// alembicvoidcreate_swapped_rotation_matrix(floatrot_x_mat[3][3],floatrot_y_mat[3][3],floatrot_z_mat[3][3],constfloateuler[3],AbcAxisSwapModemode)
/* Convert matrix from Z=up to Y=up or vice versa.
* Use yup_mat = zup_mat for in-place conversion. */
@ -164,3 +169,7 @@ void create_transform_matrix(Object *obj,
copy_m44_axis_swap(r_yup_mat, zup_mat, ABC_YUP_FROM_ZUP);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -30,6 +30,10 @@ struct Object;
# define ABC_INLINE static inline
#endif
namespace blender {
namespace io {
namespace alembic {
/* TODO(kevin): for now keeping these transformations hardcoded to make sure
* everything works properly, and also because Alembic is almost exclusively
* used in Y-up software, but eventually they'll be set by the user in the UI
@ -97,3 +101,7 @@ void create_transform_matrix(Object *obj,
float r_transform_mat[4][4],
AbcMatrixMode mode,
Object *proxy_from);
} // namespace alembic
} // namespace io
} // namespace blender

@ -50,6 +50,9 @@ using Alembic::Abc::V2fArraySample;
using Alembic::AbcGeom::OC4fGeomParam;
using Alembic::AbcGeom::OV2fGeomParam;
namespace blender {
namespace io {
namespace alembic {
static void get_uvs(const CDStreamConfig &config,
std::vector<Imath::V2f> &uvs,
@ -485,3 +488,7 @@ void read_custom_data(const std::string &iobject_full_name,
}
}
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -38,6 +38,9 @@ struct Mesh;
using Alembic::Abc::ICompoundProperty;
using Alembic::Abc::OCompoundProperty;
namespace blender {
namespace io {
namespace alembic {
struct UVSample {
std::vector<Imath::V2f> uvs;
@ -112,4 +115,8 @@ void read_custom_data(const std::string &iobject_full_name,
const CDStreamConfig &config,
const Alembic::Abc::ISampleSelector &iss);
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_CUSTOMDATA_H__ */

@ -39,6 +39,10 @@ using Alembic::Abc::Exception;
using Alembic::Abc::IArchive;
using Alembic::Abc::kWrapExisting;
namespace blender {
namespace io {
namespace alembic {
static IArchive open_archive(const std::string &filename,
const std::vector<std::istream *> &input_streams)
{
@ -103,3 +107,7 @@ Alembic::Abc::IObject ArchiveReader::getTop()
{
return m_archive.getTop();
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -32,6 +32,10 @@
struct Main;
struct Scene;
namespace blender {
namespace io {
namespace alembic {
/* Wrappers around input and output archives. The goal is to be able to use
* streams so that unicode paths work on Windows (T49112), and to make sure that
* the stream objects remain valid as long as the archives are open.
@ -50,4 +54,8 @@ class ArchiveReader {
Alembic::Abc::IObject getTop();
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_ARCHIVE_H__ */

@ -37,6 +37,10 @@ using Alembic::AbcGeom::IFloatProperty;
using Alembic::AbcGeom::ISampleSelector;
using Alembic::AbcGeom::kWrapExisting;
namespace blender {
namespace io {
namespace alembic {
AbcCameraReader::AbcCameraReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
: AbcObjectReader(object, settings)
{
@ -109,3 +113,7 @@ void AbcCameraReader::readObjectData(Main *bmain, const ISampleSelector &sample_
m_object = BKE_object_add_only_object(bmain, OB_CAMERA, m_object_name.c_str());
m_object->data = bcam;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -23,6 +23,10 @@
#include "abc_reader_object.h"
namespace blender {
namespace io {
namespace alembic {
class AbcCameraReader : public AbcObjectReader {
Alembic::AbcGeom::ICameraSchema m_schema;
@ -37,4 +41,8 @@ class AbcCameraReader : public AbcObjectReader {
void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel);
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_CAMERA_H__ */

@ -54,6 +54,10 @@ using Alembic::AbcGeom::IInt16Property;
using Alembic::AbcGeom::ISampleSelector;
using Alembic::AbcGeom::kWrapExisting;
namespace blender {
namespace io {
namespace alembic {
AbcCurveReader::AbcCurveReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
: AbcObjectReader(object, settings)
{
@ -351,3 +355,7 @@ Mesh *AbcCurveReader::read_mesh(Mesh *existing_mesh,
return BKE_mesh_new_nomain_from_curve(m_object);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -31,6 +31,10 @@ struct Curve;
#define ABC_CURVE_RESOLUTION_U_PROPNAME "blender:resolution"
namespace blender {
namespace io {
namespace alembic {
class AbcCurveReader : public AbcObjectReader {
Alembic::AbcGeom::ICurvesSchema m_curves_schema;
@ -53,4 +57,8 @@ class AbcCurveReader : public AbcObjectReader {
const Alembic::Abc::ISampleSelector &sample_selector);
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_CURVES_H__ */

@ -59,6 +59,10 @@ using Alembic::AbcGeom::N3fArraySamplePtr;
using Alembic::AbcGeom::UInt32ArraySamplePtr;
using Alembic::AbcGeom::V2fArraySamplePtr;
namespace blender {
namespace io {
namespace alembic {
/* NOTE: Alembic's polygon winding order is clockwise, to match with Renderman. */
/* Some helpers for mesh generation */
@ -930,3 +934,7 @@ Mesh *AbcSubDReader::read_mesh(Mesh *existing_mesh,
return config.mesh;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -26,6 +26,10 @@
struct Mesh;
namespace blender {
namespace io {
namespace alembic {
class AbcMeshReader : public AbcObjectReader {
Alembic::AbcGeom::IPolyMeshSchema m_schema;
@ -83,4 +87,8 @@ void read_mverts(MVert *mverts,
CDStreamConfig get_config(struct Mesh *mesh);
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_MESH_H__ */

@ -44,6 +44,10 @@ using Alembic::AbcGeom::INuPatch;
using Alembic::AbcGeom::INuPatchSchema;
using Alembic::AbcGeom::IObject;
namespace blender {
namespace io {
namespace alembic {
AbcNurbsReader::AbcNurbsReader(const IObject &object, ImportSettings &settings)
: AbcObjectReader(object, settings)
{
@ -222,3 +226,7 @@ void AbcNurbsReader::getNurbsPatches(const IObject &obj)
getNurbsPatches(child);
}
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -23,6 +23,10 @@
#include "abc_reader_object.h"
namespace blender {
namespace io {
namespace alembic {
class AbcNurbsReader : public AbcObjectReader {
std::vector<std::pair<Alembic::AbcGeom::INuPatchSchema, Alembic::Abc::IObject>> m_schemas;
@ -37,4 +41,8 @@ class AbcNurbsReader : public AbcObjectReader {
void getNurbsPatches(const Alembic::Abc::IObject &obj);
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_NURBS_H__ */

@ -41,6 +41,10 @@ using Alembic::AbcGeom::IObject;
using Alembic::AbcGeom::IXform;
using Alembic::AbcGeom::IXformSchema;
namespace blender {
namespace io {
namespace alembic {
AbcObjectReader::AbcObjectReader(const IObject &object, ImportSettings &settings)
: m_name(""),
m_object_name(""),
@ -330,3 +334,7 @@ void AbcObjectReader::decref()
m_refcount--;
BLI_assert(m_refcount >= 0);
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -33,6 +33,10 @@ struct Object;
using Alembic::AbcCoreAbstract::chrono_t;
namespace blender {
namespace io {
namespace alembic {
struct ImportSettings {
bool do_convert_mat;
float conversion_mat[4][4];
@ -166,4 +170,8 @@ class AbcObjectReader {
Imath::M44d get_matrix(const Alembic::AbcGeom::IXformSchema &schema, const float time);
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_OBJECT_H__ */

@ -43,6 +43,10 @@ using Alembic::AbcGeom::IPoints;
using Alembic::AbcGeom::IPointsSchema;
using Alembic::AbcGeom::ISampleSelector;
namespace blender {
namespace io {
namespace alembic {
AbcPointsReader::AbcPointsReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
: AbcObjectReader(object, settings)
{
@ -153,3 +157,7 @@ struct Mesh *AbcPointsReader::read_mesh(struct Mesh *existing_mesh,
return new_mesh ? new_mesh : existing_mesh;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -27,6 +27,10 @@
#include "abc_customdata.h"
#include "abc_reader_object.h"
namespace blender {
namespace io {
namespace alembic {
class AbcPointsReader : public AbcObjectReader {
Alembic::AbcGeom::IPointsSchema m_schema;
Alembic::AbcGeom::IPointsSchema::Sample m_sample;
@ -51,4 +55,8 @@ void read_points_sample(const Alembic::AbcGeom::IPointsSchema &schema,
const Alembic::AbcGeom::ISampleSelector &selector,
CDStreamConfig &config);
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_POINTS_H__ */

@ -29,6 +29,10 @@
using Alembic::Abc::ISampleSelector;
namespace blender {
namespace io {
namespace alembic {
AbcEmptyReader::AbcEmptyReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
: AbcObjectReader(object, settings)
{
@ -72,3 +76,7 @@ void AbcEmptyReader::readObjectData(Main *bmain, const ISampleSelector &UNUSED(s
m_object = BKE_object_add_only_object(bmain, OB_EMPTY, m_object_name.c_str());
m_object->data = NULL;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -25,6 +25,10 @@
#include <Alembic/AbcGeom/All.h>
namespace blender {
namespace io {
namespace alembic {
class AbcEmptyReader : public AbcObjectReader {
Alembic::AbcGeom::IXformSchema m_schema;
@ -39,4 +43,8 @@ class AbcEmptyReader : public AbcObjectReader {
void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel);
};
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_READER_TRANSFORM_H__ */

@ -38,6 +38,10 @@
#include "PIL_time.h"
namespace blender {
namespace io {
namespace alembic {
std::string get_id_name(const Object *const ob)
{
if (!ob) {
@ -256,3 +260,7 @@ std::ostream &operator<<(std::ostream &os, const SimpleLogger &logger)
os << logger.str();
return os;
}
} // namespace alembic
} // namespace io
} // namespace blender

@ -41,12 +41,16 @@ struct CacheReader {
using Alembic::Abc::chrono_t;
class AbcObjectReader;
struct ImportSettings;
struct ID;
struct Object;
namespace blender {
namespace io {
namespace alembic {
class AbcObjectReader;
struct ImportSettings;
std::string get_id_name(const ID *const id);
std::string get_id_name(const Object *const ob);
std::string get_valid_abc_name(const char *name);
@ -165,4 +169,8 @@ class SimpleLogger {
*/
std::ostream &operator<<(std::ostream &os, const SimpleLogger &logger);
} // namespace alembic
} // namespace io
} // namespace blender
#endif /* __ABC_UTIL_H__ */

@ -99,6 +99,8 @@ using Alembic::AbcGeom::XformSample;
using Alembic::AbcMaterial::IMaterial;
using namespace blender::io::alembic;
struct AbcArchiveHandle {
int unused;
};

@ -13,6 +13,8 @@ extern "C" {
#include "DEG_depsgraph.h"
using namespace blender::io::alembic;
class TestableAbcExporter : public AbcExporter {
public:
TestableAbcExporter(Main *bmain, const char *filename, ExportSettings &settings)

@ -8,6 +8,8 @@ extern "C" {
#include "BLI_utildefines.h"
}
using namespace blender::io::alembic;
TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
{
// Input variables