Wednesday, 18 January 2012

ld_animateMe v1.0.0

ld_animateMe now available! - Download
current version 1.2.1


Re-arrange, offset and reverse keyframes, plus other useful tools.

To Install:
Place the downloaded "ld_animateMe.mel" file into one of your Maya scripts directories, restart Maya and use the following code to load the UI.

ld_animateMe;

To Use:
animateMe is designed to be compact and clutter free, giving you the valuable screen space you need.
Besides minimizing the frames for each section, you can remove it from the tool under the "Display" menu by unchecking the related box. If you cant it back, simply re-check the box.
As well as clicking the relevant buttons, you can use the sliders to adjust the value you want and once released, it will run that tool, making it as quick as possible to use.

 - User Info:
The user info is designed to quickly let you know some useful information regarding your scene that could potentially save hassle later, such as; Forgetting to turn auto-save on, or whether your animating to 24fps or 25. The information is  reloaded on creation of the UI, or by clicking the refresh icon to the right.

 - Adjust Animation - Shift mode:
To adjust animation, you must select keyframes from either the timeline, or the curve editor.
Entering a number will shift the selected keys by that value, whether positive (ie "2" = shift selected keys 2 frames later, or "-2" = shift selected keys 2 frames earlier.)
EDIT: 19/01/2012 - v 1.2.0
- If no range in timeline or keys selected in curve editor, animtaion will be adjusted from current point onwards.

 - Adjust Animation - Offset mode:
To adjust animation, you must select keyframes from either the timeline, or the curve editor.
Offset animation works with your selection order. It will offset every selected object's selected keyframes by X amount of frames relative to the object selected before it.

1. object1, 2 and 3 each has a key on frame 1.
2. You select them in numerical order (object1 first and object3 last).
3. You use Offset mode with value of 2.
4. object2's key will now be at frame 3 and object3's key will now be at frame 5.


 - Adjust Animation - Reverse mode:
You can reverse your animation by selecting the keys from either the timeline, or the curve editor.

 - Scale Keys - Individual Pivots:
To use scale keys, you must have keys or curves selected in the curve editor.
For every key selected, it will  scale it at the point between its previous and next value, as if it was blending the key between the keys either side. It works great for toning up or down, facial expressions, poses etc or even adding overshoot.

 - Scale Keys - Pivot on 0:
To use scale keys, you must have keys or curves selected in the curve editor.
This mode will scale all the selected keys the same pivot of 0.

 - Selection Sets:
Compact version of ld_selectMe (Link).
Maya's own selection sets are node based, meaning that creating a selection set for a character will only work in that file, which is and very limiting. This tool, instead, compiles a selection script and saves it to shelf to be used in any file, along with a toggle selection function by ctrl+clicking the shelf button.
"Name" is to enter the name of the button as it will appear on the shelf.
"clear" clears the list and name field.
"+" adds selected objects to list.
"-" removes selected list items from list (can also press "delete" key).
EDIT: 19/01/2012 - v 1.2.0
- Now creates selection shelf button that will attempt to use namespace of the FIRST currently selected object, if no objects currently select, default one is used.


News/Updates:
Version 1.5.0 is underway, automating the user info with extra information displayed, such as the last saved time for the current file, snapping tools (including component snapping), and a new Scale Keys mode, called "Falloff".
Thanks to quick feedback, I've been able to make some adjustments to the functionality of the tool.

Version 1.2.0:
19/01/2012 -
Edited functionality of Adjust Animation.
   - If no range in timeline or keys selected in curve editor, animtaion will be adjusted from current point onwards.
Edited functionality of Selection Sets.
   - Now creates selection shelf button that will attempt to use namespace of the FIRST currently selected object, if no objects currently select, default one is used.

Version 1.2.1:
19/01/2012 -
Fixed issue with Selection Sets update.
  - If current selection's namespace didnt't contain an item in selection list, it would error, it will now instead just use default namespace.

Any suggestions, please let me know.


Sunday, 15 January 2012

RigReel 2010-11

Finally got round to uploading last years rig reel, still finishing off current one, will upload as soon as its done.


Reel Breakdown:

Sequence 1 (0026):
Rigged character ('Skitter') in Maya.
Setup nCloth dynamics for screen and node-based rig for timewarp in Maya.

Sequence 2 (0201):
Rigged character, 'Skitter', in Maya;
 - Modular built, stretchable and dynamic tail rig based on hair dynamics with full Fk control system and blending, and control over main dynamic attributes to tweak shot specific and avoid intersection with props.

Sequence 3 (0937):
Rigged prop (table) in Maya;
 - Fully driven by expressions to assist animators and provide continuity throughout show.

Sequence 4 (1034):
Rigged all characters and props in Maya;
 - Including all facial rigs.
 - All characters include controllable dynamic tails and ears, to assist animators and to assist retaining animation continuity.

Sequence 5 (1225):
Rigged  character (Splish) in Maya;
 - All rigs scaleable to assist animation.
 - Stretchable Ik/Fk style spine rigs, identical setup and control for all characters to retain familiarity and allow interchangeable animation.

Sequence 6 (1655):
Rigged  characters (Splish and Splash) and prop (controller), in Maya.

Sequence 7 (1855):
Rigged  character (Splish) in Maya;
 - All rigs with squash/stretch limbs, Ik/Fk blending, auto-flatten and foot-roll.

