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@gmail.com>2019-09-16 11:45:49 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-23 17:27:23 +0300
commita168c3d282083bb4c02078bbd374f5554eeddce3 (patch)
tree291f6e0a64b09066985013a65abbecfcd96c774c /source/blender/modifiers/intern/MOD_fluidsim_util.c
parent69ad44d5b48aa0d2cf00ff6c37be01f7384afe3b (diff)
Modifiers: every modifier now copies mesh settings, fixing texture space issues
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index 587aa108fd1..748bf4db4e2 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -513,6 +513,12 @@ static Mesh *fluidsim_read_cache(
return NULL;
}
+ BKE_mesh_copy_settings(newmesh, orgmesh);
+
+ /* Fluid simulation has a texture space that based on the bounds of the fluid mesh.
+ * This does not seem particularly useful, but it's backwards compatible. */
+ BKE_mesh_texspace_calc(newmesh);
+
/* load vertex velocities, if they exist...
* TODO? use generate flag as loading flag as well?
* warning, needs original .bobj.gz mesh loading filename */