diff options
author | Michael Kowalski <makowalski@nvidia.com> | 2022-03-24 18:53:45 +0300 |
---|---|---|
committer | Michael Kowalski <makowalski@nvidia.com> | 2022-03-24 19:42:11 +0300 |
commit | ef228d92f2e77ffab3b764a307415e951c90b608 (patch) | |
tree | 02d882991a5517e9cfcce192732f5aa2bffa74f3 /source/blender/io | |
parent | db4d5d15833dfcc79f54163c972de1dba6399639 (diff) |
Fix: Volume grid duplication on USD import.
Fix provided by Piotr Makal in patch D14204.
This patch fixes volume grid duplication which was occurring during
importing USD files. This was caused by calling BKE_volume_grid_add
twice per grid (excluding 'density' grid) for the same Volume
object: (1) in USDVolumeReader::read_object_data and (2) later in
BKE_volume_load.
Differential Revision: https://developer.blender.org/D14204
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/usd/intern/usd_reader_volume.cc | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/source/blender/io/usd/intern/usd_reader_volume.cc b/source/blender/io/usd/intern/usd_reader_volume.cc index aec30539ee6..13044de5002 100644 --- a/source/blender/io/usd/intern/usd_reader_volume.cc +++ b/source/blender/io/usd/intern/usd_reader_volume.cc @@ -54,18 +54,6 @@ void USDVolumeReader::read_object_data(Main *bmain, const double motionSampleTim 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(); if (filepathAttr.IsAuthored()) { |