Commit: 5fdc452ab0cc477e5f60aceadcb5400f674fb762 Author: Kévin Dietrich Date: Tue May 24 11:40:05 2016 +0200 Branches: alembic_basic_io https://developer.blender.org/rB5fdc452ab0cc477e5f60aceadcb5400f674fb762
Rename AbcExportOptions -> ExportSettings. =================================================================== M source/blender/alembic/intern/abc_camera.cc M source/blender/alembic/intern/abc_camera.h M source/blender/alembic/intern/abc_export_options.cc M source/blender/alembic/intern/abc_export_options.h M source/blender/alembic/intern/abc_exporter.cc M source/blender/alembic/intern/abc_exporter.h M source/blender/alembic/intern/abc_hair.cc M source/blender/alembic/intern/abc_hair.h M source/blender/alembic/intern/abc_mesh.cc M source/blender/alembic/intern/abc_mesh.h M source/blender/alembic/intern/abc_nurbs.cc M source/blender/alembic/intern/abc_nurbs.h M source/blender/alembic/intern/abc_object.cc M source/blender/alembic/intern/abc_object.h M source/blender/alembic/intern/abc_shape.cc M source/blender/alembic/intern/abc_shape.h M source/blender/alembic/intern/abc_transform.cc M source/blender/alembic/intern/abc_transform.h M source/blender/alembic/intern/alembic_capi.cc =================================================================== diff --git a/source/blender/alembic/intern/abc_camera.cc b/source/blender/alembic/intern/abc_camera.cc index 0e08100..8155662 100644 --- a/source/blender/alembic/intern/abc_camera.cc +++ b/source/blender/alembic/intern/abc_camera.cc @@ -54,8 +54,8 @@ AbcCameraWriter::AbcCameraWriter(Scene *scene, Object *ob, AbcTransformWriter *parent, uint32_t timeSampling, - AbcExportOptions &opts) - : AbcShapeWriter(scene, ob, parent, timeSampling, opts) + ExportSettings &settings) + : AbcShapeWriter(scene, ob, parent, timeSampling, settings) { OCamera camera(parent->alembicXform(), m_name, m_time_sampling); m_camera_schema = camera.getSchema(); diff --git a/source/blender/alembic/intern/abc_camera.h b/source/blender/alembic/intern/abc_camera.h index d7c9989..866c6c3 100644 --- a/source/blender/alembic/intern/abc_camera.h +++ b/source/blender/alembic/intern/abc_camera.h @@ -37,7 +37,7 @@ public: Object *ob, AbcTransformWriter *parent, uint32_t timeSampling, - AbcExportOptions &opts); + ExportSettings &settings); private: virtual void do_write(); diff --git a/source/blender/alembic/intern/abc_export_options.cc b/source/blender/alembic/intern/abc_export_options.cc index 4375908..e7fa2ba 100644 --- a/source/blender/alembic/intern/abc_export_options.cc +++ b/source/blender/alembic/intern/abc_export_options.cc @@ -33,7 +33,7 @@ extern "C" { #include "BKE_idprop.h" } -AbcExportOptions::AbcExportOptions(Scene *scene) +ExportSettings::ExportSettings(Scene *scene) : m_scene(scene) { selected_only = false; @@ -61,12 +61,12 @@ AbcExportOptions::AbcExportOptions(Scene *scene) export_props_as_geo_params = true; } -bool AbcExportOptions::exportTransform(Object *obj) const +bool ExportSettings::exportTransform(Object *obj) const { return !isAbcRoot(obj); } -bool AbcExportOptions::checkIsAbcRoot(Object *ob) +bool ExportSettings::checkIsAbcRoot(Object *ob) { Object *parent = ob; @@ -81,7 +81,7 @@ bool AbcExportOptions::checkIsAbcRoot(Object *ob) return false; } -bool AbcExportOptions::isAbcRoot(Object *obj) const +bool ExportSettings::isAbcRoot(Object *obj) const { ID *id = reinterpret_cast<ID *>(obj); IDProperty *xport_props = IDP_GetProperties(id, false); @@ -99,7 +99,7 @@ bool AbcExportOptions::isAbcRoot(Object *obj) const return false; } -bool AbcExportOptions::exportObject(Object *obj) const +bool ExportSettings::exportObject(Object *obj) const { if (!exportTransform(obj)) { return false; diff --git a/source/blender/alembic/intern/abc_export_options.h b/source/blender/alembic/intern/abc_export_options.h index 1bccd64..ad89713 100644 --- a/source/blender/alembic/intern/abc_export_options.h +++ b/source/blender/alembic/intern/abc_export_options.h @@ -26,8 +26,8 @@ struct Object; struct Scene; -struct AbcExportOptions { - explicit AbcExportOptions(Scene *scene); +struct ExportSettings { + explicit ExportSettings(Scene *scene); bool exportTransform(Object *obj) const; bool isAbcRoot(Object *obj) const; diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc index 0ebae33..7f2eacb 100644 --- a/source/blender/alembic/intern/abc_exporter.cc +++ b/source/blender/alembic/intern/abc_exporter.cc @@ -54,8 +54,8 @@ extern "C" { #include "BKE_scene.h" } -AbcExporter::AbcExporter(Scene *scene, const char *filename, AbcExportOptions &opts) - : m_options(opts) +AbcExporter::AbcExporter(Scene *scene, const char *filename, ExportSettings &settings) + : m_settings(settings) , m_filename(filename) , m_scene(scene) , m_saved_frame(getCurrentFrame()) @@ -154,7 +154,7 @@ void AbcExporter::operator()() Alembic::Abc::Argument arg(md); - if (!m_options.export_ogawa) { + if (!m_settings.export_ogawa) { m_archive = Alembic::Abc::CreateArchiveWithInfo(Alembic::AbcCoreHDF5::WriteArchive(), m_filename, "Blender", sceneName, Alembic::Abc::ErrorHandler::kThrowPolicy, arg); } @@ -164,31 +164,31 @@ void AbcExporter::operator()() } /* Create time samplings for transforms and shapes */ - Alembic::Abc::TimeSamplingPtr transTime = createTimeSampling(m_options.startframe, m_options.endframe, - m_options.xform_frame_step, m_options.shutter_open, - m_options.shutter_close); + Alembic::Abc::TimeSamplingPtr transTime = createTimeSampling(m_settings.startframe, m_settings.endframe, + m_settings.xform_frame_step, m_settings.shutter_open, + m_settings.shutter_close); m_trans_sampling_index = m_archive.addTimeSampling(*transTime); Alembic::Abc::TimeSamplingPtr shapeTime; - if ((m_options.shape_frame_step == m_options.xform_frame_step) || (m_options.startframe == m_options.endframe)) + if ((m_settings.shape_frame_step == m_settings.xform_frame_step) || (m_settings.startframe == m_settings.endframe)) { shapeTime = transTime; m_shape_sampling_index = m_trans_sampling_index; } else { - shapeTime = createTimeSampling(m_options.startframe, m_options.endframe, - m_options.shape_frame_step, m_options.shutter_open, - m_options.shutter_close); + shapeTime = createTimeSampling(m_settings.startframe, m_settings.endframe, + m_settings.shape_frame_step, m_settings.shutter_open, + m_settings.shutter_close); m_shape_sampling_index = m_archive.addTimeSampling(*shapeTime); } Alembic::Abc::OBox3dProperty archiveBoxProp = Alembic::AbcGeom::CreateOArchiveBounds(m_archive, m_trans_sampling_index); - if (m_options.flatten_hierarchy) + if (m_settings.flatten_hierarchy) createTransformWritersFlat(); else createTransformWritersHierarchy(); @@ -197,10 +197,10 @@ void AbcExporter::operator()() /* make a list of frames to export */ std::set<double> xformFrames; - getFrameSet(m_options.startframe, m_options.endframe, m_options.xform_frame_step, m_options.shutter_open, m_options.shutter_close, xformFrames); + getFrameSet(m_settings.startframe, m_settings.endframe, m_settings.xform_frame_step, m_settings.shutter_open, m_settings.shutter_close, xformFrames); std::set<double> shapeFrames; - getFrameSet(m_options.startframe, m_options.endframe, m_options.shape_frame_step, m_options.shutter_open, m_options.shutter_close, shapeFrames); + getFrameSet(m_settings.startframe, m_settings.endframe, m_settings.shape_frame_step, m_settings.shutter_open, m_settings.shutter_close, shapeFrames); /* merge all frames needed */ std::set<double> allFrames(xformFrames); @@ -250,7 +250,7 @@ void AbcExporter::createTransformWritersHierarchy() while (base) { Object *ob = base->object; - if (m_options.exportObject(ob)) { + if (m_settings.exportObject(ob)) { switch(ob->type) { case OB_LAMP: case OB_LATTICE: @@ -275,9 +275,9 @@ void AbcExporter::createTransformWritersFlat() while (base) { Object *ob = base->object; - if (m_options.exportObject(ob) && objectIsShape(ob)) { + if (m_settings.exportObject(ob) && objectIsShape(ob)) { std::string name = get_id_name(ob); - m_xforms[name] = new AbcTransformWriter(ob, m_archive.getTop(), 0, m_trans_sampling_index, m_options); + m_xforms[name] = new AbcTransformWriter(ob, m_archive.getTop(), 0, m_trans_sampling_index, m_settings); } base = base->next; @@ -342,11 +342,11 @@ void AbcExporter::createTransformWriter(Object *ob, Object *parent, Object *dupl } if (xParent) { - m_xforms[name] = new AbcTransformWriter(ob, xParent->alembicXform(), xParent, m_trans_sampling_index, m_options); + m_xforms[name] = new AbcTransformWriter(ob, xParent->alembicXform(), xParent, m_trans_sampling_index, m_settings); m_xforms[name]->setParent(parent); } else { - m_xforms[name] = new AbcTransformWriter(ob, m_archive.getTop(), NULL, m_trans_sampling_index, m_options); + m_xforms[name] = new AbcTransformWriter(ob, m_archive.getTop(), NULL, m_trans_sampling_index, m_settings); } } @@ -392,7 +392,7 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent) return; } - if (!m_options.exportObject(ob)) { + if (!m_settings.exportObject(ob)) { return; } @@ -442,8 +442,8 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent) continue; if (enable_hair && psys->part && (psys->part->type == PART_HAIR)) { - m_options.export_child_hairs = enable_hair_child; - m_shapes.push_back(new AbcHairWriter(m_scene, ob, xform, m_shape_sampling_index, m_options, psys)); + m_settings.export_child_hairs = enable_hair_child; + m_shapes.push_back(new AbcHairWriter(m_scene, ob, xform, m_shape_sampling_index, m_settings, psys)); } } @@ -457,7 +457,7 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent) return; } - m_shapes.push_back(new AbcMeshWriter(m_scene, ob, xform, m_shape_sampling_index, m_options)); + m_shapes.push_back(new AbcMeshWriter(m_scene, ob, xform, m_shape_sampling_index, m_settings)); } break; @@ -471,7 +471,7 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent) return; } - m_shapes.push_back(new AbcNurbsWriter(m_scene, ob, xform, m_shape_sampling_index, m_options)); + m_shapes.push_back(new AbcNurbsWriter(m_scene, ob, xform, m_shape_sampling_index, m_settings)); } break; @@ -481,7 +481,7 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent) Camera *cam = static_cast<Camera *>(ob->data); if (cam->type == CAM_PERSP) { - m_shapes.push_back(new AbcCameraWriter(m_scene, ob, xform, m_shape_sampling_index, m_options)); + m_shapes.push_back(new AbcCameraWriter(m_scene, ob, xform, m_shape_sampling_index, m_settings)); @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs