PDA

View Full Version : doing commandin continious while pressing a key


thematt
11-13-2003, 02:55 PM
Humm not sure if it's clear in the title, don't really know how to explain that..but what I'm trying to do is have a action being done when you let the hotkey press..and then stop when you realease.

i can't find a command for that, on realese or on press...

What i'd like to do is mimic the behavior of max that let you scroll the animation through the key while mainteneing your hotkey press, then ofcourse stop when you release.

Right now in maya you have to press as many time as you have keys so it's kind of bugging me sometime.


humm while I'm there is it possible to query the mode you're inside, modeling, animation, rendering etc...can't find that neither.

Anyway thanks in advance for anyhelp.

mhovland
11-13-2003, 04:03 PM
To find out what mode you are in see the "setMenuMode" command in the mel docs.

brubin
11-13-2003, 06:09 PM
hmmm, i don't know max, but you could try this:

(1)
in the hotkey editor find the "category" "playbackcontrols".
from the list find "playbackForward" and assign "press+ctrl+space" to it (as one example, - as a matter of fact- take any key you like!), and assign "playbackStop" to "release+ctrl+space"

this plays the animation as long as you press ctrl+spacebar, and stops when you let go.

(2) leftALT+"." is assigned to "oneframeForward" already, as well as leftALT+"," for one frame backwards.

i like that option for scrolling thru animated sequence SLOW when i need to identify a flipping key or any other bullsh*t in an animation.

HIH
s.

thematt
11-13-2003, 06:59 PM
mhovland, thanks for the command, couln't find it..and I looked a bunch for it.

Burbin, thanks a lot for your answer i'll try that as soon as I'm back to the office..but I was actually trying to go from Key to Key so it might be a bit different..never realised that you had a press and release toggle in the Hotkey editor...pfff...must be blind

cheers

mhovland
11-13-2003, 09:58 PM
Here is the info, straight from the MEL command reference

MEL Commands
setMenuMode
Synopsis
setMenuMode STRING

Command is Undoable, NOT Queryable, and NOT Editable
ReturnValue
[string] : The current Menu Mode for the menu bar in the main Maya window.
Description
Optionally sets a new Menu Mode for the menu bar in the main Maya window. Returns the current Menu Mode, and if a new one is specified, then the previous Menu Mode is returned.
Keywords
menu, menus, menubar
Flags

Examples
// Use the "Rendering" Menu Set, and at the same time get the one currently used.
string $prevMenuMode = `setMenuMode Rendering`;
// Get the current Menu Set: "Rendering".
print `setMenuMode`;

thematt
11-14-2003, 07:25 AM
mhovland,

sorry you thought I couldn't find it after you post the command name..I wasn't clear..actually I couldn't find it before you post, but of course with the command name found it just fine..

thanks a lot for your concern.:p


cheers

CGTalk Moderation
01-15-2006, 01:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.