[Bf-blender-cvs] [257fe5a6e77] master: Volumes: Fix compilation when building without openVDB
Clément Foucault
noreply at git.blender.org
Tue Oct 20 15:08:27 CEST 2020
Commit: 257fe5a6e7777a9d1030f88829fc0cb412c1058d
Author: Clément Foucault
Date: Tue Oct 20 15:07:12 2020 +0200
Branches: master
https://developer.blender.org/rB257fe5a6e7777a9d1030f88829fc0cb412c1058d
Volumes: Fix compilation when building without openVDB
And remove a warning.
===================================================================
M source/blender/blenkernel/intern/volume.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
index 64d053c0e30..5e6f0bb42ef 100644
--- a/source/blender/blenkernel/intern/volume.cc
+++ b/source/blender/blenkernel/intern/volume.cc
@@ -953,6 +953,7 @@ bool BKE_volume_is_points_only(const Volume *volume)
static void volume_update_simplify_level(Volume *volume, const Depsgraph *depsgraph)
{
+#ifdef WITH_OPENVDB
const int simplify_level = BKE_volume_simplify_level(depsgraph);
if (volume->runtime.grids) {
for (VolumeGrid &grid : *volume->runtime.grids) {
@@ -960,6 +961,9 @@ static void volume_update_simplify_level(Volume *volume, const Depsgraph *depsgr
}
}
volume->runtime.default_simplify_level = simplify_level;
+#else
+ UNUSED_VARS(volume, depsgraph);
+#endif
}
static Volume *volume_evaluate_modifiers(struct Depsgraph *depsgraph,
@@ -1260,6 +1264,8 @@ VolumeGridType BKE_volume_grid_type(const VolumeGrid *volume_grid)
#ifdef WITH_OPENVDB
const openvdb::GridBase::Ptr grid = volume_grid->grid();
return BKE_volume_grid_type_openvdb(grid);
+#else
+ UNUSED_VARS(volume_grid);
#endif
return VOLUME_GRID_UNKNOWN;
}
More information about the Bf-blender-cvs
mailing list