Export volumes #58

Merged
Bogdan Nagirniak merged 10 commits from BLEN-384 into hydra-render 2023-07-04 09:57:33 +02:00
2 changed files with 6 additions and 8 deletions
Showing only changes of commit c753ebd5de - Show all commits

View File

@ -63,9 +63,9 @@ pxr::VtValue BlenderSceneDelegate::Get(pxr::SdfPath const &id, pxr::TfToken cons
if (c_data) {
return c_data->get_data(id, key);
}
VolumeData *vol_data = volume_data(id);
if (vol_data) {
return vol_data->get_data(id, key);
VolumeData *v_data = volume_data(id);
if (v_data) {
return v_data->get_data(id, key);
}
ObjectData *obj_data = object_data(id);
if (obj_data) {

View File

@ -143,11 +143,9 @@ pxr::HdVolumeFieldDescriptorVector VolumeData::volume_field_descriptors() const
const VolumeGrid *grid = BKE_volume_grid_get_for_read(volume, i);
const std::string grid_name = BKE_volume_grid_name(grid);
pxr::HdVolumeFieldDescriptor desc = pxr::HdVolumeFieldDescriptor(
pxr::TfToken(grid_name),
pxr::UsdVolImagingTokens->openvdbAsset,
prim_id.AppendElementString("VF_" + grid_name));
volume_field_descriptors.push_back(desc);
volume_field_descriptors.emplace_back(pxr::TfToken(grid_name),
pxr::UsdVolImagingTokens->openvdbAsset,
prim_id.AppendElementString("VF_" + grid_name));
}
BKE_volume_unload(volume);