Showing posts with label maya. Show all posts
Showing posts with label maya. Show all posts

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.