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.
This commit is contained in:
Sergey Sharybin 2019-02-21 15:15:10 +01:00
parent 4f0b61f15b
commit d518438479
2 changed files with 2 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}