Sunday, 12 April 2015

tb tools - match tangents for looping anims

When animating for video games you end up making a lot of looping actions, idles walks etc.
One thing that is very important is keeping track of your tangents at the start and end of your loop. Miss matched tangents can break the illusion of a nicely looping animation, highlighting the start and end. But it's a total pain maintaining each end of your curves, so...

I've revised the shortcut I use to match tangents either from the start to the end, or end to the start of your loop. It leaves the outside tangents alone as you may have other animations on your timeline. It takes your current playback range as your loop range. If you have a curve selected it will work on your selection, otherwise it will work on all curves on the objects in your selection.
I usually have this set to "ctrl + [" and "ctrl+]" ;)

I'll go into more depth about how I lay out my keyboard shortcuts to work faster in some other posts.

Get the file here:

https://github.com/tb-animator/tbtools/blob/master/python/matchTangents.py

usage as so:
import matchTangents as mt  
reload (mt)  
mt.match('start')  
#or 
mt.match('end')  


This will get added to a toolkit of useful shortcuts very soon! watch this space for more tools.

Friday, 10 April 2015

swanky python editor - PyCharm

I was shown this neat editor for writing python code today, not that I really know python but whatever. Look it's grey, grey means new and modern in software land. Give it a try, it's free.

Get it here:

https://www.jetbrains.com/pycharm/

Friday, 3 April 2015

adding extra buttons in maya

Baking all your animation down all the time? I'm not, but people I know are, true story. Recently I was asked why a bakedown script wasn't quite working properly, and it turned into making a new button in the anim layer tab in maya to merged all layers :p
Here's the code to just bake down your layers;
 animLayerMerge( `ls -type animLayer` )  
But... why not just add that into the main maya ui? It's easy!
oo shiny
oo shiny



Sunday, 29 March 2015

smooth scrubbing in maya

Here's a demo of a tool to see your animation in a silky smooth way. It's an expansion of the normal time dragger tool, which scrubs your animation but snapped to frames. This one will disable the snapping when active, meaning you can see the animation in between integer frames.




The tool is in python so stick it in a maya python folder. For the maya hotkeys you will need to set 2 commands, one for when your key is pressed, and one for when you release the key. This has to be the same combination of keys for the pressed and release, just like the default maya version. If not then you wont get your previous tool set back automagically and the timeline snapping will stay off.

on press
 import timeDragger as td  
 reload(td)  
 td.drag(True)  
on release
 import timeDragger as td  
 reload(td)  
 td.drag(False)  

get the python file here;
Download timeDrag script
Script updated to be less dumb! thanks, https://github.com/Regnareb 

optionVar and global variables in mel

Option variables are a way of storing data in maya between sessions. Most of your preferences are saved in this way. Global variables are a way of making information available between scripts on a per session basis. Say you wanted to know how many times a function had run, but keep the total between sessions. You could store that number as an optionVar. That way the total would persist between maya sessions.


Sunday, 22 March 2015

First post, old showreel...

Hey hey, for lack of a better thing to put as the first post, here's my old showreel!