diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-09 01:12:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-09 01:17:18 +0300 |
commit | 70028e73dcbf4494c7584be3266268eb44c0ac4b (patch) | |
tree | 7401908b40b70705c415e35b4794eb8b8cbfc986 /source/blender/blenkernel/BKE_armature.h | |
parent | 2d973f44e2fd47fa2fd4c1f59247c56517fcb26c (diff) |
Readfile: use hash lookup for bones
Bone loop for reconstructing links was O(n^2)
Diffstat (limited to 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index e1885e46b24..6d00110e318 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -34,6 +34,7 @@ */ struct Bone; +struct GHash; struct Main; struct bArmature; struct bPoseChannel; @@ -72,6 +73,7 @@ extern "C" { struct bArmature *BKE_armature_add(struct Main *bmain, const char *name); struct bArmature *BKE_armature_from_object(struct Object *ob); +int BKE_armature_bonelist_count(struct ListBase *lb); void BKE_armature_bonelist_free(struct ListBase *lb); void BKE_armature_free(struct bArmature *arm); void BKE_armature_make_local(struct bArmature *arm); @@ -84,7 +86,8 @@ bool BKE_pose_minmax(struct Object *ob, float r_min[3], float r_max[3], bool use int bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail); -struct Bone *BKE_armature_find_bone_name(struct bArmature *arm, const char *name); +struct Bone *BKE_armature_find_bone_name(struct bArmature *arm, const char *name); +struct GHash *BKE_armature_bone_from_name_map(struct bArmature *arm); bool BKE_armature_bone_flag_test_recursive(const struct Bone *bone, int flag); |