Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/alembic/exporter/abc_writer_mesh.h
| Show All 39 Lines | private: | ||||
| Alembic::AbcGeom::OSubD abc_subdiv_; | Alembic::AbcGeom::OSubD abc_subdiv_; | ||||
| Alembic::AbcGeom::OSubDSchema abc_subdiv_schema_; | Alembic::AbcGeom::OSubDSchema abc_subdiv_schema_; | ||||
| /* Determines whether a poly mesh or a subdivision surface is exported. | /* Determines whether a poly mesh or a subdivision surface is exported. | ||||
| * The value is set by an export option but only true if there is a subdivision modifier on the | * The value is set by an export option but only true if there is a subdivision modifier on the | ||||
| * exported object. */ | * exported object. */ | ||||
| bool is_subd_; | bool is_subd_; | ||||
| ModifierData *subsurf_modifier_; | ModifierData *subsurf_modifier_; | ||||
| ModifierData *liquid_sim_modifier_; | |||||
| CDStreamConfig m_custom_data_config; | CDStreamConfig m_custom_data_config; | ||||
| public: | public: | ||||
| explicit ABCGenericMeshWriter(const ABCWriterConstructorArgs &args); | explicit ABCGenericMeshWriter(const ABCWriterConstructorArgs &args); | ||||
| virtual void create_alembic_objects(const HierarchyContext *context) override; | virtual void create_alembic_objects(const HierarchyContext *context) override; | ||||
| virtual Alembic::Abc::OObject get_alembic_object() const override; | virtual Alembic::Abc::OObject get_alembic_object() const override; | ||||
| Alembic::Abc::OCompoundProperty abc_prop_for_custom_props() override; | Alembic::Abc::OCompoundProperty abc_prop_for_custom_props() override; | ||||
| protected: | protected: | ||||
| virtual bool is_supported(const HierarchyContext *context) const override; | virtual bool is_supported(const HierarchyContext *context) const override; | ||||
| virtual void do_write(HierarchyContext &context) override; | virtual void do_write(HierarchyContext &context) override; | ||||
| virtual Mesh *get_export_mesh(Object *object_eval, bool &r_needsfree) = 0; | virtual Mesh *get_export_mesh(Object *object_eval, bool &r_needsfree) = 0; | ||||
| virtual void free_export_mesh(Mesh *mesh); | virtual void free_export_mesh(Mesh *mesh); | ||||
| virtual bool export_as_subdivision_surface(Object *ob_eval) const; | virtual bool export_as_subdivision_surface(Object *ob_eval) const; | ||||
| private: | private: | ||||
| void write_mesh(HierarchyContext &context, Mesh *mesh); | void write_mesh(HierarchyContext &context, Mesh *mesh); | ||||
| void write_subd(HierarchyContext &context, Mesh *mesh); | void write_subd(HierarchyContext &context, Mesh *mesh); | ||||
| template<typename Schema> void write_face_sets(Object *object, Mesh *mesh, Schema &schema); | template<typename Schema> void write_face_sets(Object *object, Mesh *mesh, Schema &schema); | ||||
| ModifierData *get_liquid_sim_modifier(Scene *scene_eval, Object *ob_eval); | |||||
| void write_arb_geo_params(Mesh *me); | void write_arb_geo_params(Mesh *me); | ||||
| void get_velocities(Mesh *mesh, std::vector<Imath::V3f> &vels); | bool get_velocities(Mesh *mesh, std::vector<Imath::V3f> &vels); | ||||
| void get_geo_groups(Object *object, | void get_geo_groups(Object *object, | ||||
| Mesh *mesh, | Mesh *mesh, | ||||
| std::map<std::string, std::vector<int32_t>> &geo_groups); | std::map<std::string, std::vector<int32_t>> &geo_groups); | ||||
| }; | }; | ||||
| /* Writer for Alembic geometry of Blender Mesh objects. */ | /* Writer for Alembic geometry of Blender Mesh objects. */ | ||||
| class ABCMeshWriter : public ABCGenericMeshWriter { | class ABCMeshWriter : public ABCGenericMeshWriter { | ||||
| public: | public: | ||||
| ABCMeshWriter(const ABCWriterConstructorArgs &args); | ABCMeshWriter(const ABCWriterConstructorArgs &args); | ||||
| protected: | protected: | ||||
| virtual Mesh *get_export_mesh(Object *object_eval, bool &r_needsfree) override; | virtual Mesh *get_export_mesh(Object *object_eval, bool &r_needsfree) override; | ||||
| }; | }; | ||||
| } // namespace blender::io::alembic | } // namespace blender::io::alembic | ||||