Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/alembic/intern/abc_object.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/alembic/intern/abc_object.h')
-rw-r--r--source/blender/alembic/intern/abc_object.h229
1 files changed, 120 insertions, 109 deletions
diff --git a/source/blender/alembic/intern/abc_object.h b/source/blender/alembic/intern/abc_object.h
index d87bfb315d9..537f24ab7d6 100644
--- a/source/blender/alembic/intern/abc_object.h
+++ b/source/blender/alembic/intern/abc_object.h
@@ -38,36 +38,36 @@ struct Object;
/* ************************************************************************** */
class AbcObjectWriter {
-protected:
- Object *m_object;
- ExportSettings &m_settings;
+ protected:
+ Object *m_object;
+ ExportSettings &m_settings;
- uint32_t m_time_sampling;
+ uint32_t m_time_sampling;
- Imath::Box3d m_bounds;
- std::vector<AbcObjectWriter *> m_children;
+ Imath::Box3d m_bounds;
+ std::vector<AbcObjectWriter *> m_children;
- std::vector<std::pair<std::string, IDProperty *>> m_props;
+ std::vector<std::pair<std::string, IDProperty *>> m_props;
- bool m_first_frame;
- std::string m_name;
+ bool m_first_frame;
+ std::string m_name;
-public:
- AbcObjectWriter(Object *ob,
- uint32_t time_sampling,
- ExportSettings &settings,
- AbcObjectWriter *parent = NULL);
+ public:
+ AbcObjectWriter(Object *ob,
+ uint32_t time_sampling,
+ ExportSettings &settings,
+ AbcObjectWriter *parent = NULL);
- virtual ~AbcObjectWriter();
+ virtual ~AbcObjectWriter();
- void addChild(AbcObjectWriter *child);
+ void addChild(AbcObjectWriter *child);
- virtual Imath::Box3d bounds();
+ virtual Imath::Box3d bounds();
- void write();
+ void write();
-private:
- virtual void do_write() = 0;
+ private:
+ virtual void do_write() = 0;
};
/* ************************************************************************** */
@@ -75,45 +75,45 @@ private:
struct CacheFile;
struct ImportSettings {
- bool do_convert_mat;
- float conversion_mat[4][4];
-
- int from_up;
- int from_forward;
- float scale;
- bool is_sequence;
- bool set_frame_range;
-
- /* Length and frame offset of file sequences. */
- int sequence_len;
- int sequence_offset;
-
- /* From MeshSeqCacheModifierData.read_flag */
- int read_flag;
-
- bool validate_meshes;
-
- CacheFile *cache_file;
-
- ImportSettings()
- : do_convert_mat(false)
- , from_up(0)
- , from_forward(0)
- , scale(1.0f)
- , is_sequence(false)
- , set_frame_range(false)
- , sequence_len(1)
- , sequence_offset(0)
- , read_flag(0)
- , validate_meshes(false)
- , cache_file(NULL)
- {}
+ bool do_convert_mat;
+ float conversion_mat[4][4];
+
+ int from_up;
+ int from_forward;
+ float scale;
+ bool is_sequence;
+ bool set_frame_range;
+
+ /* Length and frame offset of file sequences. */
+ int sequence_len;
+ int sequence_offset;
+
+ /* From MeshSeqCacheModifierData.read_flag */
+ int read_flag;
+
+ bool validate_meshes;
+
+ CacheFile *cache_file;
+
+ ImportSettings()
+ : do_convert_mat(false),
+ from_up(0),
+ from_forward(0),
+ scale(1.0f),
+ is_sequence(false),
+ set_frame_range(false),
+ sequence_len(1),
+ sequence_offset(0),
+ read_flag(0),
+ validate_meshes(false),
+ cache_file(NULL)
+ {
+ }
};
-template <typename Schema>
-static bool has_animations(Schema &schema, ImportSettings *settings)
+template<typename Schema> static bool has_animations(Schema &schema, ImportSettings *settings)
{
- return settings->is_sequence || !schema.isConstant();
+ return settings->is_sequence || !schema.isConstant();
}
/* ************************************************************************** */
@@ -123,81 +123,92 @@ struct Mesh;
using Alembic::AbcCoreAbstract::chrono_t;
class AbcObjectReader {
-protected:
- std::string m_name;
- std::string m_object_name;
- std::string m_data_name;
- Object *m_object;
- Alembic::Abc::IObject m_iobject;
+ protected:
+ 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;
+ ImportSettings *m_settings;
- chrono_t m_min_time;
- chrono_t m_max_time;
+ chrono_t m_min_time;
+ chrono_t m_max_time;
- /* Use reference counting since the same reader may be used by multiple
- * modifiers and/or constraints. */
- int m_refcount;
+ /* Use reference counting since the same reader may be used by multiple
+ * modifiers and/or constraints. */
+ int m_refcount;
- bool m_inherits_xform;
+ bool m_inherits_xform;
-public:
- AbcObjectReader *parent_reader;
+ public:
+ AbcObjectReader *parent_reader;
-public:
- explicit AbcObjectReader(const Alembic::Abc::IObject &object, ImportSettings &settings);
+ public:
+ 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;
- typedef std::vector<AbcObjectReader *> ptr_vector;
+ typedef std::vector<AbcObjectReader *> ptr_vector;
- /**
- * 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();
+ /**
+ * 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;
- void object(Object *ob);
+ Object *object() const;
+ 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; }
- bool inherits_xform() const { return m_inherits_xform; }
+ 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;
+ }
+ bool inherits_xform() const
+ {
+ return m_inherits_xform;
+ }
- 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 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 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 **err_str);
+ virtual struct Mesh *read_mesh(struct Mesh *mesh,
+ const Alembic::Abc::ISampleSelector &sample_sel,
+ int read_flag,
+ const char **err_str);
- /** Reads the object matrix and sets up an object transform if animated. */
- void setupObjectTransform(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 maxTime() const;
+ chrono_t minTime() const;
+ chrono_t maxTime() const;
- int refcount() const;
- void incref();
- void decref();
+ int refcount() const;
+ void incref();
+ void decref();
- void read_matrix(float r_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);
-protected:
- void determine_inherits_xform();
+ protected:
+ void determine_inherits_xform();
};
Imath::M44d get_matrix(const Alembic::AbcGeom::IXformSchema &schema, const float time);
-#endif /* __ABC_OBJECT_H__ */
+#endif /* __ABC_OBJECT_H__ */