Wednesday, 20 March 2013

PoseSaver - extensions ;)

I'm designing a new setup for the poseSaver to allow you to easily over-load and manage your own node handling within pose folders and was wanting to see if anybody had any feedback on this one...

So the idea is that any folder that the poseSaver points to, be that the main poseFolders or subfolders, can now have a python file in it that over-loads the main getNode handler in the pose function. Why??

Lets say you want to have a folder specifically for facial, and that facial in your rig is managed in a different way, or you would like to modify the filter used to find the nodes. You may even want to pass a node list directly in. At the moment it's hard work and would mean that for each folder/poseType you'd have to either change the rootNode (setRoot) or change the filter.cgf.

The new stuff will make folder type poses a doddle, if the code finds a python file in the folder then that file is passed and used pre the load or save calls. At the moment I expect 2 functions in there:

def poseGetNodesLoad():
 #do your stuff and filtering
 return filteredNodes
 
def poseGetNodesSave():
 #do your stuff and filtering
 return filteredNodes

These functions are run before the pose handler so you also would have the opportunity to do any file modifications in order to get the scene into the correct state for the pose functions. I may also support a teardown() function just in case you needed to do temp modification's that needed returning after the save or load call.

Anybody got any further thoughts on this? I'm thinking this would give you full control and it would make the systems far more open and customization

cheers

Mark