Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/usd/intern/usd_reader_nurbs.cc
| Show All 37 Lines | static bool set_knots(const pxr::VtDoubleArray &knots, float *&nu_knots) | ||||
| return true; | return true; | ||||
| } | } | ||||
| namespace blender::io::usd { | namespace blender::io::usd { | ||||
| void USDNurbsReader::create_object(Main *bmain, const double /* motionSampleTime */) | void USDNurbsReader::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 USDNurbsReader::read_object_data(Main *bmain, const double motionSampleTime) | void USDNurbsReader::read_object_data(Main *bmain, const 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 | |||||