Blender
V3.3
|
#include <abc_reader_object.h>
Public Types | |
typedef std::vector< AbcObjectReader * > | ptr_vector |
Public Member Functions | |
AbcObjectReader (const Alembic::Abc::IObject &object, ImportSettings &settings) | |
virtual | ~AbcObjectReader ()=default |
const Alembic::Abc::IObject & | iobject () const |
virtual Alembic::AbcGeom::IXform | xform () |
Object * | object () const |
void | object (Object *ob) |
const std::string & | name () const |
const std::string & | object_name () const |
const std::string & | data_name () const |
bool | inherits_xform () const |
virtual bool | valid () const =0 |
virtual bool | accepts_object_type (const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header, const Object *const ob, const char **err_str) const =0 |
virtual void | readObjectData (Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel)=0 |
virtual struct Mesh * | read_mesh (struct Mesh *mesh, const Alembic::Abc::ISampleSelector &sample_sel, int read_flag, const char *velocity_name, float velocity_scale, const char **err_str) |
virtual bool | topology_changed (const Mesh *existing_mesh, const Alembic::Abc::ISampleSelector &sample_sel) |
void | setupObjectTransform (chrono_t time) |
void | addCacheModifier () |
chrono_t | minTime () const |
chrono_t | maxTime () const |
int | refcount () const |
void | incref () |
void | decref () |
void | read_matrix (float r_mat[4][4], chrono_t time, float scale, bool &is_constant) |
Public Attributes | |
AbcObjectReader * | parent_reader |
Protected Member Functions | |
void | determine_inherits_xform () |
Protected Attributes | |
std::string | m_name |
std::string | m_object_name |
std::string | m_data_name |
Object * | m_object |
Alembic::Abc::IObject | m_iobject |
ImportSettings * | m_settings |
chrono_t | m_min_time |
chrono_t | m_max_time |
int | m_refcount |
bool | m_inherits_xform |
Definition at line 72 of file abc_reader_object.h.
Definition at line 101 of file abc_reader_object.h.
|
explicit |
Definition at line 32 of file abc_reader_object.cc.
References determine_inherits_xform(), m_data_name, m_name, m_object_name, and blender::io::alembic::split().
|
virtualdefault |
|
pure virtual |
Implemented in blender::io::alembic::AbcEmptyReader, blender::io::alembic::AbcPointsReader, blender::io::alembic::AbcNurbsReader, blender::io::alembic::AbcSubDReader, blender::io::alembic::AbcMeshReader, blender::io::alembic::AbcCurveReader, and blender::io::alembic::AbcCameraReader.
Referenced by get_abc_reader().
void blender::io::alembic::AbcObjectReader::addCacheModifier | ( | ) |
Definition at line 260 of file abc_reader_object.cc.
References BKE_modifier_new(), BLI_addtail(), BLI_strncpy(), blender::io::alembic::ImportSettings::cache_file, MeshSeqCacheModifierData::cache_file, eModifierType_MeshSequenceCache, FILE_MAX, CacheFile::id, id_us_plus(), m_iobject, m_object, m_settings, Object::modifiers, and MeshSeqCacheModifierData::object_path.
Referenced by blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), and blender::io::alembic::AbcPointsReader::readObjectData().
|
inline |
Definition at line 120 of file abc_reader_object.h.
References m_data_name.
void blender::io::alembic::AbcObjectReader::decref | ( | ) |
Definition at line 293 of file abc_reader_object.cc.
References BLI_assert, and m_refcount.
Referenced by ABC_CacheReader_free(), and import_endjob().
|
protected |
Determine whether we can inherit our parent's XForm.
Definition at line 56 of file abc_reader_object.cc.
References m_inherits_xform, and xform().
Referenced by AbcObjectReader().
void blender::io::alembic::AbcObjectReader::incref | ( | ) |
Definition at line 288 of file abc_reader_object.cc.
References m_refcount.
Referenced by ABC_CacheReader_incref(), CacheReader_open_alembic_object(), and visit_object().
|
inline |
Definition at line 124 of file abc_reader_object.h.
References m_inherits_xform.
Referenced by import_startjob().
const IObject & blender::io::alembic::AbcObjectReader::iobject | ( | ) | const |
Definition at line 85 of file abc_reader_object.cc.
References m_iobject.
Referenced by get_abc_reader().
chrono_t blender::io::alembic::AbcObjectReader::maxTime | ( | ) | const |
Definition at line 278 of file abc_reader_object.cc.
References m_max_time.
Referenced by import_startjob().
chrono_t blender::io::alembic::AbcObjectReader::minTime | ( | ) | const |
Definition at line 273 of file abc_reader_object.cc.
References m_min_time.
Referenced by import_startjob().
|
inline |
Definition at line 112 of file abc_reader_object.h.
References m_name.
Referenced by import_startjob().
Object * blender::io::alembic::AbcObjectReader::object | ( | ) | const |
Definition at line 90 of file abc_reader_object.cc.
References m_object.
Referenced by ABC_get_transform(), CacheReader_open_alembic_object(), import_endjob(), and import_startjob().
Definition at line 95 of file abc_reader_object.cc.
References m_object.
|
inline |
Definition at line 116 of file abc_reader_object.h.
References m_object_name.
void blender::io::alembic::AbcObjectReader::read_matrix | ( | float | r_mat[4][4], |
chrono_t | time, | ||
float | scale, | ||
bool & | is_constant | ||
) |
Definition at line 218 of file abc_reader_object.cc.
References blender::io::alembic::ABC_ZUP_FROM_YUP, axis_angle_to_mat4_single(), blender::io::alembic::convert_matrix_datatype(), blender::io::alembic::copy_m44_axis_swap(), blender::io::alembic::get_matrix(), m_inherits_xform, m_object, M_PI_2, mul_m4_m4m4(), OB_CAMERA, scale_m4_fl(), time, Object::type, unit_m4(), and xform().
Referenced by ABC_get_transform(), and setupObjectTransform().
|
virtual |
Reimplemented in blender::io::alembic::AbcPointsReader, blender::io::alembic::AbcSubDReader, blender::io::alembic::AbcMeshReader, and blender::io::alembic::AbcCurveReader.
Definition at line 135 of file abc_reader_object.cc.
Referenced by ABC_read_mesh().
|
pure virtual |
Implemented in blender::io::alembic::AbcEmptyReader, blender::io::alembic::AbcPointsReader, blender::io::alembic::AbcNurbsReader, blender::io::alembic::AbcSubDReader, blender::io::alembic::AbcMeshReader, blender::io::alembic::AbcCurveReader, and blender::io::alembic::AbcCameraReader.
Referenced by import_startjob().
int blender::io::alembic::AbcObjectReader::refcount | ( | ) | const |
Definition at line 283 of file abc_reader_object.cc.
References m_refcount.
Referenced by ABC_CacheReader_free(), and import_endjob().
void blender::io::alembic::AbcObjectReader::setupObjectTransform | ( | chrono_t | time | ) |
Reads the object matrix and sets up an object transform if animated.
Definition at line 153 of file abc_reader_object.cc.
References blender::io::alembic::ImportSettings::always_add_cache_reader, axis_angle_to_mat4_single(), BKE_constraint_add_for_object(), BKE_object_apply_mat4(), BKE_object_to_mat4(), BLI_strncpy(), blender::io::alembic::ImportSettings::cache_file, CONSTRAINT_TYPE_TRANSFORM_CACHE, data, bConstraint::data, FILE_MAX, id_us_plus(), m_iobject, m_object, M_PI_2, m_settings, OB_CAMERA, Object::obmat, Object::parent, Object::parentinv, read_matrix(), blender::io::alembic::ImportSettings::scale, time, and Object::type.
Referenced by import_startjob().
|
virtual |
Reimplemented in blender::io::alembic::AbcMeshReader.
Definition at line 145 of file abc_reader_object.cc.
Referenced by ABC_mesh_topology_changed().
|
pure virtual |
Implemented in blender::io::alembic::AbcEmptyReader, blender::io::alembic::AbcPointsReader, blender::io::alembic::AbcNurbsReader, blender::io::alembic::AbcSubDReader, blender::io::alembic::AbcMeshReader, blender::io::alembic::AbcCurveReader, and blender::io::alembic::AbcCameraReader.
Referenced by import_startjob().
|
virtual |
Returns the transform of this object. This can be the Alembic object itself (in case of an Empty) or it can be the parent Alembic object.
Definition at line 181 of file abc_reader_object.cc.
References m_iobject.
Referenced by blender::io::alembic::AbcEmptyReader::AbcEmptyReader(), determine_inherits_xform(), and read_matrix().
|
protected |
Definition at line 76 of file abc_reader_object.h.
Referenced by AbcObjectReader(), data_name(), blender::io::alembic::AbcCameraReader::readObjectData(), blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcNurbsReader::readObjectData(), and blender::io::alembic::AbcPointsReader::readObjectData().
|
protected |
Definition at line 89 of file abc_reader_object.h.
Referenced by determine_inherits_xform(), inherits_xform(), and read_matrix().
|
protected |
Definition at line 78 of file abc_reader_object.h.
Referenced by blender::io::alembic::AbcCameraReader::AbcCameraReader(), blender::io::alembic::AbcCurveReader::AbcCurveReader(), blender::io::alembic::AbcEmptyReader::AbcEmptyReader(), blender::io::alembic::AbcMeshReader::AbcMeshReader(), blender::io::alembic::AbcNurbsReader::AbcNurbsReader(), blender::io::alembic::AbcPointsReader::AbcPointsReader(), blender::io::alembic::AbcSubDReader::AbcSubDReader(), addCacheModifier(), iobject(), blender::io::alembic::AbcCurveReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_mesh(), blender::io::alembic::AbcMeshReader::read_mesh(), blender::io::alembic::AbcSubDReader::read_mesh(), blender::io::alembic::AbcPointsReader::read_mesh(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcNurbsReader::readObjectData(), setupObjectTransform(), blender::io::alembic::AbcMeshReader::topology_changed(), and xform().
|
protected |
Definition at line 83 of file abc_reader_object.h.
Referenced by blender::io::alembic::AbcCameraReader::AbcCameraReader(), blender::io::alembic::AbcCurveReader::AbcCurveReader(), blender::io::alembic::AbcEmptyReader::AbcEmptyReader(), blender::io::alembic::AbcMeshReader::AbcMeshReader(), blender::io::alembic::AbcNurbsReader::AbcNurbsReader(), blender::io::alembic::AbcPointsReader::AbcPointsReader(), blender::io::alembic::AbcSubDReader::AbcSubDReader(), and maxTime().
|
protected |
Definition at line 82 of file abc_reader_object.h.
Referenced by blender::io::alembic::AbcCameraReader::AbcCameraReader(), blender::io::alembic::AbcCurveReader::AbcCurveReader(), blender::io::alembic::AbcEmptyReader::AbcEmptyReader(), blender::io::alembic::AbcMeshReader::AbcMeshReader(), blender::io::alembic::AbcNurbsReader::AbcNurbsReader(), blender::io::alembic::AbcPointsReader::AbcPointsReader(), blender::io::alembic::AbcSubDReader::AbcSubDReader(), and minTime().
|
protected |
Definition at line 74 of file abc_reader_object.h.
Referenced by AbcObjectReader(), and name().
|
protected |
Definition at line 77 of file abc_reader_object.h.
Referenced by addCacheModifier(), object(), read_matrix(), blender::io::alembic::AbcCurveReader::read_mesh(), blender::io::alembic::AbcCameraReader::readObjectData(), blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcNurbsReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), blender::io::alembic::AbcEmptyReader::readObjectData(), and setupObjectTransform().
|
protected |
Definition at line 75 of file abc_reader_object.h.
Referenced by blender::io::alembic::AbcEmptyReader::AbcEmptyReader(), AbcObjectReader(), object_name(), blender::io::alembic::AbcCameraReader::readObjectData(), blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcNurbsReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), and blender::io::alembic::AbcEmptyReader::readObjectData().
|
protected |
Definition at line 87 of file abc_reader_object.h.
Referenced by decref(), incref(), and refcount().
|
protected |
Definition at line 80 of file abc_reader_object.h.
Referenced by blender::io::alembic::AbcMeshReader::AbcMeshReader(), blender::io::alembic::AbcSubDReader::AbcSubDReader(), addCacheModifier(), blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), and setupObjectTransform().
AbcObjectReader* blender::io::alembic::AbcObjectReader::parent_reader |
Definition at line 92 of file abc_reader_object.h.
Referenced by import_startjob(), and visit_object().