Another update. This one adds a number of features which relate to animation support.
-
Added a ‘Frames’ listbox. This allows quick selection and deletion of keyframes in the current animation. By right-clicking on a listbox line, the 3d view is sent to the specified frame. Using the ‘Batch’ toggle, this can be used to screen frames for batch save or to specify destination frames for batch load.
-
Added a menu of IK options to the bones listbox. Bones with IK solver constraints can be selected and IK settings can be specified for selected listbox bones.
-
Added batch import and export of poses for animation. These features can work with the frames listbox, as noted above. Batch handling can be activated for both save and load using the ‘Batch’ toggle on the poses listbox tab, or selected for either using the general options menus on the save and load tabs.
-
Added a ‘Tools’ menu to the bones listbox. This presents some basic functions to facilitate creation (or removal) of IK for selected bones. It can add bones, delete bones, re-parent bones, add IK solver constraints to selected bones, remove IK from selected bones, or change the IK target bone for selections. Re-parenting and re-targeting both point the inactive (yellow) selections to the active (red) selection. I have used these tools to quickly add IK, like that seen in the example nozzy posted, to my own armature. Hopefully these can be useful for others, as well.
The batch handling can work in a few different ways. The poses listbox, used with the batch option, offers the most flexibility, allowing multiple selections for load. If the file selector button or menu browser is used for batch loading, only one file can be selected, to load a numbered batch of files. Save exports files to a numbered batch in all cases, with length specified if the frames listbox is not being used for screening. If frames batch is not selected, both load and save will start from the current frame and run through the specified length. Using the frames listbox batch mode, loaded animations can be timed as desired and frames to be saved can be specified.
Sounds complicated. hopefully it isn’t so bad. Some things may be complex enough to benefit from some sort of documentation now, perhaps. The three listboxes work together with various features, enabling a number of functions and tools which would have been rather more difficult otherwise. My thanks to nozzy for prompting the listbox creation.
I do note a couple of things in need of development or revision. A series of IK-enabled poses, saved with the poseMatrix option then re-loaded with IK off, will not interpolate correctly. The frame interpolations for rotations and translations don’t seem to correspond as expected, leading to misalignments, even though the poseMatrix keyframes are correct. I’m trying to see if I can compensate for this in any way.
There also seem to be a couple of possible memory leaks. Blender registers increasing memory usage after a batch import or keyframe deletion. Assuming this is a scripting flaw, rather than some intrinsic limitation of Blender’s, I’ve been looking for a cause in my code, but I haven’t found anything yet. This has not caused any real problems in my tests, but others may have less RAM than I. If anyone has any problems or observations relating to this, please let me know.
With this update, the basic toolset I had originally envisioned is largely in place. Unless anyone has more requests or suggestions, future updates will probably be focused on revisions for efficiency or de-bugging.
As usual, please let me know if there are any problems, questions, or comments.
http://www.kuroyumes-developmentzone.com/~Cage/PoseLib14e.py