Changeset View
Changeset View
Standalone View
Standalone View
source/blender/alembic/intern/abc_curves.cc
| Show All 36 Lines | |||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "ED_curve.h" | #include "ED_curve.h" | ||||
| #include "CLG_log.h" | |||||
| } | } | ||||
| using Alembic::Abc::IInt32ArrayProperty; | using Alembic::Abc::IInt32ArrayProperty; | ||||
| using Alembic::Abc::Int32ArraySamplePtr; | using Alembic::Abc::Int32ArraySamplePtr; | ||||
| using Alembic::Abc::FloatArraySamplePtr; | using Alembic::Abc::FloatArraySamplePtr; | ||||
| using Alembic::Abc::P3fArraySamplePtr; | using Alembic::Abc::P3fArraySamplePtr; | ||||
| using Alembic::Abc::UcharArraySamplePtr; | using Alembic::Abc::UcharArraySamplePtr; | ||||
| using Alembic::Abc::PropertyHeader; | using Alembic::Abc::PropertyHeader; | ||||
| Show All 11 Lines | |||||
| using Alembic::AbcGeom::OCurves; | using Alembic::AbcGeom::OCurves; | ||||
| using Alembic::AbcGeom::OCurvesSchema; | using Alembic::AbcGeom::OCurvesSchema; | ||||
| using Alembic::AbcGeom::OInt16Property; | using Alembic::AbcGeom::OInt16Property; | ||||
| using Alembic::AbcGeom::ON3fGeomParam; | using Alembic::AbcGeom::ON3fGeomParam; | ||||
| using Alembic::AbcGeom::OV2fGeomParam; | using Alembic::AbcGeom::OV2fGeomParam; | ||||
| #define ABC_CURVE_RESOLUTION_U_PROPNAME "blender:resolution" | #define ABC_CURVE_RESOLUTION_U_PROPNAME "blender:resolution" | ||||
| static CLG_LogRef LOG = {"abc.curves"}; | |||||
| /* ************************************************************************** */ | /* ************************************************************************** */ | ||||
| AbcCurveWriter::AbcCurveWriter(Object *ob, | AbcCurveWriter::AbcCurveWriter(Object *ob, | ||||
| AbcTransformWriter *parent, | AbcTransformWriter *parent, | ||||
| uint32_t time_sampling, | uint32_t time_sampling, | ||||
| ExportSettings &settings) | ExportSettings &settings) | ||||
| : AbcObjectWriter(ob, time_sampling, settings, parent) | : AbcObjectWriter(ob, time_sampling, settings, parent) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | |||||
| void AbcCurveReader::read_curve_sample(Curve *cu, const ICurvesSchema &schema, const ISampleSelector &sample_sel) | void AbcCurveReader::read_curve_sample(Curve *cu, const ICurvesSchema &schema, const ISampleSelector &sample_sel) | ||||
| { | { | ||||
| ICurvesSchema::Sample smp; | ICurvesSchema::Sample smp; | ||||
| try { | try { | ||||
| smp = schema.getValue(sample_sel); | smp = schema.getValue(sample_sel); | ||||
| } | } | ||||
| catch(Alembic::Util::Exception &ex) { | catch(Alembic::Util::Exception &ex) { | ||||
| printf("Alembic: error reading curve sample for '%s/%s' at time %f: %s\n", | CLOG_ERROR(&LOG, "error reading curve sample for '%s/%s' at time %f: %s", | ||||
| m_iobject.getFullName().c_str(), | m_iobject.getFullName().c_str(), | ||||
| schema.getName().c_str(), | schema.getName().c_str(), | ||||
| sample_sel.getRequestedTime(), | sample_sel.getRequestedTime(), | ||||
| ex.what()); | ex.what()); | ||||
| return; | return; | ||||
| } | } | ||||
| const Int32ArraySamplePtr num_vertices = smp.getCurvesNumVertices(); | const Int32ArraySamplePtr num_vertices = smp.getCurvesNumVertices(); | ||||
| ▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines | |||||