Blender  V2.93
abc_writer_hair.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 #pragma once
17 
22 #include "abc_writer_abstract.h"
23 #include <Alembic/AbcGeom/OCurves.h>
24 #include <vector>
25 
26 namespace blender::io::alembic {
27 
29  private:
30  Alembic::AbcGeom::OCurves abc_curves_;
31  Alembic::AbcGeom::OCurvesSchema abc_curves_schema_;
32 
33  bool uv_warning_shown_;
34 
35  public:
36  explicit ABCHairWriter(const ABCWriterConstructorArgs &args);
37 
38  virtual void create_alembic_objects(const HierarchyContext *context) override;
39  virtual Alembic::Abc::OObject get_alembic_object() const override;
40 
41  protected:
42  virtual void do_write(HierarchyContext &context) override;
43  virtual bool check_is_animated(const HierarchyContext &context) const override;
44  Alembic::Abc::OCompoundProperty abc_prop_for_custom_props() override;
45 
46  private:
47  void write_hair_sample(const HierarchyContext &context,
48  struct Mesh *mesh,
49  std::vector<Imath::V3f> &verts,
50  std::vector<Imath::V3f> &norm_values,
51  std::vector<Imath::V2f> &uv_values,
52  std::vector<int32_t> &hvertices);
53 
54  void write_hair_child_sample(const HierarchyContext &context,
55  struct Mesh *mesh,
56  std::vector<Imath::V3f> &verts,
57  std::vector<Imath::V3f> &norm_values,
58  std::vector<Imath::V2f> &uv_values,
59  std::vector<int32_t> &hvertices);
60 };
61 
62 } // namespace blender::io::alembic
virtual Alembic::Abc::OObject get_alembic_object() const override
ABCHairWriter(const ABCWriterConstructorArgs &args)
virtual void do_write(HierarchyContext &context) override
virtual bool check_is_animated(const HierarchyContext &context) const override
Alembic::Abc::OCompoundProperty abc_prop_for_custom_props() override
virtual void create_alembic_objects(const HierarchyContext *context) override
static float verts[][3]
struct SELECTID_Context context
Definition: select_engine.c:47