[Bf-blender-cvs] [432f9da43f3] fluid-mantaflow: Merge 'master' into 'fluid-mantaflow'

Bastien Montagne noreply at git.blender.org
Sat May 4 15:56:22 CEST 2019


Commit: 432f9da43f30c6a9fbcf3994fe4abf49f27f0bda
Author: Bastien Montagne
Date:   Sat May 4 12:35:31 2019 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB432f9da43f30c6a9fbcf3994fe4abf49f27f0bda

Merge 'master' into 'fluid-mantaflow'

Conflicts:
	build_files/cmake/macros.cmake
	intern/smoke/CMakeLists.txt
	source/blender/blenkernel/CMakeLists.txt
	source/blender/blenkernel/intern/smoke.c
	source/blender/draw/engines/eevee/eevee_volumes.c

===================================================================



===================================================================

diff --cc build_files/cmake/macros.cmake
index fc4bb519d99,22e53fecf50..4cdd4478222
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@@ -448,9 -452,9 +452,12 @@@ function(setup_liblink
  	if(WITH_ALEMBIC)
  		target_link_libraries(${target} ${ALEMBIC_LIBRARIES} ${HDF5_LIBRARIES})
  	endif()
 +	if(WITH_MOD_MANTA)
 +		target_link_libraries(${target} ${TBB_LIBRARIES})
 +	endif()
+ 	if(WITH_IMAGE_TIFF)
+ 		target_link_libraries(${target} ${TIFF_LIBRARY})
+ 	endif()
  	if(WITH_IMAGE_OPENEXR)
  		target_link_libraries(${target} ${OPENEXR_LIBRARIES})
  	endif()
diff --cc intern/mantaflow/CMakeLists.txt
index 2a4e945cfba,00000000000..04b29af658d
mode 100644,000000..100644
--- a/intern/mantaflow/CMakeLists.txt
+++ b/intern/mantaflow/CMakeLists.txt
@@@ -1,230 -1,0 +1,233 @@@
 +# ***** BEGIN GPL LICENSE BLOCK *****
 +#
 +# This program is free software; you can redistribute it and/or
 +# modify it under the terms of the GNU General Public License
 +# as published by the Free Software Foundation; either version 2
 +# of the License, or (at your option) any later version.
 +#
 +# This program is distributed in the hope that it will be useful,
 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +# GNU General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not, write to the Free Software Foundation,
 +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 +#
 +# The Original Code is Copyright (C) 2016, Blender Foundation
 +# All rights reserved.
 +#
 +# The Original Code is: all of this file.
 +#
 +# Contributor(s): Sebastian Barschkis (sebbas)
 +#
 +# ***** END GPL LICENSE BLOCK *****
 +
 +set(MANTAVERSION "0.12")
 +
 +if(WITH_OPENMP)
 +	set(MANTA_PP
 +		intern/manta_pp/omp
 +	)
 +	add_definitions(-DOPENMP=1)
 +else()
 +	set(MANTA_PP
 +		intern/manta_pp/tbb
 +	)
 +	add_definitions(-DTBB=1)
 +endif()
 +
 +if(WITH_OPENVDB)
 +	add_definitions(-DOPENVDB=1)
 +endif()
 +
 +set(INC
 +	extern
 +	intern/strings
 +	${MANTA_PP}
 +	${MANTA_PP}/fileio
 +	${MANTA_PP}/python
 +	${MANTA_PP}/plugin
 +	${MANTA_PP}/pwrapper
 +	${MANTA_PP}/util
 +	../../source/blender/makesdna
 +	../../source/blender/blenlib
 +)
 +
 +if(WITH_PYTHON)
 +	add_definitions(-DWITH_PYTHON)
 +endif()
 +
 +set(INC_SYS
 +	${PYTHON_INCLUDE_DIRS}
 +	${ZLIB_INCLUDE_DIRS}
 +)
 +
 +if(NOT WITH_OPENMP)
 +	list(APPEND INC_SYS
 +		${TBB_INCLUDE_DIRS}
 +	)
 +endif()
 +
 +if(WITH_OPENVDB)
 +	list(APPEND INC_SYS
 +		${BOOST_INCLUDE_DIR}
 +		${OPENEXR_INCLUDE_DIRS}
 +		${OPENVDB_INCLUDE_DIRS}
 +	)
 +endif()
 +
 +set(SRC
 +	intern/manta_python_API.cpp
 +	intern/manta_fluid_API.cpp
 +	intern/FLUID.cpp
 +
 +	extern/manta_python_API.h
 +	extern/manta_fluid_API.h
 +	intern/FLUID.h
 +	intern/strings/fluid_script.h
 +	intern/strings/smoke_script.h
 +	intern/strings/liquid_script.h
 +
 +	${MANTA_PP}/commonkernels.h
 +	${MANTA_PP}/commonkernels.h.reg
 +	${MANTA_PP}/commonkernels.h.reg.cpp
 +	${MANTA_PP}/conjugategrad.cpp
 +	${MANTA_PP}/conjugategrad.h
 +	${MANTA_PP}/conjugategrad.h.reg
 +	${MANTA_PP}/conjugategrad.h.reg.cpp
 +	${MANTA_PP}/edgecollapse.cpp
 +	${MANTA_PP}/edgecollapse.h
 +	${MANTA_PP}/edgecollapse.h.reg
 +	${MANTA_PP}/edgecollapse.h.reg.cpp
 +	${MANTA_PP}/fastmarch.cpp
 +	${MANTA_PP}/fastmarch.h
 +	${MANTA_PP}/fastmarch.h.reg
 +	${MANTA_PP}/fastmarch.h.reg.cpp
 +	${MANTA_PP}/fileio/iogrids.cpp
 +	${MANTA_PP}/fileio/iomeshes.cpp
 +	${MANTA_PP}/fileio/ioparticles.cpp
 +	${MANTA_PP}/fileio/mantaio.h
 +	${MANTA_PP}/fileio/mantaio.h.reg
 +	${MANTA_PP}/fileio/mantaio.h.reg.cpp
 +	${MANTA_PP}/fluidsolver.cpp
 +	${MANTA_PP}/fluidsolver.h
 +	${MANTA_PP}/fluidsolver.h.reg
 +	${MANTA_PP}/fluidsolver.h.reg.cpp
 +	${MANTA_PP}/general.cpp
 +	${MANTA_PP}/general.h
 +	${MANTA_PP}/general.h.reg
 +	${MANTA_PP}/general.h.reg.cpp
 +	${MANTA_PP}/gitinfo.h
 +	${MANTA_PP}/grid.cpp
 +	${MANTA_PP}/grid.h
 +	${MANTA_PP}/grid.h.reg
 +	${MANTA_PP}/grid.h.reg.cpp
 +	${MANTA_PP}/grid4d.cpp
 +	${MANTA_PP}/grid4d.h
 +	${MANTA_PP}/grid4d.h.reg
 +	${MANTA_PP}/grid4d.h.reg.cpp
 +	${MANTA_PP}/kernel.cpp
 +	${MANTA_PP}/kernel.h
 +	${MANTA_PP}/kernel.h.reg
 +	${MANTA_PP}/kernel.h.reg.cpp
 +	${MANTA_PP}/levelset.cpp
 +	${MANTA_PP}/levelset.h
 +	${MANTA_PP}/levelset.h.reg
 +	${MANTA_PP}/levelset.h.reg.cpp
 +	${MANTA_PP}/mesh.cpp
 +	${MANTA_PP}/mesh.h
 +	${MANTA_PP}/mesh.h.reg
 +	${MANTA_PP}/mesh.h.reg.cpp
 +	${MANTA_PP}/movingobs.cpp
 +	${MANTA_PP}/movingobs.h
 +	${MANTA_PP}/movingobs.h.reg
 +	${MANTA_PP}/movingobs.h.reg.cpp
 +	${MANTA_PP}/multigrid.cpp
 +	${MANTA_PP}/multigrid.h
 +	${MANTA_PP}/multigrid.h.reg
 +	${MANTA_PP}/multigrid.h.reg.cpp
 +	${MANTA_PP}/noisefield.cpp
 +	${MANTA_PP}/noisefield.h
 +	${MANTA_PP}/noisefield.h.reg
 +	${MANTA_PP}/noisefield.h.reg.cpp
 +	${MANTA_PP}/particle.cpp
 +	${MANTA_PP}/particle.h
 +	${MANTA_PP}/particle.h.reg
 +	${MANTA_PP}/particle.h.reg.cpp
 +	${MANTA_PP}/plugin/advection.cpp
 +	${MANTA_PP}/plugin/apic.cpp
 +	${MANTA_PP}/plugin/extforces.cpp
 +	${MANTA_PP}/plugin/fire.cpp
 +	${MANTA_PP}/plugin/flip.cpp
 +	${MANTA_PP}/plugin/fluidguiding.cpp
 +	${MANTA_PP}/plugin/initplugins.cpp
 +	${MANTA_PP}/plugin/kepsilon.cpp
 +	${MANTA_PP}/plugin/meshplugins.cpp
 +#	${MANTA_PP}/plugin/numpyconvert.cpp
 +	${MANTA_PP}/plugin/pressure.cpp
 +	${MANTA_PP}/plugin/ptsplugins.cpp
 +	${MANTA_PP}/plugin/secondaryparticles
 +	${MANTA_PP}/plugin/sndparticles.cpp
 +	${MANTA_PP}/plugin/surfaceturbulence.cpp
 +#	${MANTA_PP}/plugin/tfplugins.cpp
 +	${MANTA_PP}/plugin/vortexplugins.cpp
 +	${MANTA_PP}/plugin/waveletturbulence.cpp
 +	${MANTA_PP}/plugin/waves.cpp
 +	${MANTA_PP}/pwrapper/manta.h
 +#	${MANTA_PP}/pwrapper/numpyWrap.cpp
 +#	${MANTA_PP}/pwrapper/numpyWrap.h
 +	${MANTA_PP}/pwrapper/pclass.cpp
 +	${MANTA_PP}/pwrapper/pclass.h
 +	${MANTA_PP}/pwrapper/pconvert.cpp
 +	${MANTA_PP}/pwrapper/pconvert.h
 +	${MANTA_PP}/pwrapper/pvec3.cpp
 +	${MANTA_PP}/pwrapper/pythonInclude.h
 +	${MANTA_PP}/pwrapper/registry.cpp
 +	${MANTA_PP}/pwrapper/registry.h
 +	${MANTA_PP}/python/defines.py
 +	${MANTA_PP}/python/defines.py.reg
 +	${MANTA_PP}/python/defines.py.reg.cpp
 +	${MANTA_PP}/registration.cpp
 +	${MANTA_PP}/shapes.cpp
 +	${MANTA_PP}/shapes.h
 +	${MANTA_PP}/shapes.h.reg
 +	${MANTA_PP}/shapes.h.reg.cpp
 +	${MANTA_PP}/test.cpp
 +	${MANTA_PP}/timing.cpp
 +	${MANTA_PP}/timing.h
 +	${MANTA_PP}/timing.h.reg
 +	${MANTA_PP}/timing.h.reg.cpp
 +	${MANTA_PP}/turbulencepart.cpp
 +	${MANTA_PP}/turbulencepart.h
 +	${MANTA_PP}/turbulencepart.h.reg
 +	${MANTA_PP}/turbulencepart.h.reg.cpp
 +	${MANTA_PP}/util/integrator.h
 +	${MANTA_PP}/util/interpol.h
 +	${MANTA_PP}/util/interpolHigh.h
 +	${MANTA_PP}/util/matrixbase.h
 +	${MANTA_PP}/util/mcubes.h
 +	${MANTA_PP}/util/quaternion.h
 +	${MANTA_PP}/util/randomstream.h
 +	${MANTA_PP}/util/rcmatrix.h
 +	${MANTA_PP}/util/simpleimage.cpp
 +	${MANTA_PP}/util/simpleimage.h
 +	${MANTA_PP}/util/solvana.h
 +	${MANTA_PP}/util/vector4d.cpp
 +	${MANTA_PP}/util/vector4d.h
 +	${MANTA_PP}/util/vectorbase.cpp
 +	${MANTA_PP}/util/vectorbase.h
 +	${MANTA_PP}/vortexpart.cpp
 +	${MANTA_PP}/vortexpart.h
 +	${MANTA_PP}/vortexpart.h.reg
 +	${MANTA_PP}/vortexpart.h.reg.cpp
 +	${MANTA_PP}/vortexsheet.cpp
 +	${MANTA_PP}/vortexsheet.h
 +	${MANTA_PP}/vortexsheet.h.reg
 +	${MANTA_PP}/vortexsheet.h.reg.cpp
 +)
 +
- blender_add_lib(bf_intern_mantaflow "${SRC}" "${INC}" "${INC_SYS}")
++set(LIB
++)
++
++blender_add_lib(bf_intern_mantaflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --cc intern/smoke/CMakeLists.txt
index 95db878c232,232183fe33c..ce95f94bb08
--- a/intern/smoke/CMakeLists.txt
+++ b/intern/smoke/CMakeLists.txt
@@@ -93,5 -96,4 +96,5 @@@ if(WITH_FFTW3
  	)
  endif()
  
 -blender_add_lib(bf_intern_smoke "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
 +# (sebbas): intern/smoke deprecated
- #blender_add_lib(bf_intern_smoke "${SRC}" "${INC}" "${INC_SYS}")
++#blender_add_lib(bf_intern_smoke "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --cc source/blender/blenkernel/CMakeLists.txt
index f7e3440d836,36be6f360ec..a45d610dc0c
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@@ -483,8 -518,14 +518,14 @@@ if(WITH_MOD_FLUID
  	add_definitions(-DWITH_MOD_FLUID)
  endif()
  
 -if(WITH_MOD_SMOKE)
 +if(WITH_MOD_MANTA)
+ 	list(APPEND INC
 -		../../../intern/smoke/extern
++		../../../intern/mantaflow/extern
+ 	)
+ 	list(APPEND LIB
 -		bf_intern_smoke
++		bf_intern_mantaflow
+ 	)
 -	add_definitions(-DWITH_SMOKE)
 +	add_definitions(-DWITH_MANTA)
  endif()
  
  if(WITH_MOD_OCEANSIM)
diff --cc source/blender/blenkernel/intern/smoke.c
index 821ff1d8bf8,122bb5a19c5..d458ec786d2
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@@ -87,11 -87,9 +87,9 @@@
  #  include "PIL_time.h"
  #endif
  
 -#ifdef WITH_SMOKE
 +#ifdef WITH_MANTA
- #	include "manta_fluid_API.h"
- #endif
  
- #ifdef WITH_MANTA
 -#include "smoke_API.h"
++#include "manta_fluid_API.h"
  
  #include "BLI_task.h"
  #include "BLI_kdtree.h"
diff --cc source/blender/draw/engines/eevee/eevee_volumes.c
index 24142a9a703,245774f5508..83a88445e3f
--- a/source/blender/draw/engines/eevee/eevee_volumes.c
+++ b/source/blender/draw/engines/eevee/eevee_volumes.c
@@@ -527,35 -543,26 +543,27 @@@ void EEVEE_volumes_cache_object_add(EEV
  		SmokeModifierData *smd = (SmokeModifierData *)md;
  		SmokeDomainSettings *sds = smd->domain;
  
- 		if (sds == NULL) {
- 			return;
- 		}
- 
  		/* Don't show smoke before simulation starts, this could be made an option in the future. */
 -		const bool show_smoke = ((int)DEG_get_ctime(draw_ctx->depsgraph) >= sds->point_cache[0]->startframe);
 +		/* (sebbas): Always show smoke for manta */
 +		/* const bool show_smoke = ((int)DEG_get_ctime(draw_ctx->depsgraph) >= sds->point_cache[0]->startframe); */
  
 -		if (sds->fluid && show_smoke) {
 -			const bool show_highres = BKE_smoke_show_highres(scene, sds);
 -			if (!sds->wt || !show_highres) {
 +		if (sds->fluid && (sds->type == FLUID_DOMAIN_TYPE_GAS) /* && show_smoke */ ) {
 +			if (!(sds->flags & FLUID_DOMAIN_USE_NOISE)) {
  				GPU_create_smoke(smd, 0);
  			}
 -			else if (sds->wt && show_highres) {
 +			else if (sds->flags & FLUID

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list