Blender  V2.93
abc_reader_curves.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  * The Original Code is Copyright (C) 2016 Kévin Dietrich.
17  * All rights reserved.
18  */
19 #pragma once
20 
25 #include "abc_reader_mesh.h"
26 #include "abc_reader_object.h"
27 
28 struct Curve;
29 
30 #define ABC_CURVE_RESOLUTION_U_PROPNAME "blender:resolution"
31 
32 namespace blender::io::alembic {
33 
35  Alembic::AbcGeom::ICurvesSchema m_curves_schema;
36 
37  public:
38  AbcCurveReader(const Alembic::Abc::IObject &object, ImportSettings &settings);
39 
40  bool valid() const;
41  bool accepts_object_type(const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header,
42  const Object *const ob,
43  const char **err_str) const;
44 
45  void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel);
46  struct Mesh *read_mesh(struct Mesh *existing_mesh,
47  const Alembic::Abc::ISampleSelector &sample_sel,
48  int read_flag,
49  const char **err_str);
50 
51  void read_curve_sample(Curve *cu,
52  const Alembic::AbcGeom::ICurvesSchema &schema,
53  const Alembic::Abc::ISampleSelector &sample_selector);
54 };
55 
56 } // namespace blender::io::alembic
void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel)
void read_curve_sample(Curve *cu, const Alembic::AbcGeom::ICurvesSchema &schema, const Alembic::Abc::ISampleSelector &sample_selector)
bool accepts_object_type(const Alembic::AbcCoreAbstract::ObjectHeader &alembic_header, const Object *const ob, const char **err_str) const
struct Mesh * read_mesh(struct Mesh *existing_mesh, const Alembic::Abc::ISampleSelector &sample_sel, int read_flag, const char **err_str)
AbcCurveReader(const Alembic::Abc::IObject &object, ImportSettings &settings)
Definition: BKE_main.h:116