[Bf-blender-cvs] [451400f6e6b] fluid-mantaflow: Mantaflow: Fixed more issues raised in part 6 of the review (D3855)

Sebastián Barschkis noreply at git.blender.org
Mon Dec 16 15:02:45 CET 2019


Commit: 451400f6e6b2911be7059e6d6bf53cc312a2a3c3
Author: Sebastián Barschkis
Date:   Mon Dec 16 15:02:32 2019 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rB451400f6e6b2911be7059e6d6bf53cc312a2a3c3

Mantaflow: Fixed more issues raised in part 6 of the review (D3855)

Mostly renaming from manta to fluid

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

M	CMakeLists.txt
M	build_files/cmake/config/blender_full.cmake
M	build_files/cmake/config/blender_lite.cmake
M	build_files/cmake/config/blender_release.cmake
M	build_files/cmake/macros.cmake
M	build_files/cmake/platform/platform_apple.cmake
M	build_files/cmake/platform/platform_win32.cmake
M	extern/CMakeLists.txt
M	extern/mantaflow/CMakeLists.txt
M	extern/mantaflow/UPDATE.sh
M	extern/mantaflow/preprocessed/general.h
M	intern/CMakeLists.txt
M	intern/cycles/blender/blender_mesh.cpp
M	intern/mantaflow/CMakeLists.txt
M	intern/mantaflow/intern/MANTA_main.cpp
R100	release/datafiles/blender_icons16/icon16_mod_manta.dat	release/datafiles/blender_icons16/icon16_mod_fluid.dat
R100	release/datafiles/blender_icons32/icon32_mod_manta.dat	release/datafiles/blender_icons32/icon32_mod_fluid.dat
R100	release/scripts/presets/mantaflow/honey.py	release/scripts/presets/fluid/honey.py
R100	release/scripts/presets/mantaflow/oil.py	release/scripts/presets/fluid/oil.py
R052	release/scripts/presets/mantaflow/water.py	release/scripts/presets/fluid/water.py
M	release/scripts/startup/bl_operators/presets.py
M	release/scripts/startup/bl_ui/__init__.py
M	release/scripts/startup/bl_ui/properties_physics_common.py
R093	release/scripts/startup/bl_ui/properties_physics_manta.py	release/scripts/startup/bl_ui/properties_physics_fluid.py
M	source/blender/CMakeLists.txt
M	source/blender/alembic/intern/abc_exporter.cc
R072	source/blender/blenkernel/BKE_manta.h	source/blender/blenkernel/BKE_fluid.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
R097	source/blender/blenkernel/intern/manta.c	source/blender/blenkernel/intern/fluid.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/particle_system.c
M	source/blender/blenkernel/intern/pointcache.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/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/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
R071	source/blender/editors/physics/physics_manta.c	source/blender/editors/physics/physics_fluid.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/gpu/CMakeLists.txt
M	source/blender/gpu/intern/gpu_draw.c
R099	source/blender/makesdna/DNA_manta_types.h	source/blender/makesdna/DNA_fluid_types.h
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesdna/DNA_particle_types.h
M	source/blender/makesdna/intern/makesdna.c
M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/makesrna/intern/makesrna.c
R082	source/blender/makesrna/intern/rna_manta.c	source/blender/makesrna/intern/rna_fluid.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
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/modifiers/MOD_modifiertypes.h
R086	source/blender/modifiers/intern/MOD_manta.c	source/blender/modifiers/intern/MOD_fluid.c
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/windowmanager/WM_api.h

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a0488ab937..6f8b512b69b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -242,7 +242,7 @@ endif()
 
 
 # Modifiers
-option(WITH_MOD_MANTA           "Enable Mantaflow Fluid Simulation Framework" ON)
+option(WITH_MOD_FLUID           "Enable Mantaflow Fluid Simulation Framework" ON)
 option(WITH_MOD_REMESH          "Enable Remesh Modifier" ON)
 option(WITH_MOD_OCEANSIM        "Enable Ocean Modifier" ON)
 
@@ -1780,7 +1780,7 @@ if(FIRST_RUN)
 
   info_cfg_text("Modifiers:")
   info_cfg_option(WITH_MOD_REMESH)
-  info_cfg_option(WITH_MOD_MANTA)
+  info_cfg_option(WITH_MOD_FLUID)
   info_cfg_option(WITH_MOD_OCEANSIM)
 
   info_cfg_text("OpenGL:")
diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake
index d5cfb6cd3af..f5cfedc8ea7 100644
--- a/build_files/cmake/config/blender_full.cmake
+++ b/build_files/cmake/config/blender_full.cmake
@@ -31,7 +31,7 @@ set(WITH_INTERNATIONAL       ON  CACHE BOOL "" FORCE)
 set(WITH_LZMA                ON  CACHE BOOL "" FORCE)
 set(WITH_LZO                 ON  CACHE BOOL "" FORCE)
 set(WITH_MOD_REMESH          ON  CACHE BOOL "" FORCE)
