Blender  V3.3
abc_writer_hair.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #pragma once
3 
8 #include "abc_writer_abstract.h"
9 #include <Alembic/AbcGeom/OCurves.h>
10 #include <vector>
11 
12 namespace blender::io::alembic {
13 
15  private:
16  Alembic::AbcGeom::OCurves abc_curves_;
17  Alembic::AbcGeom::OCurvesSchema abc_curves_schema_;
18 
19  bool uv_warning_shown_;
20 
21  public:
22  explicit ABCHairWriter(const ABCWriterConstructorArgs &args);
23 
24  virtual void create_alembic_objects(const HierarchyContext *context) override;
25  virtual Alembic::Abc::OObject get_alembic_object() const override;
26 
27  protected:
28  virtual void do_write(HierarchyContext &context) override;
29  virtual bool check_is_animated(const HierarchyContext &context) const override;
30  Alembic::Abc::OCompoundProperty abc_prop_for_custom_props() override;
31 
32  private:
33  void write_hair_sample(const HierarchyContext &context,
34  struct Mesh *mesh,
35  std::vector<Imath::V3f> &verts,
36  std::vector<Imath::V3f> &norm_values,
37  std::vector<Imath::V2f> &uv_values,
38  std::vector<int32_t> &hvertices);
39 
40  void write_hair_child_sample(const HierarchyContext &context,
41  struct Mesh *mesh,
42  std::vector<Imath::V3f> &verts,
43  std::vector<Imath::V3f> &norm_values,
44  std::vector<Imath::V2f> &uv_values,
45  std::vector<int32_t> &hvertices);
46 };
47 
48 } // 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]