[Bf-blender-cvs] [1cd70c4f090] fluid-mantaflow: Merge branch 'master' into fluid-mantaflow
Sebastián Barschkis
noreply at git.blender.org
Fri Nov 8 12:24:57 CET 2019
Commit: 1cd70c4f090e6814594818a39fe0aefccfd78e8a
Author: Sebastián Barschkis
Date: Fri Nov 8 12:24:25 2019 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rB1cd70c4f090e6814594818a39fe0aefccfd78e8a
Merge branch 'master' into fluid-mantaflow
===================================================================
===================================================================
diff --cc build_files/cmake/platform/platform_win32.cmake
index 3c17e5afda7,e2006be8fc2..617da7314a5
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@@ -558,11 -569,19 +569,27 @@@ if(WITH_SYSTEM_AUDASPACE
set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
endif()
- if(WITH_MOD_MANTA)
- if(NOT WITH_OPENMP OR NOT WITH_MANTA_OMP)
- set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
- set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
+ if(WITH_TBB)
+ set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
+ set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
+ set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
+ else()
+ if(WITH_OPENIMAGEDENOISE)
+ message(STATUS "TBB disabled, also disabling OpenImageDenoise")
+ set(WITH_OPENIMAGEDENOISE OFF)
+ endif()
+ if(WITH_OPENVDB)
+ 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()
+ endif()
endif()
# used in many places so include globally, like OpenGL
diff --cc source/blender/draw/modes/object_mode.c
index 9fc025645d6,781c7e6a488..f8e623ffe01
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@@ -2612,24 -2693,23 +2693,25 @@@ static void DRW_shgroup_volume_extra(OB
DRW_object_wire_theme_get(ob, view_layer, &color);
- /* Small cube showing voxel size (adjusts with adaptive domain) */
- float min[3], max[3], size[3];
+ /* Small cube showing voxel size. */
+ float min[3];
- madd_v3fl_v3fl_v3fl_v3i(min, sds->p0, sds->cell_size, sds->res_min);
+ madd_v3fl_v3fl_v3fl_v3i(min, mds->p0, mds->cell_size, mds->res_min);
- madd_v3fl_v3fl_v3fl_v3i(max, mds->p0, mds->cell_size, mds->res_max);
- sub_v3_v3v3(size, max, min);
float voxel_cubemat[4][4] = {{0.0f}};
- /* scale small cube */
- voxel_cubemat[0][0] = (1.0f / (float)mds->res[0]) * size[0] * 0.5;
- voxel_cubemat[1][1] = (1.0f / (float)mds->res[1]) * size[1] * 0.5;
- voxel_cubemat[2][2] = (1.0f / (float)mds->res[2]) * size[2] * 0.5;
- /* translate small cube */
+ /* scale small cube to voxel size */
- voxel_cubemat[0][0] = 1.0f / (float)sds->base_res[0];
- voxel_cubemat[1][1] = 1.0f / (float)sds->base_res[1];
- voxel_cubemat[2][2] = 1.0f / (float)sds->base_res[2];
++ voxel_cubemat[0][0] = 1.0f / (float)mds->base_res[0];
++ voxel_cubemat[1][1] = 1.0f / (float)mds->base_res[1];
++ voxel_cubemat[2][2] = 1.0f / (float)mds->base_res[2];
+ voxel_cubemat[3][0] = voxel_cubemat[3][1] = voxel_cubemat[3][2] = -1.0f;
+ voxel_cubemat[3][3] = 1.0f;
+ /* translate small cube to corner */
voxel_cubemat[3][0] = min[0];
voxel_cubemat[3][1] = min[1];
voxel_cubemat[3][2] = min[2];
voxel_cubemat[3][3] = 1.0f;
++
/* move small cube into the domain (otherwise its centered on vertex of domain object) */
translate_m4(voxel_cubemat, 1.0f, 1.0f, 1.0f);
+ /* apply transformation matrix to voxel cube matrix */
mul_m4_m4m4(voxel_cubemat, ob->obmat, voxel_cubemat);
DRW_buffer_add_entry(sgl->empties.cube, color, &one, voxel_cubemat);
@@@ -2659,11 -2739,14 +2741,15 @@@
DRWShadingGroup *grp = DRW_shgroup_create(volume_velocity_shader_get(use_needle),
sgl->non_meshes);
- DRW_shgroup_uniform_texture(grp, "velocityX", sds->tex_velocity_x);
- DRW_shgroup_uniform_texture(grp, "velocityY", sds->tex_velocity_y);
- DRW_shgroup_uniform_texture(grp, "velocityZ", sds->tex_velocity_z);
- DRW_shgroup_uniform_float_copy(grp, "displaySize", sds->vector_scale);
- DRW_shgroup_uniform_float_copy(grp, "slicePosition", sds->slice_depth);
- DRW_shgroup_uniform_vec3_copy(grp, "cellSize", sds->cell_size);
- DRW_shgroup_uniform_vec3_copy(grp, "domainOriginOffset", sds->p0);
- DRW_shgroup_uniform_ivec3_copy(grp, "adaptiveCellOffset", sds->res_min);
++
+ DRW_shgroup_uniform_texture(grp, "velocityX", mds->tex_velocity_x);
+ DRW_shgroup_uniform_texture(grp, "velocityY", mds->tex_velocity_y);
+ DRW_shgroup_uniform_texture(grp, "velocityZ", mds->tex_velocity_z);
+ DRW_shgroup_uniform_float_copy(grp, "displaySize", mds->vector_scale);
+ DRW_shgroup_uniform_float_copy(grp, "slicePosition", mds->slice_depth);
++ DRW_shgroup_uniform_vec3_copy(grp, "cellSize", mds->cell_size);
++ DRW_shgroup_uniform_vec3_copy(grp, "domainOriginOffset", mds->p0);
++ DRW_shgroup_uniform_ivec3_copy(grp, "adaptiveCellOffset", mds->res_min);
DRW_shgroup_uniform_int_copy(grp, "sliceAxis", slice_axis);
DRW_shgroup_call_procedural_lines(grp, ob, line_count);
@@@ -3641,9 -3757,13 +3760,13 @@@ static void OBJECT_cache_populate(void
DRW_buffer_add_entry(sgl->empties.empty_axes, color, &axes_size, ob->obmat);
}
+ if (ob->rigidbody_object) {
+ DRW_shgroup_collision(sgl, ob, theme_id);
+ }
+
- if ((md = modifiers_findByType(ob, eModifierType_Smoke)) &&
+ if ((md = modifiers_findByType(ob, eModifierType_Manta)) &&
(modifier_isEnabled(scene, md, eModifierMode_Realtime)) &&
- (((SmokeModifierData *)md)->domain != NULL)) {
+ (((MantaModifierData *)md)->domain != NULL)) {
DRW_shgroup_volume_extra(sgl, ob, view_layer, scene, md);
}
}
diff --cc source/blender/modifiers/CMakeLists.txt
index b9e1536e6e6,602ef634e1b..dbc3fd0ce0c
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@@ -99,7 -104,9 +101,8 @@@ set(SR
intern/MOD_wireframe.c
MOD_modifiertypes.h
- intern/MOD_fluidsim_util.h
intern/MOD_meshcache_util.h
+ intern/MOD_solidify_util.h
intern/MOD_util.h
intern/MOD_weightvg_util.h
)
More information about the Bf-blender-cvs
mailing list