forked from blender/blender
Export volumes #58
@ -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) {
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user