diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-20 17:42:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-20 17:53:59 +0300 |
commit | 4dc639ac9965f3d0e8b2304363c62d888cdd1dc9 (patch) | |
tree | f0272c9c70e5095dbabf5bce59d07cd8492f1b74 /source/blender/blenkernel/intern/object.c | |
parent | 163be42a9661741757325039909ba81f0701b248 (diff) |
Speedup rigs with multiple objects deformed by bbones
Previously each of the objects which has armature modifier will
request deformation matricies from bbones. Thing is, all those
deformations are the same and do not depend on object which is
being modified. What's even worse is that this calculation is
not cheap.
This change makes it so bbones deformation is calculated once
and stored in the armature object. After this armature modifiers
simply use it.
With a rigs we've got here dependency graph evaluation time
goes down from 0.02 sec to 0.012 sec.
Possible further optimization is to make bbone deformation
calculated at the time when bone is calculated. This will avoid
an extra threaded loop over all bones.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 1a67822d260..0d3dfbeb382 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -458,6 +458,7 @@ void BKE_object_free_derived_caches(Object *ob) object_update_from_subsurf_ccg(ob); BKE_object_free_derived_mesh_caches(ob); + armature_cached_bbone_deformation_free(ob); if (ob->runtime.mesh_eval != NULL) { Mesh *mesh_eval = ob->runtime.mesh_eval; |