Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/usd/intern/usd_reader_mesh.cc
| Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime) | ||||
| Mesh *mesh = (Mesh *)object_->data; | Mesh *mesh = (Mesh *)object_->data; | ||||
| is_initial_load_ = true; | is_initial_load_ = true; | ||||
| Mesh *read_mesh = this->read_mesh( | Mesh *read_mesh = this->read_mesh( | ||||
| mesh, motionSampleTime, import_params_.mesh_read_flag, nullptr); | mesh, motionSampleTime, import_params_.mesh_read_flag, nullptr); | ||||
| is_initial_load_ = false; | is_initial_load_ = false; | ||||
| if (read_mesh != mesh) { | if (read_mesh != mesh) { | ||||
| /* FIXME: after 2.80; `mesh->flag` isn't copied by #BKE_mesh_nomain_to_mesh() */ | BKE_mesh_nomain_to_mesh(read_mesh, mesh, object_); | ||||
| /* read_mesh can be freed by BKE_mesh_nomain_to_mesh(), so get the flag before that happens. */ | |||||
| uint16_t autosmooth = (read_mesh->flag & ME_AUTOSMOOTH); | |||||
| BKE_mesh_nomain_to_mesh(read_mesh, mesh, object_, &CD_MASK_MESH, true); | |||||
| mesh->flag |= autosmooth; | |||||
| } | } | ||||
| readFaceSetsSample(bmain, mesh, motionSampleTime); | readFaceSetsSample(bmain, mesh, motionSampleTime); | ||||
| if (mesh_prim_.GetPointsAttr().ValueMightBeTimeVarying()) { | if (mesh_prim_.GetPointsAttr().ValueMightBeTimeVarying()) { | ||||
| is_time_varying_ = true; | is_time_varying_ = true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 668 Lines • Show Last 20 Lines | |||||