-set(WITH_MOD_MANTA           ON  CACHE BOOL "" FORCE)
+set(WITH_MOD_FLUID           ON  CACHE BOOL "" FORCE)
 set(WITH_MOD_OCEANSIM        ON  CACHE BOOL "" FORCE)
 set(WITH_AUDASPACE           ON  CACHE BOOL "" FORCE)
 set(WITH_OPENAL              ON  CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake
index 7a54a4dd995..8cb5195aa2e 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -38,7 +38,7 @@ set(WITH_JACK                OFF CACHE BOOL "" FORCE)
 set(WITH_LZMA                OFF CACHE BOOL "" FORCE)
 set(WITH_LZO                 OFF CACHE BOOL "" FORCE)
 set(WITH_MOD_REMESH          OFF CACHE BOOL "" FORCE)
-set(WITH_MOD_MANTA           OFF CACHE BOOL "" FORCE)
+set(WITH_MOD_FLUID           OFF CACHE BOOL "" FORCE)
 set(WITH_MOD_OCEANSIM        OFF CACHE BOOL "" FORCE)
 set(WITH_AUDASPACE           OFF CACHE BOOL "" FORCE)
 set(WITH_OPENAL              OFF CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake
index f63ab447995..1a610ee45da 100644
--- a/build_files/cmake/config/blender_release.cmake
+++ b/build_files/cmake/config/blender_release.cmake
@@ -32,7 +32,7 @@ set(WITH_INTERNATIONAL       ON  CACHE BOOL "" FORCE)
 set(WITH_LZMA                ON  CACHE BOOL "" FORCE)
 set(WITH_LZO                 ON  CACHE BOOL "" FORCE)
 set(WITH_MOD_REMESH          ON  CACHE BOOL "" FORCE)
-set(WITH_MOD_MANTA           ON  CACHE BOOL "" FORCE)
+set(WITH_MOD_FLUID           ON  CACHE BOOL "" FORCE)
 set(WITH_MOD_OCEANSIM        ON  CACHE BOOL "" FORCE)
 set(WITH_AUDASPACE           ON  CACHE BOOL "" FORCE)
 set(WITH_OPENAL              ON  CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 94b9db7c686..3b6b4720a7c 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -510,11 +510,6 @@ function(setup_liblinks
   if(WITH_ALEMBIC)
     target_link_libraries(${target} ${ALEMBIC_LIBRARIES} ${HDF5_LIBRARIES})
   endif()
-  if(WITH_MOD_MANTA)
-    if(NOT WITH_OPENMP OR NOT WITH_MANTA_OMP)
-      target_link_libraries(${target} ${TBB_LIBRARIES})
-    endif()
-  endif()
   if(WITH_IMAGE_TIFF)
     target_link_libraries(${target} ${TIFF_LIBRARY})
   endif()
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index ccf841e7408..e60760e6cfd 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -411,6 +411,10 @@ if(NOT WITH_TBB OR NOT TBB_FOUND)
     message(STATUS "TBB not found, disabling OpenVDB")
     set(WITH_OPENVDB OFF)
   endif()
+  if(WITH_MOD_FLUID)
+    message(STATUS "TBB not found, disabling Fluid modifier")
+    set(WITH_MOD_FLUID OFF)
+  endif()
 endif()
 
 # CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
@@ -434,13 +438,6 @@ if(WITH_OPENMP)
   endif()
 endif()
 
-if(WITH_MOD_MANTA)
-  if(NOT WITH_OPENMP OR NOT WITH_MANTA_OMP)
-    set(TBB_INCLUDE_DIRS ${LIBDIR}/tbb/include)
-    set(TBB_LIBRARIES ${LIBDIR}/tbb/lib/libtbb.a)
-  endif()
-endif()
-
 set(EXETYPE MACOSX_BUNDLE)
 
 set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 9eb4a24e29a..c3d9b551926 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -567,13 +567,9 @@ else()
     message(STATUS "TBB disabled, also disabling OpenVDB")
     set(WITH_OPENVDB OFF)
   endif()
-  if(WITH_MOD_MANTA)
-    message(STATUS "TBB disabled, using OpenMP for Mantaflow")
-    if(NOT WITH_OPENMP)
-      message(STATUS "OpenMP disabled, also disabling Mantaflow")
-    else()
-      set(WITH_MANTA_OMP ON)
-    endif()
+  if(WITH_MOD_FLUID)
+    message(STATUS "TBB disabled, disabling Fluid modifier")
+    set(WITH_MOD_FLUID OFF)
   endif()
 endif()
 
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index 13fe2fcdf60..e79aba0e988 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -106,6 +106,6 @@ if(WITH_QUADRIFLOW)
   add_subdirectory(quadriflow)
 endif()
 
-if(WITH_MOD_MANTA)
+if(WITH_MOD_FLUID)
   add_subdirectory(mantaflow)
 endif()
diff --git a/extern/mantaflow/CMakeLists.txt b/extern/mantaflow/CMakeLists.txt
index 3bad53afc6c..72ce920c621 100644
--- a/extern/mantaflow/CMakeLists.txt
+++ b/extern/mantaflow/CMakeLists.txt
@@ -25,7 +25,7 @@
 
 set(MANTAVERSION "0.12")
 
-add_definitions(-DWITH_MANTA=1)
+add_definitions(-DWITH_FLUID=1)
 
 set(MANTA_DEP
   dependencies
diff --git a/extern/mantaflow/UPDATE.sh b/extern/mantaflow/UPDATE.sh
index bd8ba26609d..28d96cdf6d8 100644
--- a/extern/mantaflow/UPDATE.sh
+++ b/extern/mantaflow/UPDATE.sh
@@ -14,7 +14,6 @@ BLENDER_INSTALLATION=/Users/sebbas/Developer/Blender/fluid-mantaflow
 CLEAN_REPOSITORY=0
 
 # Choose which multithreading platform to use for Mantaflow preprocessing
-# When using OpenMP, make sure to compile with WITH_MANTA_OMP=1
 USE_OMP=0
 USE_TBB=1
 
diff --git a/extern/mantaflow/preprocessed/general.h b/extern/mantaflow/preprocessed/general.h
index bbb39f227b8..7a840517cef 100644
--- a/extern/mantaflow/preprocessed/general.h
+++ b/extern/mantaflow/preprocessed/general.h
@@ -107,9 +107,9 @@ inline bool _chklevel(int level = 0)
   throwError(msg)
 #define assertDeb(cond, msg) DEBUG_ONLY(assertMsg(cond, msg))
 
-// for compatibility with blender, blender only defines WITH_MANTA, make sure we have "BLENDER"
+// for compatibility with blender, blender only defines WITH_FLUID, make sure we have "BLENDER"
 #ifndef BLENDER
-#  ifdef WITH_MANTA
+#  ifdef WITH_FLUID
 #    define BLENDER 1
 #  endif
 #endif
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt
index 85dea5b6d52..a5605e875a8 100644
--- a/intern/CMakeLists.txt
+++ b/intern/CMakeLists.txt
@@ -65,7 +65,7 @@ if(WIN32)
   add_subdirectory(utfconv)
 endif()
 
-if(WITH_MOD_MANTA)
+if(WITH_MOD_FLUID)
   add_subdirectory(mantaflow)
 endif()
 
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index 5f2d4ed9785..b18f9a37948 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -925,18 +925,18 @@ static void create_subd_mesh(Scene *scene,
 
 /* Sync */
 
-static void sync_mesh_manta_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
+static void sync_mesh_fluid_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
 {
   if (scene->need_motion() == Scene::MOTION_NONE)
     return;
 
-  BL::FluidDomainSettings b_manta_domain = object_fluid_domain_find(b_ob);
+  BL::FluidDomainSettings b_fluid_domain = object_fluid_domain_find(b_ob);
 
-  if (!b_manta_domain)
+  if (!b_fluid_domain)
     return;
 
   /* If the mesh has modifiers following the fluid domain we can't export motion. */
-  if (b_manta_domain.mesh_vertices.length() != mesh->verts.size())
+  if (b_fluid_domain.mesh_vertices.length() != mesh->verts.size())
     return;
 
   /* Find or add attribute */
@@ -956,7 +956,7 @@ static void sync_mesh_manta_motion(BL::Object &b_ob, Scene *scene, Mesh *mesh)
     BL::FluidDomainSettings::mesh_vertices_iterator svi;
     int i = 0;
 
-    for (b_manta_domain.mesh_vertices.begin(svi); svi != b_manta_domain.mesh_vertices.end();
+    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 +1099,7 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph &b_depsgraph,
   mesh->geometry_flags = requested_geometry_flags;
 
   /* mesh fluid motion mantaflow */
-  sync_mesh_manta_motion(b_ob, scene, mesh);
+  sync_mesh_fluid_motion(b_ob, scene, mesh);
 
   /* tag update */
   bool rebuild = (oldtriangles != mesh->triangles) || (oldsubd_faces != mesh->subd_faces) ||
@@ -1148,8 +1148,8 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph &b_depsgraph,
   BL::Mesh b_mesh(PointerRNA_NULL);
 
   /* manta motion is exported immediate with mesh, skip here */
-  BL::FluidDomainSettings b_manta_domain = object_fluid_domain_find(b_ob);
-  if (b_manta_domain)
+  BL::FluidDomainSettings b_fluid_domain = object_fluid_domain_find(b_ob);
+  if (b_fluid_domain)
     return;
 
   if (ccl::BKE_object_is_deform_modified(b_ob, b_scene, preview)) {
diff --git a/intern/mantaflow/CMakeLists.txt b/intern/mantaflow/CMakeLists.txt
index b40319188a2..9fdd8b59aca 100644
--- a/intern/mantaflow/CMakeLists.txt
+++ b/intern/mantaflow/CMakeLists.txt
@@ -23,7 +23,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-add_definitions(-DWITH_MANTA=1)
+add_definitions(-DWITH_FLUID=1)
 
 if(WITH_OPENVDB)
   add_definitions(-DOPENVDB=1)
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp
index 458fbf0813c..70b6f98d97b 100644
--- a/intern/mantaflow/intern/MANTA_main.cpp
+++ b/intern/mantaflow/intern/MANTA_ma

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list