Use gstate.getNumBoneWeights()
Merge pull request #3565 from raven02/patch-2

SW: Use gstate.getNumBoneWeights()