Changeset View
Changeset View
Standalone View
Standalone View
source/blender/alembic/intern/abc_object.h
| Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | ImportSettings() | ||||
| , validate_meshes(false) | , validate_meshes(false) | ||||
| , cache_file(NULL) | , cache_file(NULL) | ||||
| {} | {} | ||||
| }; | }; | ||||
| template <typename Schema> | template <typename Schema> | ||||
| static bool has_animations(Schema &schema, ImportSettings *settings) | static bool has_animations(Schema &schema, ImportSettings *settings) | ||||
| { | { | ||||
| if (settings->is_sequence) { | return settings->is_sequence || !schema.isConstant(); | ||||
| return true; | |||||
| } | |||||
| if (!schema.isConstant()) { | |||||
| return true; | |||||
| } | |||||
| return false; | |||||
| } | } | ||||
| /* ************************************************************************** */ | /* ************************************************************************** */ | ||||
| struct DerivedMesh; | struct DerivedMesh; | ||||
| using Alembic::AbcCoreAbstract::chrono_t; | using Alembic::AbcCoreAbstract::chrono_t; | ||||
| Show All 16 Lines | |||||
| public: | public: | ||||
| explicit AbcObjectReader(const Alembic::Abc::IObject &object, ImportSettings &settings); | explicit AbcObjectReader(const Alembic::Abc::IObject &object, ImportSettings &settings); | ||||
| virtual ~AbcObjectReader(); | virtual ~AbcObjectReader(); | ||||
| const Alembic::Abc::IObject &iobject() const; | const Alembic::Abc::IObject &iobject() const; | ||||
| /** | |||||
| * 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. | |||||
| */ | |||||
| virtual Alembic::AbcGeom::IXform xform(); | |||||
| Object *object() const; | Object *object() const; | ||||
| void object(Object *ob); | void object(Object *ob); | ||||
| const std::string & name() const { return m_name; } | |||||
| const std::string & object_name() const { return m_object_name; } | |||||
| const std::string & data_name() const { return m_data_name; } | |||||
| virtual bool valid() const = 0; | virtual bool valid() const = 0; | ||||
| virtual void readObjectData(Main *bmain, float time) = 0; | virtual void readObjectData(Main *bmain, float time) = 0; | ||||
| virtual DerivedMesh *read_derivedmesh(DerivedMesh *dm, const float time, int read_flag, const char **err_str) | virtual DerivedMesh *read_derivedmesh(DerivedMesh *dm, const float time, int read_flag, const char **err_str) | ||||
| { | { | ||||
| (void)time; | (void)time; | ||||
| (void)read_flag; | (void)read_flag; | ||||
| (void)err_str; | (void)err_str; | ||||
| return dm; | return dm; | ||||
| } | } | ||||
| void readObjectMatrix(const float time); | /** Reads the object matrix and sets up an object transform if animated. */ | ||||
| void setupObjectTransform(const float time); | |||||
| void addCacheModifier(); | void addCacheModifier(); | ||||
| chrono_t minTime() const; | chrono_t minTime() const; | ||||
| chrono_t maxTime() const; | chrono_t maxTime() const; | ||||
| int refcount() const; | int refcount() const; | ||||
| void incref(); | void incref(); | ||||
| void decref(); | void decref(); | ||||
| void read_matrix(float mat[4][4], const float time, const float scale, bool &is_constant); | void read_matrix(float r_mat[4][4], const float time, | ||||
| const float scale, bool &is_constant); | |||||
| }; | }; | ||||
| Imath::M44d get_matrix(const Alembic::AbcGeom::IXformSchema &schema, const float time); | Imath::M44d get_matrix(const Alembic::AbcGeom::IXformSchema &schema, const float time); | ||||
| #endif /* __ABC_OBJECT_H__ */ | #endif /* __ABC_OBJECT_H__ */ | ||||