Still working on pinned bone. The NLA/Armature/Bones code is a bit obtuse. Many of the developers who have ventured into its hoary depths to make a bug fix or clean the code have called it strange, messy, and/or confusing. Of course, I'm sure there are some Blender geniuses out there who get the whole thing. I am not one of them.
I have the source compiling with preliminary support for pinned bone put in. The NLA Strip structure now has hooks for it, as well as the function that my Python addNLAStrip module accesses. So, you can set a pinned bone via Python, and Blender remembers it. It just doesn't actually DO anything yet.
In the meantime, as I'm slogging through the source code, I'm thinking about the next generation of obstacle avoidance. You want a system that's dynamic - such as a big boulder falling into a narrow trail effectively blocks the trail - or bodies piling up will be avoided. You also want something with a decent amount of precision - defining irregular barriers like castle walls - round turrets - parked cars - et cetera. I think I've decided on using vertex painting of the ground mesh for this. Black means that "None shall pass!", whereas white means smooth sailing. Shades in between would indicate various levels to "resistance" in the terrain. Thus, you could create favored pathways across a rolling plain, while still allowing the possibility of interaction off the path, if circumstances so warranted.
Building the texture reading parts will not be a problem. The real trick, though will be the AI algorithm for pathfinding among the different possible routes. I've done a lot of reading on the A* algorithm, and it seems to be the current industry standard for pathfinding. The thing it ignores, though, is that it often gives Actors a sort of Godlike intelligence when selecting a path. I don't want that. I'm trying to come up with something that is based on what the Actor can actually see, in the direction they are pointing. What I'm thinking is to have each Actor calculate the "cost" in vertex colors of an approach to its target, weighted for different offsets. As a global preference, you would set the sampling, both the spread of angles it will sample away from a direct route, and the number of vertex color tests along each test vector. It just sounds computationally expensive though. Grrr.
If anyone has any suggestions, I'm all ears.