Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/usd/intern/usd_reader_volume.cc
| Context not available. | |||||
| pxr::UsdVolOpenVDBAsset fieldBase(fieldPrim); | pxr::UsdVolOpenVDBAsset fieldBase(fieldPrim); | ||||
| pxr::UsdAttribute fieldNameAttr = fieldBase.GetFieldNameAttr(); | |||||
| if (fieldNameAttr.IsAuthored()) { | |||||
| pxr::TfToken fieldName; | |||||
| fieldNameAttr.Get(&fieldName, motionSampleTime); | |||||
| /* A Blender volume creates density by default. */ | |||||
| if (fieldName != usdtokens::density) { | |||||
| BKE_volume_grid_add(volume, fieldName.GetString().c_str(), VOLUME_GRID_FLOAT); | |||||
| } | |||||
| } | |||||
| pxr::UsdAttribute filepathAttr = fieldBase.GetFilePathAttr(); | pxr::UsdAttribute filepathAttr = fieldBase.GetFilePathAttr(); | ||||
| if (filepathAttr.IsAuthored()) { | if (filepathAttr.IsAuthored()) { | ||||
| Context not available. | |||||