View Full Version : Saving/Recalling Poses
07-28-2005, 11:43 AM
What would be the best way to allow an animator to save a current pose that could be recalled later, even if they restarted maya. Exporting to a separate file wouldn't be very convieniet, but I am fairly new to mel and am not sure about how I could go about saving the values into the file itself.
07-28-2005, 04:27 PM
I would say the best way would be to make your own text file and save to disk. If you don't want animators to have to load and save stuff, you could create a lib in your script which just lists all the saved poses (they don't have to know it's saved to multiple files).
If it's just a simple pose then you can simply export the object name and all it's channel box values. If you want to be able to load the same pose to a rig with different names, perhaps a referenced rig with a different prefix, then you can add support for this by either adding a search and replace string feature, or make it simple and remove the prefix at save time so you can add a new one at load.
As an example of a simple format, here is one object from a exported file I wrote a long time ago;
Of course the full file has a lot more objects, but this should give you an idea. At load I have an option to change the prefix (all the rigs are referenced) by using tokenize and looking for the ":"
You say you are new to MEL, but if you can get the above to work with prints, then you can change it to fprint and print to a text file instead of the screen. Actually thats a good way to get it working, ignore the file at first and try to get a good format printed to the script editor. The MEL help files have all you need to get files working, just look up the fprint, fopen and fclose commands.
Hope this helps,
07-28-2005, 04:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.