diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2019-01-15 18:45:12 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2019-01-16 12:44:39 +0300 |
commit | 3ce9bcee70537a52f8d802abfb9e14c34f9a9251 (patch) | |
tree | 78f53ec43f4b0bf5859f1564da4cbc269cf628b7 /source/blender/alembic/intern/abc_curves.h | |
parent | 2bb6028d1a64bec0ec83c14483e1d06c802989de (diff) |
Alembic export: write curve/NURBS as mesh
It's now possible to export curves and NURBS as mesh data to Alembic.
This allows artists to do any crazy thing on curves and export the
visual result to Alembic for interoperability with other software (or
caching for later use, etc.). It's an often-requested feature.
This works around T60503 and the fixes export part of T51311.
Note that exporting zero-width curves is currently not supported, as
exporting a faceless mesh (e.g. just edges and vertices) is not
supported by the mesh writer at all.
To test, create a curve with thickness (for example extruded), export to
Alembic and check the 'Curves to Mesh' checkbox in the export options.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4213
Diffstat (limited to 'source/blender/alembic/intern/abc_curves.h')
-rw-r--r-- | source/blender/alembic/intern/abc_curves.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/alembic/intern/abc_curves.h b/source/blender/alembic/intern/abc_curves.h index eb80553620d..1878826468a 100644 --- a/source/blender/alembic/intern/abc_curves.h +++ b/source/blender/alembic/intern/abc_curves.h @@ -26,6 +26,7 @@ #define __ABC_CURVES_H__ #include "abc_object.h" +#include "abc_mesh.h" struct Curve; @@ -41,9 +42,21 @@ public: uint32_t time_sampling, ExportSettings &settings); +protected: void do_write(); }; +class AbcCurveMeshWriter : public AbcGenericMeshWriter { +public: + AbcCurveMeshWriter(Object *ob, + AbcTransformWriter *parent, + uint32_t time_sampling, + ExportSettings &settings); + +protected: + Mesh *getEvaluatedMesh(Scene *scene_eval, Object *ob_eval, bool &r_needsfree); +}; + /* ************************************************************************** */ class AbcCurveReader : public AbcObjectReader { |