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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-05 19:46:31 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-05 19:46:31 +0400
commit2b962212c8be78603dc49fecaf080f44614af8ee (patch)
tree975f98532fb11e1f561ca12b0ad7c3feaec4a721 /intern/smoke
parent4742dc3fd747564636c36e40c88687ccc725a1c7 (diff)
Fix #33411: crash baking smoke with FFT high resolution.
CMake had FFTW disabled by default, and when FFTW was not enabled it lead to uninitialized memory usage. Now it falls back to wavelet if there is no FFTW, and I've enabled it by default in CMake. If it's not found on Linux it will get disabled automatically.
Diffstat (limited to 'intern/smoke')
-rw-r--r--intern/smoke/intern/WTURBULENCE.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/intern/smoke/intern/WTURBULENCE.cpp b/intern/smoke/intern/WTURBULENCE.cpp
index 1c89f5d681b..5b6509afead 100644
--- a/intern/smoke/intern/WTURBULENCE.cpp
+++ b/intern/smoke/intern/WTURBULENCE.cpp
@@ -220,21 +220,25 @@ void WTURBULENCE::setNoise(int type)
{
if(type == (1<<1)) // FFT
{
+#ifdef WITH_FFTW3
// needs fft
- #ifdef WITH_FFTW3
std::string noiseTileFilename = std::string("noise.fft");
generatTile_FFT(_noiseTile, noiseTileFilename);
- #endif
+ return;
+#else
+ fprintf(stderr, "FFTW not enabled, falling back to wavelet noise.\n");
+#endif
}
- else if(type == (1<<2)) // curl
+#if 0
+ if(type == (1<<2)) // curl
{
// TODO: not supported yet
+ return;
}
- else // standard - wavelet
- {
- std::string noiseTileFilename = std::string("noise.wavelets");
- generateTile_WAVELET(_noiseTile, noiseTileFilename);
- }
+#endif
+
+ std::string noiseTileFilename = std::string("noise.wavelets");
+ generateTile_WAVELET(_noiseTile, noiseTileFilename);
}
// init direct access functions from blender