From 4ba47d6df1b7ab2166de249c55d36d1fca069348 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 25 Sep 2025 18:34:30 +0200 Subject: [PATCH] Fix: Build error in lite builds after recent commit Missing WITH_OPENVDB check --- .../spreadsheet_data_source_geometry.cc | 14 ++++++++++---- .../spreadsheet_data_source_geometry.hh | 4 ++++ source/blender/nodes/intern/geometry_nodes_log.cc | 2 ++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc index 9e2db700948..385c71f5878 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc @@ -565,6 +565,7 @@ void VolumeDataSource::foreach_default_column_ids( } } +#ifdef WITH_OPENVDB static StringRef grid_class_name(const bke::VolumeGridData &grid_data) { openvdb::GridClass grid_class = grid_data.grid_class(); @@ -576,6 +577,7 @@ static StringRef grid_class_name(const bke::VolumeGridData &grid_data) } return IFACE_("Unknown"); } +#endif std::unique_ptr VolumeDataSource::get_column_values( const SpreadsheetColumnID &column_id) const @@ -626,6 +628,8 @@ int VolumeDataSource::tot_rows() const return BKE_volume_num_grids(volume); } +#ifdef WITH_OPENVDB + VolumeGridDataSource::VolumeGridDataSource(const bke::GVolumeGrid &grid) : grid_(std::make_unique(grid)) { @@ -647,7 +651,6 @@ void VolumeGridDataSource::foreach_default_column_ids( std::unique_ptr VolumeGridDataSource::get_column_values( const SpreadsheetColumnID &column_id) const { -#ifdef WITH_OPENVDB if (STREQ(column_id.name, "Data Type")) { const VolumeGridType type = (*grid_)->grid_type(); const char *name = nullptr; @@ -660,9 +663,6 @@ std::unique_ptr VolumeGridDataSource::get_column_values( return std::make_unique(IFACE_("Class"), VArray::from_single(name, 1)); } -#else - UNUSED_VARS(column_id); -#endif return {}; } @@ -671,6 +671,8 @@ int VolumeGridDataSource::tot_rows() const return 1; } +#endif + ListDataSource::ListDataSource(nodes::ListPtr list) : list_(std::move(list)) {} void ListDataSource::foreach_default_column_ids( @@ -1101,7 +1103,11 @@ std::unique_ptr data_source_from_geometry(const bContext *C, Object return {}; } if (display_data.is_volume_grid()) { +#ifdef WITH_OPENVDB return std::make_unique(display_data.get()); +#else + return {}; +#endif } if (display_data.is_list()) { return std::make_unique(display_data.extract()); diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh index 48c9df30239..0babdb3ec64 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh @@ -94,6 +94,8 @@ class VolumeDataSource : public DataSource { int tot_rows() const override; }; +#ifdef WITH_OPENVDB + class VolumeGridDataSource : public DataSource { /** Using #unique_ptr so that `BKE_volume_grid_fwd.hh` can be used. */ std::unique_ptr grid_; @@ -110,6 +112,8 @@ class VolumeGridDataSource : public DataSource { int tot_rows() const override; }; +#endif + class ListDataSource : public DataSource { nodes::ListPtr list_; diff --git a/source/blender/nodes/intern/geometry_nodes_log.cc b/source/blender/nodes/intern/geometry_nodes_log.cc index 83882cc39c6..e5d7621c3b4 100644 --- a/source/blender/nodes/intern/geometry_nodes_log.cc +++ b/source/blender/nodes/intern/geometry_nodes_log.cc @@ -386,6 +386,7 @@ const bke::GeometrySet *ViewerNodeLog::main_geometry() const { main_geometry_cache_mutex_.ensure([&]() { for (const Item &item : this->items) { +#ifdef WITH_OPENVDB if (item.value.is_volume_grid()) { const bke::GVolumeGrid grid = item.value.get(); Volume *volume = BKE_id_new_nomain(nullptr); @@ -394,6 +395,7 @@ const bke::GeometrySet *ViewerNodeLog::main_geometry() const main_geometry_cache_ = bke::GeometrySet::from_volume(volume); return; } +#endif if (item.value.is_single() && item.value.get_single_ptr().is_type()) { main_geometry_cache_ = *item.value.get_single_ptr().get(); return;