diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-05-16 20:07:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-05-16 20:08:08 +0300 |
commit | 6065fbb543937ce098981ceb74aeff770b68a6cc (patch) | |
tree | 6d2959cd0ed3601827bc95b5f9cf4a0b139fb57f /source/blender/io | |
parent | 4be79da9a73627b8f8666503e1610090b28b96a8 (diff) |
Fix std::optional value() build error on older macOS SDK
No longer happens on the buildbot, but for users building with an older
Xcode, still need to avoid using value().
Differential Revision: https://developer.blender.org/D14883
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/usd/intern/usd_writer_volume.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/io/usd/intern/usd_writer_volume.cc b/source/blender/io/usd/intern/usd_writer_volume.cc index b83ded1e5d0..4126be6966a 100644 --- a/source/blender/io/usd/intern/usd_writer_volume.cc +++ b/source/blender/io/usd/intern/usd_writer_volume.cc @@ -53,7 +53,7 @@ void USDVolumeWriter::do_write(HierarchyContext &context) } if (usd_export_context_.export_params.relative_paths) { - if (auto relative_vdb_file_path = construct_vdb_relative_file_path(vdb_file_path.value())) { + if (auto relative_vdb_file_path = construct_vdb_relative_file_path(*vdb_file_path)) { vdb_file_path = relative_vdb_file_path; } else { @@ -75,7 +75,7 @@ void USDVolumeWriter::do_write(HierarchyContext &context) const pxr::SdfPath grid_path = volume_path.AppendPath(pxr::SdfPath(grid_id)); pxr::UsdVolOpenVDBAsset usd_grid = pxr::UsdVolOpenVDBAsset::Define(stage, grid_path); usd_grid.GetFieldNameAttr().Set(pxr::TfToken(grid_name), timecode); - usd_grid.GetFilePathAttr().Set(pxr::SdfAssetPath(vdb_file_path.value()), timecode); + usd_grid.GetFilePathAttr().Set(pxr::SdfAssetPath(*vdb_file_path), timecode); usd_volume.CreateFieldRelationship(pxr::TfToken(grid_id), grid_path); } @@ -107,7 +107,7 @@ std::optional<std::string> USDVolumeWriter::resolve_vdb_file(const Volume *volum if (!vdb_file_path.has_value()) { vdb_file_path = BKE_volume_grids_frame_filepath(volume); - if (vdb_file_path.value().empty()) { + if (vdb_file_path->empty()) { return std::nullopt; } } |