diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-21 17:15:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-21 17:25:02 +0300 |
commit | d518438479fea395970ddf7395d71452cbe1e57b (patch) | |
tree | d239ad7d44483d2f89c805ccff981ff43bbb4e02 /source/blender | |
parent | 4f0b61f15bb46bfb8a949b314d05130c0425c816 (diff) |
Subdiv: Enable topology cache for animation
This commit makes it so both Subdivision Surface and Multiresolution
modifiers are caching OpenSubdiv topology. This cuts down evaluation
time quite a bit, especially for meshes which don't have many extra
ordinary verticies.
Only working for animation. Other modifications like edit mode needs
more work to make topology cache preserved by copy-on-write.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_subsurf.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 34162b85386..0b3c9e1275d 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -80,9 +80,7 @@ static Subdiv *subdiv_descriptor_ensure(MultiresModifierData *mmd, { Subdiv *subdiv = BKE_subdiv_update_from_mesh( mmd->subdiv, subdiv_settings, mesh); - if (false) { - mmd->subdiv = subdiv; - } + mmd->subdiv = subdiv; return subdiv; } diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index be1dffd2c2c..d079d532938 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -123,9 +123,7 @@ static Subdiv *subdiv_descriptor_ensure(SubsurfModifierData *smd, { Subdiv *subdiv = BKE_subdiv_update_from_mesh( smd->subdiv, subdiv_settings, mesh); - if (false) { - smd->subdiv = subdiv; - } + smd->subdiv = subdiv; return subdiv; } |