diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-21 17:02:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-21 17:04:18 +0300 |
commit | 5e4ed2793b9bec3b45830106f83c5bfffa810453 (patch) | |
tree | f34299646fbb0d146aa0f70002366fab7a4aa4d6 /source/blender/blenkernel/intern/armature_update.c | |
parent | b6693f1f544a97fa2325c142d05e82fa60b63b27 (diff) |
Depsgraph: Move boundbox sync to the post-geometry evaluation
Boundbox does not depend on transform and only need geometry
component.
This change solves possible race condition accessing geometry
data and allocating/assigning pointers.
Based on disacussion in IRC with @mano-wii and @brecht.
Diffstat (limited to 'source/blender/blenkernel/intern/armature_update.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index e882b64e8cc..01f1a3f7b55 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -47,6 +47,7 @@ #include "BKE_curve.h" #include "BKE_displist.h" #include "BKE_fcurve.h" +#include "BKE_object.h" #include "BKE_scene.h" #include "BIK_api.h" @@ -748,12 +749,13 @@ void BKE_pose_splineik_evaluate(struct Depsgraph *depsgraph, } /* Common part for both original and proxy armatrues. */ -static void pose_eval_done_common(Object *object) +static void pose_eval_done_common(struct Depsgraph *depsgraph, Object *object) { bPose *pose = object->pose; UNUSED_VARS_NDEBUG(pose); BLI_assert(pose != NULL); armature_cached_bbone_deformation_update(object); + BKE_object_eval_boundbox(depsgraph, object); } static void pose_eval_cleanup_common(Object *object) { @@ -770,7 +772,7 @@ void BKE_pose_eval_done(struct Depsgraph *depsgraph, Object *object) UNUSED_VARS_NDEBUG(pose); DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); BLI_assert(object->type == OB_ARMATURE); - pose_eval_done_common(object); + pose_eval_done_common(depsgraph, object); } void BKE_pose_eval_cleanup(struct Depsgraph *depsgraph, @@ -801,7 +803,7 @@ void BKE_pose_eval_proxy_done(struct Depsgraph *depsgraph, Object *object) { BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL); DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); - pose_eval_done_common(object); + pose_eval_done_common(depsgraph, object); } void BKE_pose_eval_proxy_cleanup(struct Depsgraph *depsgraph, Object *object) |