Sequence 8 (2173):
Assisted in animation in Maya, once rigging was complete.
Co-created Studio specific Animation and Pipeline Toolsets, including;
 - Ik/Fk snapping,
 - shared user creatable and customizable selection sets,
 - animation key/curve cleaning, blending and re-timing,
 - customizable animation trails,
 - animation HUDs and automatic notification of shot completion and versioning.

Friday, 13 January 2012

Maya: Starting scripts on load - userSetup.mel

To execute scripts, whether custom or local, each time you startup maya (in the studio ours check important prefs, timeUnits etc) is very simple.

All you need to do is create a mel script called "userSetup.mel" and place it into you maya/scripts folder in your documents (of course there are instances, depending on what the script is doing, if its messing with mainWindow states etc, you need to make sure they load first by using the "evalDeferred" command - at least that's what I've come to believe.

For example if you created a mel script like this;
string $win=`window` ; columnLayout -adj true ; text -label "Hello World" -align "center" ; setParent.. ; showWindow $win ;
called it "userSetup.mel" and placed it into maya/scripts/  folder, on starting maya, you can expect to see a window with the text "Hello World" pop up when maya starts.
Generally this idea is taken further (if in a studio) and either each user's environment vars point to a userSetup.mel on the network, or each have their own userSetup.mel on their local machine that points to a separate startup script on the network, which then its fairly simple for the user to modify their own startup, based on their preferences.

At some point, once I get some time, I do intend on revisiting and furthering most of my posts, taking the time to actually explain what's going on and why, and giving links the right documentation.

Comments welcome.

Maya: IK Handles not updating on undo

I had this problem a few times (even back on maya 5), where you set up a rig, and you point constrain the ikHandle to a control object. It moves around fine, up until you undo. The handle just doesn't seem to behave properly, and scrubbing or moving it again will snap the ikHandle to where it should be.
So I thought I might give a workaround.
Directly constraining an IkHandle seems to have the issue of not updating when undoing.
It seems to be a clash with the way the ik handles and constraints evaluate, and something seems to get missed.
You can avoid this by parenting the ikHandle under the controller, or (if you want the outliner to be tidy) you can parent the ikHandle under a null or locator and constraint that instead.

EDIT:
Brad Clark (Co-founder - riggingdojo.com) provided more info and suggested a better solution.
You shouldn't have this problem if you turn off the snap setting on the ik handle. Then it won't be trying to get back to the end of the chain and should stick with the constraint target. There is a bug with Maya Undo though that if you are moving a node and hit the undo hot key before releasing the mouse button for the current transform, it will undo the previous transform, leaving the move you just did outside of the que, causing an offset that has to be fixed by hand.

Comments welcome.

Maya: Typical Sound/Audio issues during playback.

Another frequent problem is not being able to hear audio during playback, but working fine whilst scrubbing.

Typically, the issue could be down to your playback settings.
Just open your maya preferences, and under "Time Slider", check your "Playback Speed" is at Real-time. If its at anything else you wont hear the audio during playback.

Maya: Window display issues - "...Panel is torn off."

This seems to be a frequent problem, in which some people result in doing a complete reinstall!.

Problem:
Cant show my graph editor/outliner/etc window, keeps telling me "... Panel is torn off."

What this typically means is that somewhere along the line the window has been placed off-screen, usually happens when users either switch monitors around or remove a monitor.
A few very simple fixes, and any one of them should solve your problem.

1.  You can reset your maya's window preferences simply by deleting the "windowPrefs.mel" located in your maya prefs folder ("USER\My Documents\maya\2011-x64\prefs\") whilst maya is CLOSED. Dont worry, once opening maya again, it will automatically create the "windowPrefs.mel" file again, all windows should now load at their default position.
2. You can edit the "windowPrefs.mel" file, to tell maya where to place the windows, just open it in a text editor (notepad usually does the trick, and again whilst maya is closed), and for each window you'll see a "-topLeftCorner" flag with 2 numbers after it. Change them to something like 10 10, save the mel file and load maya.
3. If you only have 1 rogue window you can use mel to reposition the window (you will of course need to know the name of the window, found when trying to load the window - as long as you have "Echo all commands" ticked on in the script editor)
window -e -tlc 10 10 "graphEditor1Window" ;
Now depending on the window your trying to reposition, the naming convention might differ from ending in "Window" or "Panel#Window" ("#" is the number id of the window, typically its 1).
Again, any questions etc, please feel free to comment.

Thursday, 12 January 2012

Python: Create a file listing a folders contents

Our co-ord was just trying to get some info together so I come up with this simple little script to print the contents of a specified folder into a dated file.
I'm aware there are better methods of writing the file (using the list and write each item individually in loop etc), but it was short and does the job.

To get the date, I simply used the datetime module and retrieved today's date (as stipulated on local machine), then converted it to a familiar format.
For writing the file, I simply joined a sorted list of files found into a string separated by a newline, opened a writeable doc, deposited the data and closed it to allow access. import os import datetime def ld_listFiles(path,resultPath): fileString='\n'.join(sorted(os.listdir(path))) d=datetime.date.today() date=d.isoformat() filePath=resultPath+'filesListResults_'+date+'.txt' thefile=open(filePath,'w') thefile.write(fileString) thefile.close() return fileString # ld_listFiles('C:/Users/Lee/Desktop/Documents/','C:/Users/Lee/Desktop/')
...and of course this can then be furthered for error checking (making sure paths exist, folders contain files etc), nativePath conversion (not sure of correct terminology), specify file extensions/types, folder contents, file sizes, modification date etc. This is just a very simple example (and perhaps not a great one, but it works).
In fact I think I might spend some time in creating a decent version.
Any tips, suggestions etc, are more than welcome!