poseLib (old)
Important:
Please note that poseLib is “honor-based” software; a donation system. It means that if poseLib is useful to you or your studio, you can make a donation to reflect your satisfaction. Thanks for using poseLib! 😀
(The Paypal button code now works!)
Updated: 31 October 2010
DOWNLOAD:
Compatibility: (Maya 6.0, 7.0, 8.0, 8.5, 2008, and 2009)
This version is not supported anymore. For a Maya 2011 and up version, please click here.
Updates/fixes in version: 4.4.2h:
- Fixed a bug on Maya 2008 which caused the buttons to be invisible when creating a new pose. A crash bug remains on Maya 2010 (and possibly 2009).
(See the complete history at the bottom of this article)
INFO:
You can use this script to record a pose for any object in Maya (more precisely anything that has keyable channel attributes). Whether it is the hyper complex character rig you just created or a simple nurbs sphere or lambert shader: You just have to select the object(s), hit the new pose button, and a pose file is created in the relevant directory, along with the corresponding icon (a .bmp file).
Here is a diagram of the way things are organized (you don’t have to use disk D:).
Warning: Please note that the characters and category lists reflect REAL directories on your hard drive/network. There shouldn’t be any real risk since poseLib will only add “.deleted” at the end of the directory’s (or pose’s) name if you delete them, but that could be a problem in itself.
In short, if you see a list of all your projects coming up in the characters list, it is not a good idea to “delete” them; It just means the poseLib path is not set correctly. You can do so in the options window.
Also, note that throughout this documentation I use the term “character” in the loose sense, not in the “Maya Character” specific sense.
FEATURES:
- Works on anything at anytime (no character map or specific rig layout or special naming required).
- You can blend between the current pose and the clicked one by holding down the ALT or CTRL key and clicking on a pose.
- Lets you choose the icon size you like (from 32×32 to any custom size/ratio up to 512×512).
- You can also apply only specific channels from a pose simply by selecting them in the channelBox.
- Works with referenced/unreferenced characters (you can even choose the namespace on the flight).
- Lets you organize your poses by characters (e.g.: Babar, Tintin…) and categories (e.g.: Face, Body…).
- You can rename, delete, replace or move any pose from any character or category.
- You can quickly select the objects/controls that are part of a specific pose (no need to remember what was part of the pose).
- You can also remove, add or replace specific objects/controls in a pose.
- You can rearrange the icons freely and save their position by clicking on “Save Preferences”.
SETUP:
When you launch poseLib for the first time, it looks at your current project and create a directory in here. e.g.:
yourCurrentProject/poseLib/
If you want the directory to be created somewhere else, just modify the line at the very beginning of the script that says:
$defaultPath = $currentProject + "/poseLib/";
… Or simply change it in the Options Window!
It would probably be wise to start by setting up a character name and categories related to that character (more on that later), but you can always rename or move things around later anyway… 😉
WORKFLOW:
Creating a new pose:
- Select the object(s) (it can be anything. e.g.: your character’s controls) for which you want to record a pose.
- Click on the “Create New Pose” button.
- Type in the name for the pose.
- Move the camera in the icon view and click on the “Preview Icon” button.
- If you like what you see, click the “Create Pose” button.
- If you want to change the icon, click the “Reset View” button and start again at step 4.
Once the pose is created, it will appear automatically in the list of poses you can see (they’re sorted in alphabetical order).
Applying a pose:
Just click on the pose icon. It works differently depending on what you’ve selected:
- If you don’t have anything selected, poseLib will apply the entire pose.
or
- If you’ve selected some of the controls (but not all), the pose will just be applied to those. (You’ll get a warning if nothing of what you’ve selected is part of the pose.)
If you hold down the ALT or CTRL key when you left-click on a pose, only a fraction of the pose will be applied, in effect progressively “blending” as you click between the current pose and the clicked one.
Editing a pose:
Right-click on the pose icon; A menu will appear, letting you: Rename, Move, Replace, Delete, or Edit the pose.
Replacing the pose simply means that you don’t have to go through the process of re-capturing a new icon. e.g.: You’ve barely tweaked a pose and it wouldn’t matter.
The edit sub-menu will let you: Select the pose’s controls (if you don’t remember what was part ot the pose), Add/Replace the selected controls (they’ll be added if they aren’t part of the pose, or replaced if they are), or Remove the selected controls. The “Ouput Pose Info” will list the controls part of the pose in the script editor and tell you how many they are.
REFERENCING:
When using a referenced rig (with a namespace like in “toto:myTotoCharacter“), you need to check the box “Use Namespace”. What that does is add a namespace (and a “:”) each time it applies a pose.
The namespace option plays no role when saving poses. Any existing namespace is discarded to only record a “clean” name. Again, the namespace option is only relevant when applying poses.
If you check the box “Use Current Character Name”, it means that the namespace should be the same as the character menu name. If you want the namespace to be different (like when applying a pose from a different character), then uncheck the box and specify the namespace.
OPTIONS:
Now if you want to create a new entry for a character name or a category, just click on the “Edit Options” button.
Everything should be self-explanatory in there. The only concept to remember is that categories are actually sub-directories located inside the characters directories.
Keep in mind that when you delete a pose, it does not actually get wiped-out from the directory; It is merely renamed with a “deleted” suffix. So you can always retrieve that pose or character/category you deleted by mistake… 😉
This is where you choose the icons’ size and their background color. Note that when you apply a new icon size, the icons themselves don’t get resized; It just means that from now on the icons you capture are going to be of the specified size. In other words, it doesn’t affect the existing icons’ size.
This is where you choose poseLib’s directory (where poses will be saved).
“Change Location of poseLib Directory” button: You just browse to where you want poseLib to store the poses. It has to be an already existing directory. If the check box above the button is checked, the directory “poseLib” will be automatically created inside the chosen directory.
Bookmarks: When you have to switch between different projects all the time it can be cumbersome to have to click your way through every time. So when you choose a new directory for poseLib, it’s added to the list. That way, next time you only have to double-click on the entry in the list to quickly set the directory accordingly.
TROUBLESHOOTING:
- Compatibility: poseLib is unfortunately NOT compatible with OSX yet. The poses are recorded but the icons don’t appear!
- PoseLib does not support recording a pose with multiple rigs selected at the same time if the rigs have similar control names. Also keep in mind that poseLib discards the namespace when recording a pose, only using the control name. This is the price to pay for versatility!
- If you click on a pose and the effect is not the expected “full” pose, check you don’t have any channels selected in the channel box; if you do, the pose is applied only to those channels.
- When middle-mouse moving a pose icon, if the icon is not moved to the proper position, just resize the poseLib window so that there’s no scroll bar on the side. Then you’ll be able to rearrange the icon’s position without problem. This is unfortunately an official Maya bug that I can’t fix…
Don’t hesitate to drop me a mail to tell me if there’s a problem with this script…
seith[at]seithcg[dot]com
History:
v4.5.5:
- The custom namespace bug has been fixed.
- Correct poses are now saved when selecting a blendshape node. (thanks Eric)
- Addition of “Force Exact Namespace Only” option (to be used when applying a pose containing multiple characters).
- Reordering of the icons position has been added again, but this feature remains tricky due to a new Autodesk bug with shelfLayout.
v4.5.4:
- The scroll bar for the icons is back! (Autodesk fixed at last the famous shelfLayout bug)
v4.5.3:
- Fixed a crash that happened when renaming a pose.
v4.5.2:
- Removed the need to click on “Preview Icon” before creating a pose.
- Added support for Linux.
- The “blue ball” bug that happened when capturing a pose on a fractional frame number is gone.
v4.5.1:
- Fixed a bug that caused some poses not to be visible.
- “/poseLib” is not systematically appended at the end of the current path anymore.
v4.4.2g:
- Fixed a bug on Maya 2008 which caused the buttons to be invisible when creating a new pose.
- Fixed a bug on Maya 2008 that happened with older Maya versions (6.0, 7.0, etc…) when trying to create a new pose.
v4.4.2f:
- Fixed a silly bug that prevented poseLib to launch!
- Older Maya versions (Maya 6.0, 7.0, etc…) are supported again.
v4.4.1:
- Fixed a bug that would cause the icons to render as black silhouettes (Windows).
- Added access to capture camera’s focal length, near and far clip planes in the Options window.
- Fixed a bug that would cause the icons not to show at all after capture (Windows).
- Reverted to .bmp image format on Windows and .xpm on Mac and Linux.
- Fixed a situation where the previewed icon would revert to wireframe right away.
v4.4.0:
- Mac support officially added (a big thank-you to Ludo for testing it on OSX!).
- Fixed a bug where pressing the CTRL (or ALT) key would not properly apply a fraction of the pose.
- Fixed a problem when a pose would not be applied if there were more than one control with the same name in the scene, even though one of the controls was specifically selected.
- User can now choose any color for the icons button background (Windows only), not just the black/gray/white options.
- User can now choose the color of the capture camera’s background.
- Icons are now rendered using Maya’s software renderer, so any normal map/bump map/light effects are visible on the pose icon.
- Poses can now be captured even when current time is 0 (or a negative frame number).
- Switched to .xpm format for the icons to insure better compatibility with OSX and Linux (existing .bmp icons are still supported on XP/Vista).
- Added option to manually set poseLib path in Options window.
- Removed wasted empty space around icons (tighter GUI look).
- Better icon name placement (centered under the icon picture).
v4.3.1:
- Fixed a situation where the icon preview would disappear as soon as it appeared (and revert to the wireframe view).
- Fixed a display bug on Linux where the frame for the namespace options would appear with a height of 1 pixel.
- Fixed a user name bug on Linux when creating poses.
- Fixed a silly bug when previewing icon which failed to render the icon altogether.
- User can now apply a pose simultaneously to multiple selected characters (referenced or not).
- Changed the far clip plane of the capture camera to 10000, which fixes a situation where your character would disappear when zooming way out.
v4.3.0:
- The pose icon’s proper position is now preserved when replacing a pose or adding/removing controls.
- Focal lens of capture camera changed to 200 to avoid too much perspective deformation on icons.
- PoseLib’s confirmation windows (delete/replace pose, add/remove controls, etc…) now always appear over poseLib’s window, rather than Maya’s main window.
- Existing characters and categories now get properly recognized even when launching poseLib without sourcing it first.
- Fixed Maya crash when renaming poses in certain situations (just press enter key to validate new name).
- Added support for .xpm icons.
- Added Linux compatibility.
- Added preliminary Mac OSX compatibility (still a problem with the icons showing red though ).
- Added support for Maya’s Character Sets.
- At launch time poseLib now directly displays the proper category without briefly showing the very first one.
- You can now quickly apply a pose to selected referenced controls even without setting the proper namespace; poseLib will infer the namespace from the first object selected, resulting in a much more flexible workflow.
- Added a much-requested “Isolate Selected” feature when capturing icon (right-click in the capture view).
v4.2.5:
- Added: User can now resize freely the poseLib window without having to click on “Shorter” or “Taller” buttons.
- Added: User can now rearrange freely the icons’ positions by middle-mouse dragging them around. Click on “Save Preferences” to save the icons’ new position (see the troubleshooting section for inherent limitations).
- Fixed: Pose files don’t have the null character at the end of each line anymore.
- Added: Cleaned-up the main UI of unneeded controls and added an “Online Help” button linking to the poseLib page.
v4.2.4:
– Added: User can now directly edit a pose text file through the Edit Pose sub-menu.– Added: User can choose a text editor program in the Options window (default is wordpad.exe).– Added: Textures can be enabled/disabled in the Icon Preview window, as they sometimes can get in the way of readability. v4.2.3:
– Fixed a situation when the Rename Category or Rename Character windows would stay up when poseLib was re-launched.– Fixed little UI details. The Capture Icon window should now look a bit cleaner before and after preview. Same with a bunch of other miscellaneous windows.– Updated: Spaces are now allowed in the poseLib paths. e.g.: “C:\Documents and Settings\My Name\Maya\poseLib”.v4.2.2:
– Added an incentive (or a warning, really) for the first-time user to manually set poseLib’s path. This should clear up some confusion regarding characters list clashing with project directories. My bad, my bad!
v4.2.1:
– Added (very) preliminary Linux compatibility (bad GUI and very unstable overall).
– New feature: You can now select individual channels from the channelBox, and the pose will be applied only to those.
– Fixed a bug when deleting a character from the option window that would close the option window and force the user to reopen it in order to proceed with any further changes.
– Added backward compatibility with Maya 6.0.
v 4.2:
– Added support for blendShapes; You can now select “raw” blendShapes like any other control (thanks to Oli for testing this one).
– Fixed an annoying bug with the icon capture window that wouldn’t correctly show the preview icon if the size was greater than 100 pixels, and often even hid the capture buttons themselves (!).
– Fixed a bug that would change the icon’s size back to 50×50 every time you re-launch Maya (thanks to Didier and David for bringing this one up to my attention).
– Updated the incremental behavior to be triggered either by the ALT or the CTRL keys (whatever works best for the user).
v 4.1:
– Added a “bookmark list” feature in the poseLib’s directory option window to easily switch between often-used projects without having to click you way through every time.
– Fixed a bug where the icons wouldn’t show up after capture (red squares) if the “images” directory path was set in an absolute way instead of relative.
– Fixed the window’s title bar to reflect poseLib’s current directory.
v 040e17:
– Added the feature to apply a pose by increments (by holding down the ALT key and clicking on a pose): It will progressively blend between the current pose and the clicked one. Idea and code provided by Keith Lango. Two thumbs up for the Man!!!
– Added a button in “Options” to open Windows Explorer in the current poseLib directory (to facilitate organizing files/poses).
v 040e16:
– Fixed a bug when “special attributes” on the selected controls would crash the script when saving a pose.
– Preferences are now automatically saved after choosing the path to the poseLib folder.
– The script is re-launched and the characters/categories refreshed after setting the poseLib path.
– Added a “Get namespace from Selection” button (for lazy people like me).
v 040e15:
– Changed the startup default poseLib directory to now point to the user’s default project.
– Changed the icon capture camera’s focal length to 100, to avoid weird perpective deformations on the icons.
– Changed the “Apply Pose” proc to keep any attribute requiring a “-type” flag from crashing the script.
v 040e14:
– Added a “Directory Location” choice in the options window to choose the poseLib directory.
v 040e13:
– Various minor code cleaning.
v 040e12:
– Changed the way the code was making an assumption about the referenced character’s top node. That should make the referenced behavior much more reliable.
– Fixed a really stupid bug in the referencing code when selecting the pose’s controls (thanks Chris).
– Fixed a UI display bug (where the main window’s size would get weird after changing categories).
– Fixed a bug when after creating a new category and saving the preferences the icons wouldn’t match the choosen category at startup.
– Changed the place of the “Select Pose’s Controls” menu and put it on top of the first right-click menu, because it’s pretty useful after all (and it’s got nothing to do with editing the pose anyway).
v 040e11:
– Added buttons to make the UI taller or shorter (by increments of one row).
– Fixed bug with selecting poses controls (forgot to implement new ref system!).
v 040d:
– Changed the way poseLib deals with referencing.
– User can now type-in spacename (with the advantage that now poses can be used among different characters without having to copy them)
v 040c (beta):
– Changed the pose file format to remove the path name from the controls (that way, even if the hierarchy changes, the pose will still work).
– Ref/Unref choice is now only relevant when applying a pose.
– Temporarily disabled “smart” mode.
v 040b (beta):
– Fixed a bug in the “Preview Icon” proc that would consistently jump back to the same frame in the timeline.
v 040a:
– Added “Smart Mode” to apply the pose regardless of the ref mode.
v 040:
– Changed pose file format (no backward compatibility, unfortunately).
– Added ability to save/apply poses in ref/unref mode, even with characters having same name-controls in the scene.
– Added ability to save/apply a pose to multiple characters/objects at once.
– Fixed having to apply pose twice (just remember that the ik/fk switch attribute has to come before the hip or shoulder joint).
v 030f1:
– Improved overall stability.
– Fixed “Select controls from pose”.
– Fixed “Remove controls from pose”.
– Added “Add/replace control to pose” feature.(…)
– Revamped GUI layout.
v 001:
– Basic principle working.
– Save icon for pose.