31 #include <Alembic/AbcMaterial/IMaterial.h>
59 std::string name_string(name);
60 std::replace(name_string.begin(), name_string.end(),
' ',
'_');
61 std::replace(name_string.begin(), name_string.end(),
'.',
'_');
62 std::replace(name_string.begin(), name_string.end(),
':',
'_');
86 if (dupli_parent && (ob != dupli_parent)) {
97 for (
int i = 0; i < 4; i++) {
98 for (
int j = 0; j < 4; j++) {
108 for (
int i = 0; i < 4; i++) {
109 for (
int j = 0; j < 4; j++) {
110 r_mat[i][j] =
static_cast<float>(xform[i][j]);
115 void split(
const std::string &s,
const char delim, std::vector<std::string> &tokens)
119 std::stringstream ss(s);
122 while (std::getline(ss, item, delim)) {
124 tokens.push_back(item);
129 bool has_property(
const Alembic::Abc::ICompoundProperty &prop,
const std::string &name)
135 return prop.getPropertyHeader(name) !=
nullptr;
141 const Alembic::AbcCoreAbstract::TimeSamplingPtr &time_sampling,
143 Alembic::AbcGeom::index_t &i0,
144 Alembic::AbcGeom::index_t &
i1)
146 samples_number =
std::max(samples_number, 1);
151 if (samples_number == 1 || (
fabs(
time - t0.second) < 0.0001f)) {
162 const float bias = (
time - t0.second) / (t1.second - t0.second);
164 if (
fabs(1.0f - bias) < 0.0001f) {
178 const Alembic::AbcGeom::MetaData &md =
object.getMetaData();
180 if (Alembic::AbcGeom::IXform::matches(md)) {
183 else if (Alembic::AbcGeom::IPolyMesh::matches(md)) {
186 else if (Alembic::AbcGeom::ISubD::matches(md)) {
189 else if (Alembic::AbcGeom::INuPatch::matches(md)) {
200 else if (Alembic::AbcGeom::ICamera::matches(md)) {
203 else if (Alembic::AbcGeom::IPoints::matches(md)) {
206 else if (Alembic::AbcMaterial::IMaterial::matches(md)) {
209 else if (Alembic::AbcGeom::ILight::matches(md)) {
212 else if (Alembic::AbcGeom::IFaceSet::matches(md)) {
215 else if (Alembic::AbcGeom::ICurves::matches(md)) {
219 std::cerr <<
"Alembic: unknown how to handle objects of schema '" << md.get(
"schemaObjTitle")
220 <<
"', skipping object '" <<
object.getFullName() <<
"'" << std::endl;
242 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()
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)
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)
std::pair< Alembic::AbcCoreAbstract::index_t, float > index_time_pair_t
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
double PIL_check_seconds_timer(void)
ccl_device_inline float2 fabs(const float2 &a)