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