[Bf-blender-cvs] [d27ccf990c2] master: Mantaflow [Part 6]: Updates in /blender/source
Sebastián Barschkis
noreply at git.blender.org
Mon Dec 16 16:37:06 CET 2019
Commit: d27ccf990c2b957a10f4676e3153f907829a4b22
Author: Sebastián Barschkis
Date: Mon Dec 16 15:50:14 2019 +0100
Branches: master
https://developer.blender.org/rBd27ccf990c2b957a10f4676e3153f907829a4b22
Mantaflow [Part 6]: Updates in /blender/source
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming.
Reviewed By: sergey
Maniphest Tasks: T59995
Differential Revision: https://developer.blender.org/D3855
===================================================================
M extern/CMakeLists.txt
A extern/mantaflow/CMakeLists.txt
M intern/CMakeLists.txt
M intern/cycles/blender/blender_mesh.cpp
M intern/cycles/blender/blender_session.cpp
M intern/cycles/blender/blender_util.h
R100 release/datafiles/blender_icons16/icon16_mod_smoke.dat release/datafiles/blender_icons16/icon16_mod_fluid.dat
R100 release/datafiles/blender_icons32/icon32_mod_smoke.dat release/datafiles/blender_icons32/icon32_mod_fluid.dat
M release/datafiles/locale
M source/blender/CMakeLists.txt
M source/blender/alembic/intern/abc_exporter.cc
A source/blender/blenkernel/BKE_fluid.h
D source/blender/blenkernel/BKE_fluidsim.h
M source/blender/blenkernel/BKE_pointcache.h
D source/blender/blenkernel/BKE_smoke.h
M source/blender/blenkernel/CMakeLists.txt
M source/blender/blenkernel/intern/bpath.c
M source/blender/blenkernel/intern/dynamicpaint.c
M source/blender/blenkernel/intern/effect.c
D source/blender/blenkernel/intern/fluidsim.c
M source/blender/blenkernel/intern/modifier.c
M source/blender/blenkernel/intern/object.c
M source/blender/blenkernel/intern/particle.c
M source/blender/blenkernel/intern/pointcache.c
D source/blender/blenkernel/intern/smoke.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/versioning_250.c
M source/blender/blenloader/intern/versioning_260.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/blenloader/intern/versioning_legacy.c
M source/blender/blenloader/intern/writefile.c
M source/blender/depsgraph/intern/depsgraph_physics.cc
M source/blender/draw/engines/eevee/eevee_volumes.c
M source/blender/draw/engines/overlay/overlay_extra.c
M source/blender/draw/engines/overlay/shaders/volume_velocity_vert.glsl
M source/blender/draw/engines/workbench/workbench_deferred.c
M source/blender/draw/engines/workbench/workbench_forward.c
M source/blender/draw/engines/workbench/workbench_volume.c
M source/blender/editors/datafiles/CMakeLists.txt
M source/blender/editors/include/UI_icons.h
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/physics/CMakeLists.txt
M source/blender/editors/physics/particle_object.c
M source/blender/editors/physics/physics_intern.h
M source/blender/editors/physics/physics_ops.c
M source/blender/editors/space_buttons/buttons_context.c
M source/blender/editors/space_outliner/outliner_draw.c
M source/blender/editors/space_view3d/CMakeLists.txt
M source/blender/gpencil_modifiers/CMakeLists.txt
M source/blender/gpu/CMakeLists.txt
M source/blender/gpu/GPU_draw.h
M source/blender/gpu/intern/gpu_draw.c
M source/blender/makesdna/DNA_modifier_types.h
M source/blender/makesdna/DNA_object_types.h
M source/blender/makesdna/DNA_particle_types.h
D source/blender/makesdna/DNA_smoke_types.h
M source/blender/makesdna/intern/makesdna.c
M source/blender/makesrna/RNA_access.h
M source/blender/makesrna/intern/CMakeLists.txt
M source/blender/makesrna/intern/makesrna.c
D source/blender/makesrna/intern/rna_fluidsim.c
M source/blender/makesrna/intern/rna_gpencil_modifier.c
M source/blender/makesrna/intern/rna_internal.h
M source/blender/makesrna/intern/rna_modifier.c
M source/blender/makesrna/intern/rna_object_force.c
M source/blender/makesrna/intern/rna_particle.c
D source/blender/makesrna/intern/rna_smoke.c
M source/blender/modifiers/CMakeLists.txt
M source/blender/modifiers/MOD_modifiertypes.h
R056 source/blender/modifiers/intern/MOD_smoke.c source/blender/modifiers/intern/MOD_fluid.c
D source/blender/modifiers/intern/MOD_fluidsim.c
D source/blender/modifiers/intern/MOD_fluidsim_util.c
D source/blender/modifiers/intern/MOD_fluidsim_util.h
M source/blender/modifiers/intern/MOD_util.c
M source/blender/python/intern/CMakeLists.txt
M source/blender/python/intern/bpy_app_build_options.c
M source/blender/python/intern/bpy_interface.c
M source/blender/render/CMakeLists.txt
M source/blender/shader_fx/CMakeLists.txt
===================================================================
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index b985a39106b..e79aba0e988 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -105,3 +105,7 @@ if(WITH_QUADRIFLOW)
set(QUADRIFLOW_CMAKE_CFG ${CMAKE_CURRENT_SOURCE_DIR}/quadriflow/blender_config.cmake)
add_subdirectory(quadriflow)
endif()
+
+if(WITH_MOD_FLUID)
+ add_subdirectory(mantaflow)
+endif()
diff --git a/extern/mantaflow/CMakeLists.txt b/extern/mantaflow/CMakeLists.txt
new file mode 100644
index 00000000000..72ce920c621
--- /dev/null
+++ b/extern/mantaflow/CMakeLists.txt
@@ -0,0 +1,203 @@
+# ***** 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")
+
+add_definitions(-DWITH_FLUID=1)
+
+set(MANTA_DEP
+ dependencies
+)
+set(MANTA_HLP
+ helper
+)
+set(MANTA_PP
+ preprocessed
+)
+
+if(WITH_TBB)
+ add_definitions(-DTBB=1)
+endif()
+
+if(WITH_OPENVDB)
+ add_definitions(-DOPENVDB=1)
+endif()
+
+set(INC
+ ${MANTA_PP}
+ ${MANTA_PP}/fileio
+ ${MANTA_PP}/python
+ ${MANTA_PP}/plugin
+ ${MANTA_HLP}/pwrapper
+ ${MANTA_HLP}/util
+ ${MANTA_DEP}/cnpy
+)
+
+set(INC_SYS
+ ${PYTHON_INCLUDE_DIRS}
+ ${ZLIB_INCLUDE_DIRS}
+)
+
+if(WITH_TBB)
+ 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
+ ${MANTA_DEP}/cnpy/cnpy.cpp
+ ${MANTA_DEP}/cnpy/cnpy.h
+
+ ${MANTA_PP}/commonkernels.h
+ ${MANTA_PP}/commonkernels.h.reg.cpp
+ ${MANTA_PP}/conjugategrad.cpp
+ ${MANTA_PP}/conjugategrad.h
+ ${MANTA_PP}/conjugategrad.h.reg.cpp
+ ${MANTA_PP}/edgecollapse.cpp
+ ${MANTA_PP}/edgecollapse.h
+ ${MANTA_PP}/edgecollapse.h.reg.cpp
+ ${MANTA_PP}/fastmarch.cpp
+ ${MANTA_PP}/fastmarch.h
+ ${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.cpp
+ ${MANTA_PP}/fluidsolver.cpp
+ ${MANTA_PP}/fluidsolver.h
+ ${MANTA_PP}/fluidsolver.h.reg.cpp
+ ${MANTA_PP}/general.cpp
+ ${MANTA_PP}/general.h
+ ${MANTA_PP}/general.h.reg.cpp
+ ${MANTA_PP}/gitinfo.h
+ ${MANTA_PP}/grid.cpp
+ ${MANTA_PP}/grid.h
+ ${MANTA_PP}/grid.h.reg.cpp
+ ${MANTA_PP}/grid4d.cpp
+ ${MANTA_PP}/grid4d.h
+ ${MANTA_PP}/grid4d.h.reg.cpp
+ ${MANTA_PP}/kernel.cpp
+ ${MANTA_PP}/kernel.h
+ ${MANTA_PP}/kernel.h.reg.cpp
+ ${MANTA_PP}/levelset.cpp
+ ${MANTA_PP}/levelset.h
+ ${MANTA_PP}/levelset.h.reg.cpp
+ ${MANTA_PP}/mesh.cpp
+ ${MANTA_PP}/mesh.h
+ ${MANTA_PP}/mesh.h.reg.cpp
+ ${MANTA_PP}/movingobs.cpp
+ ${MANTA_PP}/movingobs.h
+ ${MANTA_PP}/movingobs.h.reg.cpp
+ ${MANTA_PP}/multigrid.cpp
+ ${MANTA_PP}/multigrid.h
+ ${MANTA_PP}/multigrid.h.reg.cpp
+ ${MANTA_PP}/noisefield.cpp
+ ${MANTA_PP}/noisefield.h
+ ${MANTA_PP}/noisefield.h.reg.cpp
+ ${MANTA_PP}/particle.cpp
+ ${MANTA_PP}/particle.h
+ ${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
+# TODO (sebbas): add numpy to libraries
+# ${MANTA_PP}/plugin/numpyconvert.cpp
+ ${MANTA_PP}/plugin/pressure.cpp
+ ${MANTA_PP}/plugin/ptsplugins.cpp
+ ${MANTA_PP}/plugin/secondaryparticles.cpp
+ ${MANTA_PP}/plugin/surfaceturbulence.cpp
+# TODO (sebbas): add numpy to libraries
+# ${MANTA_PP}/plugin/tfplugins.cpp
+ ${MANTA_PP}/plugin/vortexplugins.cpp
+ ${MANTA_PP}/plugin/waveletturbulence.cpp
+ ${MANTA_PP}/plugin/waves.cpp
+ ${MANTA_PP}/python/defines.py
+ ${MANTA_PP}/python/defines.py.reg.cpp
+ ${MANTA_PP}/registration.cpp
+ ${MANTA_PP}/shapes.cpp
+ ${MANTA_PP}/shapes.h
+ ${MANTA_PP}/shapes.h.reg.cpp
+ ${MANTA_PP}/test.cpp
+ ${MANTA_PP}/timing.cpp
+ ${MANTA_PP}/timing.h
+ ${MANTA_PP}/timing.h.reg.cpp
+ ${MANTA_PP}/turbulencepart.cpp
+ ${MANTA_PP}/turbulencepart.h
+ ${MANTA_PP}/turbulencepart.h.reg.cpp
+ ${MANTA_PP}/vortexpart.cpp
+ ${MANTA_PP}/vortexpart.h
+ ${MANTA_PP}/vortexpart.h.reg.cpp
+ ${MANTA_PP}/vortexsheet.cpp
+ ${MANTA_PP}/vortexsheet.h
+ ${MANTA_PP}/vortexsheet.h.reg.cpp
+
+ ${MANTA_HLP}/pwrapper/manta.h
+# TODO (sebbas): add numpy to libraries
+# ${MANTA_HLP}/pwrapper/numpyWrap.cpp
+# ${MANTA_HLP}/pwrapper/numpyWrap.h
+ ${MANTA_HLP}/pwrapper/pclass.cpp
+ ${MANTA_HLP}/pwrapper/pclass.h
+ ${MANTA_HLP}/pwrapper/pconvert.cpp
+ ${MANTA_HLP}/pwrapper/pconvert.h
+ ${MANTA_HLP}/pwrapper/pvec3.cpp
+ ${MANTA_HLP}/pwrapper/pythonInclude.h
+ ${MANTA_HLP}/pwrapper/registry.cpp
+ ${MANTA_HLP}/pwrapper/registry.h
+ ${MANTA_HLP}/util/integrator.h
+ ${MANTA_HLP}/util/interpol.h
+ ${MANTA_HLP}/util/interpolHigh.h
+ ${MANTA_HLP}/util/matrixbase.h
+ ${MANTA_HLP}/util/mcubes.h
+ ${MANTA_HLP}/util/quaternion.h
+ ${MANTA_HLP}/util/randomstream.h
+ ${MANTA_HLP}/util/rcmatrix.h
+ ${MANTA_HLP}/util/simpleimage.cpp
+ ${MANTA_HLP}/util/simpleimage.h
+ ${MANTA_HLP}/util/solvana.h
+ ${MANTA_HLP}/util/vector4d.cpp
+ ${MANTA_HLP}/util/vector4d.h
+ ${MANTA_HLP}/util/vectorbase.cpp
+ ${MANTA_HLP}/util/vectorbase.h
+)
+
+set(LIB
+)
+
+blender_add_lib(extern_mantaflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt
index e6b561c39b9..a5605e875a8 100644
--- a/intern/CMakeLists.txt
+++ b/intern/CMakeLists.txt
@@ -40,14 +40,6 @@ if(WITH_MOD_REMESH)
add_subdirectory(dualcon)
endif()
-if(WITH_MOD_FLUID)
- add_subdirectory(elbeem)
-endif()
-
-if(WITH_MOD_SMOKE)
- add_subdirectory(smoke)
-endif()
-
if(WITH_IK_SOLVER)
add_subdirectory(iksolver)
endif()
@@ -73,6 +65,10 @@ if(WIN32)
add_subdirectory(utfconv)
endif()
+if(WITH_MOD_FLUID)
+ add_subdirectory(mantaflow)
+endif()
+
if(WITH_OPENVDB)
add_subdirectory(openvdb)
endif()
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index 5c28404e745..b18f9a37948 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -283,7 +283,7 @@ static void mikk_compute_tangents(
static void create_mesh_volume_attribute(
BL::Object &b_ob, Mesh *mesh, ImageManager *image_manager, AttributeStandard std, float frame)
{
- BL::SmokeDomainSettings b_domain = object_smoke_domain_find(b_ob);
+ BL::FluidDomainSettings b_domain = object_fluid_domain_find(b_ob);
if (!b_domain)
return;
@@ -930,13 +930,13 @@ static void sync_mesh_fluid_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
if (scene->need_motion() == Scene::MOTION_NONE)
return;
- BL::DomainFluidSettings b_fluid_domain = object_fluid_domain_find(b_ob);
+ BL::FluidDomainSettings b_fluid_domain = object_fluid_domain_find(b_ob);
if (!b_fluid_domain)
return;
/* If the mesh has modifiers following the fluid domain we can't export motion. */
- if (b_fluid_domain.fluid_mesh_vertices.length() != mesh->verts.size())
+ if (b_fluid_domain.mesh_vertices.length() != mesh->verts.size())
return;
/* Find or add attribute */
@@ -953,13 +953,12 @@ static void sync_mesh_fluid_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
float relative_time = motion_times[step] * scene->motion_shutter_time() * 0.5f;
float3 *mP = attr_mP->data_float3() + step * mesh->verts.size();
- BL::DomainFluidSettings::fluid_mesh_vertices_iterator fvi;
+ BL::FluidDomainSettings::mesh_vertices_iterator svi;
int i = 0;
- for (b_fluid_domain.fluid_mesh_vertices.begin(fvi);
- fvi != b_fluid_domain.fluid_mesh_vertices.end();
- ++fvi, ++i) {
- mP[i] = P[i] + get_float3(fvi->velocity()) * relative_time;
+ for (b_fluid_domain.mesh_vertices.begin(svi); svi != b_fluid_domain.mesh_vertices.end();
+ ++svi, ++i) {
+ mP[i] = P[i] + get_float3(svi->velocity()) * relative_time;
}
}
}
@@ -1099,7 +1098,7 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph &b_depsgraph,
}
mesh->geometry_flags = requested_geometry_flags;
- /* fluid motion */
+ /* mesh fluid motion mantaflow */
sync_mesh_fluid_motion(b_ob, scene, mesh);
/* tag update */
@@ -1148,8 +1147,8 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph &b_depsgraph,
* would need a more extensive check to see which objects are animated */
BL::Mesh b_mesh(PointerRNA_NULL);
- /* fluid motion is exported immediate with mesh, skip here */
- BL::DomainFluidSettings b_fluid_domain = object_fluid_domain_find(b_ob);
+ /* manta motion is exported immediate with mesh, skip here */
+ BL::FluidDomainSettings b_fluid_domain = object_fluid_domain_find(b_ob);
if (b_fluid_domain)
return;
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 78fb49db6c8..26b04babce2 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -1158,7 +1158,7 @@ void BlenderSession::builtin_image_info(const string &builtin_name,
else if (b_id.is_a(&RNA_Object)) {
/* smoke volume data */
BL::Object b_ob(b_id);
- BL::SmokeDomainSettings b_domain = object_smoke_domain_find(b_ob);
+ BL::FluidDomainSettings b_domain = object_fluid_doma
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list