mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
115 lines
5.1 KiB
Diff
115 lines
5.1 KiB
Diff
Based on
|
|
- https://developer.blender.org/rBbdc537e0a7b4b62af049dd4d508d5b08a4fa8b3b
|
|
- https://developer.blender.org/rB05697470ab0dde6646be939ae57a95c9d4099e0b
|
|
diff --git intern/cycles/render/volume.cpp intern/cycles/render/volume.cpp
|
|
index 358ef71d501..a0a16d7c52f 100644
|
|
--- intern/cycles/render/volume.cpp
|
|
+++ intern/cycles/render/volume.cpp
|
|
@@ -271,7 +271,8 @@ void VolumeMeshBuilder::add_grid(openvdb::GridBase::ConstPtr grid,
|
|
void VolumeMeshBuilder::add_padding(int pad_size)
|
|
{
|
|
#ifdef WITH_OPENVDB
|
|
- openvdb::tools::dilateVoxels(topology_grid->tree(), pad_size);
|
|
+ openvdb::tools::dilateActiveValues(
|
|
+ topology_grid->tree(), pad_size, openvdb::tools::NN_FACE, openvdb::tools::IGNORE_TILES);
|
|
#else
|
|
(void)pad_size;
|
|
#endif
|
|
diff --git source/blender/blenkernel/BKE_volume.h source/blender/blenkernel/BKE_volume.h
|
|
index cf755827a6c..5a96b70514e 100644
|
|
--- source/blender/blenkernel/BKE_volume.h
|
|
+++ source/blender/blenkernel/BKE_volume.h
|
|
@@ -103,7 +103,6 @@ typedef enum VolumeGridType {
|
|
VOLUME_GRID_INT,
|
|
VOLUME_GRID_INT64,
|
|
VOLUME_GRID_MASK,
|
|
- VOLUME_GRID_STRING,
|
|
VOLUME_GRID_VECTOR_FLOAT,
|
|
VOLUME_GRID_VECTOR_DOUBLE,
|
|
VOLUME_GRID_VECTOR_INT,
|
|
@@ -203,8 +202,6 @@ auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
|
|
return op.template operator()<openvdb::Vec3IGrid>();
|
|
case VOLUME_GRID_VECTOR_DOUBLE:
|
|
return op.template operator()<openvdb::Vec3dGrid>();
|
|
- case VOLUME_GRID_STRING:
|
|
- return op.template operator()<openvdb::StringGrid>();
|
|
case VOLUME_GRID_MASK:
|
|
return op.template operator()<openvdb::MaskGrid>();
|
|
case VOLUME_GRID_POINTS:
|
|
diff --git source/blender/blenkernel/intern/volume.cc source/blender/blenkernel/intern/volume.cc
|
|
index 7b03839f659..6b745d0bb3e 100644
|
|
--- source/blender/blenkernel/intern/volume.cc
|
|
+++ source/blender/blenkernel/intern/volume.cc
|
|
@@ -1300,9 +1300,6 @@ VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid)
|
|
if (grid.isType<openvdb::Vec3dGrid>()) {
|
|
return VOLUME_GRID_VECTOR_DOUBLE;
|
|
}
|
|
- if (grid.isType<openvdb::StringGrid>()) {
|
|
- return VOLUME_GRID_STRING;
|
|
- }
|
|
if (grid.isType<openvdb::MaskGrid>()) {
|
|
return VOLUME_GRID_MASK;
|
|
}
|
|
@@ -1338,7 +1335,6 @@ int BKE_volume_grid_channels(const VolumeGrid *grid)
|
|
case VOLUME_GRID_VECTOR_DOUBLE:
|
|
case VOLUME_GRID_VECTOR_INT:
|
|
return 3;
|
|
- case VOLUME_GRID_STRING:
|
|
case VOLUME_GRID_POINTS:
|
|
case VOLUME_GRID_UNKNOWN:
|
|
return 0;
|
|
@@ -1570,13 +1566,8 @@ struct CreateGridWithChangedResolutionOp {
|
|
|
|
template<typename GridType> typename openvdb::GridBase::Ptr operator()()
|
|
{
|
|
- if constexpr (std::is_same_v<GridType, openvdb::StringGrid>) {
|
|
- return {};
|
|
- }
|
|
- else {
|
|
- return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
|
|
- resolution_factor);
|
|
- }
|
|
+ return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
|
|
+ resolution_factor);
|
|
}
|
|
};
|
|
|
|
diff --git source/blender/blenkernel/intern/volume_render.cc source/blender/blenkernel/intern/volume_render.cc
|
|
index 6dc497bb616..57c7773d7be 100644
|
|
--- source/blender/blenkernel/intern/volume_render.cc
|
|
+++ source/blender/blenkernel/intern/volume_render.cc
|
|
@@ -77,7 +77,6 @@ static void extract_dense_float_voxels(const VolumeGridType grid_type,
|
|
case VOLUME_GRID_VECTOR_INT:
|
|
return extract_dense_voxels<openvdb::Vec3IGrid, openvdb::Vec3f>(
|
|
grid, bbox, reinterpret_cast<openvdb::Vec3f *>(r_voxels));
|
|
- case VOLUME_GRID_STRING:
|
|
case VOLUME_GRID_POINTS:
|
|
case VOLUME_GRID_UNKNOWN:
|
|
/* Zero channels to copy. */
|
|
diff --git source/blender/makesrna/intern/rna_volume.c source/blender/makesrna/intern/rna_volume.c
|
|
index 76db6f3e325..32c59d5f359 100644
|
|
--- source/blender/makesrna/intern/rna_volume.c
|
|
+++ source/blender/makesrna/intern/rna_volume.c
|
|
@@ -241,7 +241,6 @@ static void rna_def_volume_grid(BlenderRNA *brna)
|
|
{VOLUME_GRID_INT, "INT", 0, "Integer", "32-bit integer"},
|
|
{VOLUME_GRID_INT64, "INT64", 0, "Integer 64-bit", "64-bit integer"},
|
|
{VOLUME_GRID_MASK, "MASK", 0, "Mask", "No data, boolean mask of active voxels"},
|
|
- {VOLUME_GRID_STRING, "STRING", 0, "String", "Text string"},
|
|
{VOLUME_GRID_VECTOR_FLOAT, "VECTOR_FLOAT", 0, "Float Vector", "3D float vector"},
|
|
{VOLUME_GRID_VECTOR_DOUBLE, "VECTOR_DOUBLE", 0, "Double Vector", "3D double vector"},
|
|
{VOLUME_GRID_VECTOR_INT, "VECTOR_INT", 0, "Integer Vector", "3D integer vector"},
|
|
diff --git source/blender/modifiers/intern/MOD_volume_displace.cc source/blender/modifiers/intern/MOD_volume_displace.cc
|
|
index e7c4004853e..e74ea3656b3 100644
|
|
--- source/blender/modifiers/intern/MOD_volume_displace.cc
|
|
+++ source/blender/modifiers/intern/MOD_volume_displace.cc
|
|
@@ -200,9 +200,8 @@ struct DisplaceGridOp {
|
|
|
|
template<typename GridType> void operator()()
|
|
{
|
|
if constexpr (std::is_same_v<GridType, openvdb::points::PointDataGrid> ||
|
|
- std::is_same_v<GridType, openvdb::StringGrid> ||
|
|
std::is_same_v<GridType, openvdb::MaskGrid>) {
|
|
/* We don't support displacing these grid types yet. */
|
|
return;
|
|
}
|