From d518438479fea395970ddf7395d71452cbe1e57b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 21 Feb 2019 15:15:10 +0100 Subject: 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. --- source/blender/modifiers/intern/MOD_multires.c | 4 +--- source/blender/modifiers/intern/MOD_subsurf.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'source/blender/modifiers') 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; } -- cgit v1.2.3