Tuesday, April 24, 2012

Change a Tick Colour on Maya Timeline - revised

Hi everyone!

Last week, I tried to find out how to change a tick colour in Maya to indicate which one is my main pose key and which one is my break down pose key. There were a couple of reasons that made me looked for a script that could change the tick colour (it's a simple MEL script.. dont worry ^^).

Firstly, i want to try something new for my workflow. I really want to learn about key frame efficiency. During the class, our mentor taught us that our animation should be defined by key pose and break down pose. I was and i actually am still very inspired by that. He also showed us that we could use tradigitools to change the tick colour to indicate which one is the Key Pose and which one is the Break Down Pose. I think that was pretty awesome. I don't have tradigitools, so i thought there should be a way to change a tick colour in Maya manually.

I bumped into couple of web pages that show me how to do it step by step. I don't have Maya with me at the moment so i'm going to refer you to this sites that i found:
- Great Tip To change Maya Key Color

I also discussed this MEL script with my classmate, Beau Pratt (please check out his and his brother awesome blog here!), about how to make this script keyable. He told me to try to add another script that he got from Kevin Freeman, to the beginning part of the script. 

At first, I created a short cut on Maya Shelf to make an easy access to this script. However, I have to credit Beau for his suggestion about setting a Way better short cut which is to set it to a Shift+S or S (or something else related with S key, anything that is available basically..) on the keyboard. This really makes life easier. So thank you Beau!

The original mel script:

keyframe -time `currentTime -q` -tds 1;

Additional script to make it keyable:

$now=`currentTime -q`;setKeyframe;keyframe -time `currentTime -q` -tds 1;


I guess that's all for now. I hope the script will work on your computer, cause so far it works just fine in my Maya. I really hope it will work just fine in your Maya too! Please let me now if it did not work, i'll give my best to help you out! :)


Thank you very much for reading this post! I  hope this will help and feel free to send me a message on AM or leave comments here if you need any help! Have a great week, Happy Animating, and Have fun everyone! :)

 ---

2 comments:

  1. woah. I read beau´s way to do that, so it´s great you both worked on that script. It will help a lot!

    once you run both the Scripts, how do you add the shortcut to maya? via connection editor?

    cheers!

    :P

    ReplyDelete
  2. Hi Daniel!
    Thanks so much for stopping by :)
    There are couple ways to add the shortcut. You can add it to your shelf or make a Hot Key.
    I made a Hot Key for this script.
    Here is how to create a hot key for this script:
    - In Maya, Go to Window> Settings/Preferences > Hot Key Editor
    - Once the Hot Key Editor window opened, on Categories, scroll down to User, this is a space where you can put your custom Hot Keys.
    - On the mid, right hand side, click New.
    - Here you can fill the name of the Hot Key command.
    eg: Name: Ticker Colour
    Description: change ticker colour
    on Command line: fill it in with:

    $now=`currentTime -q`;setKeyframe;keyframe -time `currentTime -q` -tds 1;

    - Now go to the right hand side of the window, find Assign New Hotkey.
    - you can set it to any hot keys you want. You can also click Query to check if the hot key that you assign is available or not. I set it to control+Shift+s on my mac.
    - Once you feel comfortable with all the settings, click Save.
    - The hot key should work now.

    Another way to do it is to put the shortcut on your shelf. I got this method from one of the mentors during make up q&a. This is how to do it:
    - First, open the shelf tab that you want this script to be put on.
    - Open Script editor.
    - Go to Edit > Clear History. I would recommend you to clear the history first to avoid confusion.
    - On the script editor, make sure that you are on MEL script tab and then copy-paste the script there:
    $now=`currentTime -q`;setKeyframe;keyframe -time `currentTime -q` -tds 1;
    - highlight the script
    - Go to File > Save Script to Shelf. There is a short cut button for this, it is under the script editor menu bar, the 4th icon from the left.
    - Wait for few seconds..The script should be on the shelf now.

    There is probably a better way to do it, these are the 2 methods that i know :)
    If you know a simpler way to do it, i'd be more than happy to hear the new tips! I hope this answer your question and hope it helps. Please kindly inform me if the method did not work D:

    Cheers,
    Carlina

    ReplyDelete