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 #pragma once 17 18 /** \file 19 * \ingroup balembic 20 */ 21 22 #include "abc_writer_abstract.h" 23 24 #include <Alembic/AbcGeom/OCamera.h> 25 26 namespace blender::io::alembic { 27 28 class ABCCameraWriter : public ABCAbstractWriter { 29 private: 30 Alembic::AbcGeom::OCamera abc_camera_; 31 Alembic::AbcGeom::OCameraSchema abc_camera_schema_; 32 33 Alembic::AbcGeom::OCompoundProperty abc_custom_data_container_; 34 Alembic::AbcGeom::OFloatProperty abc_stereo_distance_; 35 Alembic::AbcGeom::OFloatProperty abc_eye_separation_; 36 37 public: 38 explicit ABCCameraWriter(const ABCWriterConstructorArgs &args); 39 40 virtual void create_alembic_objects(const HierarchyContext *context) override; 41 virtual Alembic::Abc::OObject get_alembic_object() const override; 42 43 protected: 44 virtual bool is_supported(const HierarchyContext *context) const override; 45 virtual void do_write(HierarchyContext &context) override; 46 Alembic::Abc::OCompoundProperty abc_prop_for_custom_props() override; 47 }; 48 49 } // namespace blender::io::alembic 50