Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2016-11-13 13:22:24 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-11-13 13:22:24 +0300
commit947015de5782f4dda8859d590b33ffa966aa9ad1 (patch)
tree699af284ee09b067c9ea69e3fe478ed7b9588958
parentdd610cb6e97bbc435f3b437c832283d54144a4dd (diff)
Disables VolumeManager functions that load grids directly from a filename.
These are legacy functions from the OpenVDB import node, but they don't work with the new design any more because there is no specific Volume instance to add the grids to.
-rw-r--r--intern/cycles/render/nodes.cpp6
-rw-r--r--intern/cycles/render/volume.cpp8
-rw-r--r--intern/cycles/render/volume.h8
3 files changed, 19 insertions, 3 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 3ee0b41d411..3045800591b 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -5413,9 +5413,9 @@ void OpenVDBNode::compile(SVMCompiler& compiler)
type = NODE_VDB_FLOAT3;
}
- grid_slot = volume_manager->add_volume(filename.string(),
- output_names[i].string(),
- sampling, type);
+// grid_slot = volume_manager->add_volume(filename.string(),
+// output_names[i].string(),
+// sampling, type);
if(grid_slot == -1) {
continue;
diff --git a/intern/cycles/render/volume.cpp b/intern/cycles/render/volume.cpp
index edc1977285c..34b8c211987 100644
--- a/intern/cycles/render/volume.cpp
+++ b/intern/cycles/render/volume.cpp
@@ -73,6 +73,7 @@ static inline void catch_exceptions()
#endif
}
+#if 0
int VolumeManager::add_volume(const string& filename, const string& name, int sampling, int grid_type)
{
size_t slot = -1;
@@ -98,6 +99,7 @@ int VolumeManager::add_volume(const string& filename, const string& name, int sa
return slot;
}
+#endif
int VolumeManager::add_volume(Volume *volume, const std::string &filename, const std::string &name)
{
@@ -131,6 +133,7 @@ int VolumeManager::add_volume(Volume *volume, const std::string &filename, const
return slot;
}
+#if 0
int VolumeManager::find_existing_slot(const string& filename, const string& name, int sampling, int grid_type)
{
for(size_t i = 0; i < current_grids.size(); ++i) {
@@ -159,6 +162,7 @@ int VolumeManager::find_existing_slot(const string& filename, const string& name
return -1;
}
+#endif
int VolumeManager::find_existing_slot(Volume *volume, const std::string &filename, const std::string &name)
{
@@ -222,6 +226,7 @@ size_t find_empty_slot(Container container)
return slot;
}
+#if 0
size_t VolumeManager::add_openvdb_volume(const std::string& filename, const std::string& name, int /*sampling*/, int grid_type)
{
size_t slot = -1;
@@ -259,6 +264,7 @@ size_t VolumeManager::add_openvdb_volume(const std::string& filename, const std:
return slot;
}
+#endif
size_t VolumeManager::add_openvdb_volume(Volume *volume, const std::string &filename, const std::string &name)
{
@@ -294,6 +300,7 @@ size_t VolumeManager::add_openvdb_volume(Volume *volume, const std::string &file
return slot;
}
+#if 0
void VolumeManager::add_grid_description(const string& filename, const string& name, int sampling, int slot)
{
GridDescription descr;
@@ -304,6 +311,7 @@ void VolumeManager::add_grid_description(const string& filename, const string& n
current_grids.push_back(descr);
}
+#endif
void VolumeManager::add_grid_description(Volume *volume, const std::string &filename, const std::string &name, int slot)
{
diff --git a/intern/cycles/render/volume.h b/intern/cycles/render/volume.h
index 6751979a3b9..667fc762228 100644
--- a/intern/cycles/render/volume.h
+++ b/intern/cycles/render/volume.h
@@ -69,20 +69,28 @@ class VolumeManager {
void delete_volume(int grid_type, int sampling, size_t slot);
+#if 0
void add_grid_description(const string& filename, const string& name, int sampling, int slot);
+#endif
void add_grid_description(Volume *volume, const string& filename, const string& name, int slot);
+#if 0
int find_existing_slot(const string& filename, const string& name, int sampling, int grid_type);
+#endif
int find_existing_slot(Volume *volume, const string& filename, const string& name);
bool is_openvdb_file(const string& filename) const;
+#if 0
size_t add_openvdb_volume(const string& filename, const string& name, int sampling, int grid_type);
+#endif
size_t add_openvdb_volume(Volume *volume, const string& filename, const string& name);
public:
VolumeManager();
~VolumeManager();
+#if 0
int add_volume(const string& filename, const string& name, int sampling, int grid_type);
+#endif
int add_volume(Volume *volume, const string& filename, const string& name);
int find_density_slot();