Export volumes from object modifier (quick effect) #62

Merged
Bogdan Nagirniak merged 28 commits from BLEN-448 into hydra-render 2023-07-20 23:49:25 +02:00
Showing only changes of commit 905c4b31fb - Show all commits

View File

@ -19,12 +19,6 @@ PXR_NAMESPACE_CLOSE_SCOPE
namespace blender::render::hydra { namespace blender::render::hydra {
const Set<pxr::TfToken> supported_grids = {pxr::grid_tokens_->density,
pxr::grid_tokens_->flame,
pxr::grid_tokens_->shadow,
pxr::grid_tokens_->temperature,
pxr::grid_tokens_->velocity};
VolumeModifierData::VolumeModifierData(BlenderSceneDelegate *scene_delegate, VolumeModifierData::VolumeModifierData(BlenderSceneDelegate *scene_delegate,
Object *object, Object *object,
pxr::SdfPath const &prim_id) pxr::SdfPath const &prim_id)
@ -58,7 +52,7 @@ void VolumeModifierData::init()
filepath_ = get_cached_file_path(volume_modifier->domain->cache_directory, filepath_ = get_cached_file_path(volume_modifier->domain->cache_directory,
scene_delegate_->scene->r.cfra); scene_delegate_->scene->r.cfra);
for (auto &grid_name : supported_grids) { for (auto &grid_name : pxr::grid_tokens_->allTokens) {
field_descriptors_.emplace_back(grid_name, field_descriptors_.emplace_back(grid_name,
pxr::UsdVolImagingTokens->openvdbAsset, pxr::UsdVolImagingTokens->openvdbAsset,
prim_id.AppendElementString("VF_" + grid_name.GetString())); prim_id.AppendElementString("VF_" + grid_name.GetString()));