diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-11-12 22:19:30 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-11-12 22:30:14 +0300 |
commit | b6988de22a9c1b78fe4f5ddedfd4467db1d8e209 (patch) | |
tree | 1afe1f40db2decd3c2c60b3852ff1776369fb46c /intern/cycles/blender/blender_volume.cpp | |
parent | a6c1c0427c947673b5e05d584bd82285a630336c (diff) | |
parent | d59fa12f2ad5c57c68d63e476270fcd274b61062 (diff) |
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'intern/cycles/blender/blender_volume.cpp')
-rw-r--r-- | intern/cycles/blender/blender_volume.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/intern/cycles/blender/blender_volume.cpp b/intern/cycles/blender/blender_volume.cpp index 1843fecd586..094d4bbc08c 100644 --- a/intern/cycles/blender/blender_volume.cpp +++ b/intern/cycles/blender/blender_volume.cpp @@ -242,13 +242,6 @@ class BlenderVolumeLoader : public VDBImageLoader { #endif } - bool equals(const ImageLoader &other) const override - { - /* TODO: detect multiple volume datablocks with the same filepath. */ - const BlenderVolumeLoader &other_loader = (const BlenderVolumeLoader &)other; - return b_volume == other_loader.b_volume && grid_name == other_loader.grid_name; - } - BL::Volume b_volume; }; @@ -307,23 +300,8 @@ static void sync_volume_object(BL::BlendData &b_data, } } -/* If the voxel attributes change, we need to rebuild the bounding mesh. */ -static vector<int> get_voxel_image_slots(Mesh *mesh) -{ - vector<int> slots; - for (const Attribute &attr : mesh->attributes.attributes) { - if (attr.element == ATTR_ELEMENT_VOXEL) { - slots.push_back(attr.data_voxel().svm_slot()); - } - } - - return slots; -} - void BlenderSync::sync_volume(BL::Object &b_ob, Volume *volume) { - vector<int> old_voxel_slots = get_voxel_image_slots(volume); - volume->clear(true); if (view_layer.use_volumes) { @@ -339,8 +317,7 @@ void BlenderSync::sync_volume(BL::Object &b_ob, Volume *volume) } /* Tag update. */ - bool rebuild = (old_voxel_slots != get_voxel_image_slots(volume)); - volume->tag_update(scene, rebuild); + volume->tag_update(scene, true); } CCL_NAMESPACE_END |