diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-09-04 13:12:49 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-09-04 13:26:52 +0300 |
commit | f79c748246b075fddf719d2a7a7cbd764f4c5a60 (patch) | |
tree | 29006a3d23db2961d55a43001f1e88e7afe91ef6 /source/blender/blenkernel/BKE_armature.h | |
parent | 52fda9b0dbdc561f905cd691532e361a0254113a (diff) |
Armature: Cheap edit-to-object mode speedup.
`fix_bonelist_roll()` is already recursive, and was calling recursive `BKE_armature_where_is_bone()` twice!
Changed `BKE_armature_where_is_bone()` to controll whether we recurse over children or not.
With full Victor's rig, we gain 16% in `ED_armature_from_edit()` (from 31ms to 26ms).
With a dummy test-case 100 bones chain, we gain 80% in `ED_armature_from_edit()` (from 1.25ms to 0.25ms).
Not crucial, but still worth it. ;)
Diffstat (limited to 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 2a674e5c2b9..e1885e46b24 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -91,7 +91,7 @@ bool BKE_armature_bone_flag_test_recursive(const struct Bone *bone, int float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist); void BKE_armature_where_is(struct bArmature *arm); -void BKE_armature_where_is_bone(struct Bone *bone, struct Bone *prevbone); +void BKE_armature_where_is_bone(struct Bone *bone, struct Bone *prevbone, const bool use_recursion); void BKE_pose_rebuild(struct Object *ob, struct bArmature *arm); void BKE_pose_where_is(struct Scene *scene, struct Object *ob); void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, bool do_extra); |