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) { if (c_data) {
return c_data->get_data(id, key); return c_data->get_data(id, key);
} }
VolumeData *vol_data = volume_data(id); VolumeData *v_data = volume_data(id);
if (vol_data) { if (v_data) {
return vol_data->get_data(id, key); return v_data->get_data(id, key);
} }
ObjectData *obj_data = object_data(id); ObjectData *obj_data = object_data(id);
if (obj_data) { 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 VolumeGrid *grid = BKE_volume_grid_get_for_read(volume, i);
const std::string grid_name = BKE_volume_grid_name(grid); const std::string grid_name = BKE_volume_grid_name(grid);
pxr::HdVolumeFieldDescriptor desc = pxr::HdVolumeFieldDescriptor( volume_field_descriptors.emplace_back(pxr::TfToken(grid_name),
pxr::TfToken(grid_name),
pxr::UsdVolImagingTokens->openvdbAsset, pxr::UsdVolImagingTokens->openvdbAsset,
prim_id.AppendElementString("VF_" + grid_name)); prim_id.AppendElementString("VF_" + grid_name));
volume_field_descriptors.push_back(desc);
} }
BKE_volume_unload(volume); BKE_volume_unload(volume);