Skip to content

Commit d940d20

Browse files
committed
Skip readBuffers() logic in ScalarCodec
Signed-off-by: Dan Bailey <danbailey@ilm.com>
1 parent 53af683 commit d940d20

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

openvdb/openvdb/codecs/ScalarCodec.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ struct ScalarCodec final: public TopologyCodec<GridT, StorageGridT, Mode>
163163
{
164164
using StorageValueT = typename StorageGridT::TreeType::ValueType;
165165
GridT& grid = static_cast<GridT&>(*data.grid);
166+
167+
// readTopology() has already set the tiles and leaf buffers to the
168+
// background, so there is nothing left to read.
169+
if (options.readMode == io::ReadMode::TopologyOnly) return;
170+
166171
auto& topoData = static_cast<TopologyCodecData<StorageValueT>&>(data);
167172
internal::scalarCodecReadBuffers<GridT, StorageGridT>(grid, is, options, &topoData.storageBackground);
168173
}

0 commit comments

Comments
 (0)