17 #include <Alembic/AbcMaterial/IMaterial.h>
45 std::string name_string(name);
46 std::replace(name_string.begin(), name_string.end(),
' ',
'_');
47 std::replace(name_string.begin(), name_string.end(),
'.',
'_');
48 std::replace(name_string.begin(), name_string.end(),
':',
'_');
63 if (dupli_parent && (ob != dupli_parent)) {
74 for (
int i = 0; i < 4; i++) {
75 for (
int j = 0; j < 4; j++) {
76 m[i][j] =
static_cast<double>(mat[i][j]);
85 for (
int i = 0; i < 4; i++) {
86 for (
int j = 0; j < 4; j++) {
87 r_mat[i][j] =
static_cast<float>(xform[i][j]);
92 void split(
const std::string &s,
const char delim, std::vector<std::string> &tokens)
96 std::stringstream ss(s);
99 while (std::getline(ss, item, delim)) {
101 tokens.push_back(item);
106 bool has_property(
const Alembic::Abc::ICompoundProperty &prop,
const std::string &name)
112 return prop.getPropertyHeader(name) !=
nullptr;
115 using index_time_pair_t = std::pair<Alembic::AbcCoreAbstract::index_t, Alembic::AbcGeom::chrono_t>;
118 const Alembic::AbcCoreAbstract::TimeSamplingPtr &time_sampling,
120 Alembic::AbcGeom::index_t &i0,
121 Alembic::AbcGeom::index_t &
i1)
123 samples_number =
std::max(samples_number, 1);
128 if (samples_number == 1 || (
fabs(
time - t0.second) < 0.0001)) {
139 const double bias = (
time - t0.second) / (t1.second - t0.second);
141 if (
fabs(1.0 - bias) < 0.0001) {
155 const Alembic::AbcGeom::MetaData &md =
object.getMetaData();
157 if (Alembic::AbcGeom::IXform::matches(md)) {
160 else if (Alembic::AbcGeom::IPolyMesh::matches(md)) {
163 else if (Alembic::AbcGeom::ISubD::matches(md)) {
166 else if (Alembic::AbcGeom::INuPatch::matches(md)) {
177 else if (Alembic::AbcGeom::ICamera::matches(md)) {
180 else if (Alembic::AbcGeom::IPoints::matches(md)) {
183 else if (Alembic::AbcMaterial::IMaterial::matches(md)) {
186 else if (Alembic::AbcGeom::ILight::matches(md)) {
189 else if (Alembic::AbcGeom::IFaceSet::matches(md)) {
192 else if (Alembic::AbcGeom::ICurves::matches(md)) {
196 std::cerr <<
"Alembic: unknown how to handle objects of schema '" << md.get(
"schemaObjTitle")
197 <<
"', skipping object '" <<
object.getFullName() <<
"'" << std::endl;
219 return m_stream.str();
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
Platform independent time functions.
ScopeTimer(const char *message)
std::ostringstream & stream()
ccl_device_inline float2 fabs(const float2 &a)
static void get_weight_and_index(CDStreamConfig &config, Alembic::AbcCoreAbstract::TimeSamplingPtr time_sampling, size_t samples_number)
std::string get_valid_abc_name(const char *name)
std::ostream & operator<<(std::ostream &os, const SimpleLogger &logger)
std::string get_object_dag_path_name(const Object *const ob, Object *dupli_parent)
get_object_dag_path_name returns the name under which the object will be exported in the Alembic file...
std::string get_id_name(const Object *const ob)
std::pair< Alembic::AbcCoreAbstract::index_t, Alembic::AbcGeom::chrono_t > index_time_pair_t
Imath::M44d convert_matrix_datatype(float mat[4][4])
bool has_property(const Alembic::Abc::ICompoundProperty &prop, const std::string &name)
AbcObjectReader * create_reader(const Alembic::AbcGeom::IObject &object, ImportSettings &settings)
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
double PIL_check_seconds_timer(void)