Armature: implement universal hash table lookup of Bone objects by name.
authorAlexander Gavrilov <angavrilov@gmail.com>
Tue, 14 May 2019 18:48:22 +0000 (21:48 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Tue, 14 May 2019 18:56:57 +0000 (21:56 +0300)
commit26d2652d6d4287801d56dc8d41b1037750af701a
treee6d71dcc75782c28859d06d7eb39d7929c412b7b
parent987c6da6c0dd7b4f8c64561c030d4c381f2725c5
Armature: implement universal hash table lookup of Bone objects by name.

Since drivers on Bone properties are really supposed to be stored
in Armature data and access bones via its bones[] collection, this
lookup path should work efficiently.

Mass lookup of bones by name was already done through hashes,
but they were built temporarily every time that was needed. This
simply replaces it with a common hash table computed immediately
after file load, copy, or Edit to Object mode switch.
source/blender/blenkernel/BKE_armature.h
source/blender/blenkernel/intern/armature.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/armature/armature_naming.c
source/blender/editors/armature/armature_utils.c
source/blender/makesdna/DNA_armature_types.h
source/blender/makesrna/intern/rna_armature.c