Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMichael Kowalski <makowalski@nvidia.com>2022-03-24 18:53:45 +0300
committerMichael Kowalski <makowalski@nvidia.com>2022-03-24 19:42:11 +0300
commitef228d92f2e77ffab3b764a307415e951c90b608 (patch)
tree02d882991a5517e9cfcce192732f5aa2bffa74f3 /source
parentdb4d5d15833dfcc79f54163c972de1dba6399639 (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')
-rw-r--r--source/blender/io/usd/intern/usd_reader_volume.cc12
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()) {