[Bf-blender-cvs] [c199b32d008] usd-importer-T81257-merge: USD Import: USDVolumeReader code cleanup.
makowalski
noreply at git.blender.org
Fri Apr 16 01:02:18 CEST 2021
Commit: c199b32d0082a649b6623b59bc84fe8903593ce6
Author: makowalski
Date: Thu Apr 15 16:34:45 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rBc199b32d0082a649b6623b59bc84fe8903593ce6
USD Import: USDVolumeReader code cleanup.
Removed unused variable and unnecessary function call.
Replaced C-style cast with static_cast.
===================================================================
M source/blender/io/usd/intern/usd_reader_volume.cc
===================================================================
diff --git a/source/blender/io/usd/intern/usd_reader_volume.cc b/source/blender/io/usd/intern/usd_reader_volume.cc
index d5f624387d8..89c28ac50b9 100644
--- a/source/blender/io/usd/intern/usd_reader_volume.cc
+++ b/source/blender/io/usd/intern/usd_reader_volume.cc
@@ -73,8 +73,7 @@ void USDVolumeReader::read_object_data(Main *bmain, double motionSampleTime)
std::string filepath;
- Volume *volume = (Volume *)object_->data;
- VolumeGrid *defaultGrid = BKE_volume_grid_get_for_write(volume, 0);
+ Volume *volume = static_cast<Volume *>(object_->data);
for (auto it = fields.begin(); it != fields.end(); ++it) {
@@ -93,7 +92,7 @@ void USDVolumeReader::read_object_data(Main *bmain, double motionSampleTime)
// A Blender volume creates density by default
if (fieldName != "density") {
- defaultGrid = BKE_volume_grid_add(volume, fieldName.c_str(), VOLUME_GRID_FLOAT);
+ BKE_volume_grid_add(volume, fieldName.c_str(), VOLUME_GRID_FLOAT);
}
}
More information about the Bf-blender-cvs
mailing list