Wednesday, July 10, 2013

Tip Using bash profile shortcuts to aid in Maya scripting

Hi there,

I've started using bash profile function and alias shortcuts to aid in Maya tool Development they have helped me greatly in script writing. Hope this is helpful.

1. functions
example: copy script files to plugin directory, or to Maya scripts directory

cpbundle () { cp "$@" /Users/noa/Documents/MAYA_API/maya-plugins/; }
cpmel () { cp "$@" /Users/noa/Library/Preferences/Autodesk/maya/2008/prefs/scripts/na_mel; }
cpcode () { cp "$@" /Users/noa/Documents/MAYA_API/compile/; }
//cpcode greatDay.cpp

2. alias
using alias in bash_profile
shortcut to open a file with an application or to navigate to certain directories
alias jedit='open -a /Applications/'
//jedit greatDay.mel

alias cbuild='cd /Users/noa/Documents/MAYA_API/compile'


Inspired by:
Karyn Monschein (i first learned about using alias from her brilliant teaching)
Dennis Williamson online scripting tips learning about bash profile function using argument. (blog dot denniswilliamson dot us)