Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/usd/intern/usd_reader_curve.cc
| Show All 20 Lines | |||||
| #include <pxr/usd/usdGeom/basisCurves.h> | #include <pxr/usd/usdGeom/basisCurves.h> | ||||
| #include <pxr/usd/usdGeom/curves.h> | #include <pxr/usd/usdGeom/curves.h> | ||||
| namespace blender::io::usd { | namespace blender::io::usd { | ||||
| void USDCurvesReader::create_object(Main *bmain, const double /* motionSampleTime */) | void USDCurvesReader::create_object(Main *bmain, const double /* motionSampleTime */) | ||||
| { | { | ||||
| curve_ = BKE_curve_add(bmain, name_.c_str(), OB_CURVE); | curve_ = BKE_curve_add(bmain, name_.c_str(), OB_CURVES_LEGACY); | ||||
| curve_->flag |= CU_3D; | curve_->flag |= CU_3D; | ||||
| curve_->actvert = CU_ACT_NONE; | curve_->actvert = CU_ACT_NONE; | ||||
| curve_->resolu = 2; | curve_->resolu = 2; | ||||
| object_ = BKE_object_add_only_object(bmain, OB_CURVE, name_.c_str()); | object_ = BKE_object_add_only_object(bmain, OB_CURVES_LEGACY, name_.c_str()); | ||||
| object_->data = curve_; | object_->data = curve_; | ||||
| } | } | ||||
| void USDCurvesReader::read_object_data(Main *bmain, double motionSampleTime) | void USDCurvesReader::read_object_data(Main *bmain, double motionSampleTime) | ||||
| { | { | ||||
| Curve *cu = (Curve *)object_->data; | Curve *cu = (Curve *)object_->data; | ||||
| read_curve_sample(cu, motionSampleTime); | read_curve_sample(cu, motionSampleTime); | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||