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:
authorAlexander Gavrilov <angavrilov@gmail.com>2016-10-07 13:27:11 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2016-10-07 21:47:00 +0300
commit0a2a006775543292786e8642b20a594771fdc81c (patch)
treea4691a5ef1775477db13dae13ee9d9dd80efa2bc /source/blender/blenloader
parent2dccf5a6e881973858de2c230cb610a2ea3a03e1 (diff)
Collision: skip expensive BVH update if the collider doesn't move.
Since the collision modifier cannot be disabled, it causes a constant hit on the viewport animation playback FPS. Most of this overhead can be automatically removed in the case when the collider is static. The updates are only skipped when the collider was stationary during the preceding update as well, so the state is stored in a field. Knowing that the collider is static can also be used to disable similar BVH updates for substeps in the actual cloth simulation code. Differential Revision: https://developer.blender.org/D2277
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index d86a89a0e48..139cb84fea1 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5192,6 +5192,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
collmd->time_x = collmd->time_xnew = -1000;
collmd->mvert_num = 0;
collmd->tri_num = 0;
+ collmd->is_static = false;
collmd->bvhtree = NULL;
collmd->tri = NULL;