Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MAYA Hotkeys issues

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
jack2k211
516 Views, 8 Replies

MAYA Hotkeys issues

002.jpgzzzzzzz.JPG

Labels (1)
8 REPLIES 8
Message 2 of 9
jack2k211
in reply to: jack2k211

Is there a way to store my hotkey without changing anything?
For example, I have two characters, a boy and a girl.I use some of the controllers with my favorite hotkeys.So my plan is to create hotkeys for both the boy and girl characters.


I tried to create a new hotkey set but it doesn't work. I also tried exporting or importing hotkey set files, but it still doesn't work.
finally i changed MEL script language to Python.I thought this method would fix my problem.But when I changed Python, it also changed MEL.
Shown in the photo.
Message 3 of 9
Kahylan
in reply to: jack2k211

Hi!

 

Hotkey sets are meant to give you the possibility to access different commands with a different key per set, but the commands still need to be unique.

Maya stores them by name so you could easy assign the script to another button in a new hotkey set.

So if you want a hotkey set for the boy and one for the girl, you would have to write selection scripts "Ass_Bone_Boy" which specifically selects the boys control and "Ass_Bone_Girl" which selects the ctrl of the girl, in order to not change the existing script from the other Hotkey set, but you then can assign both scripts to "F3" within their own hotkey sets. So you can press the same hotkey for the same selection in a different rig.

 

I hope this helps!

Message 4 of 9
jack2k211
in reply to: jack2k211

I have two hotkeys set for girl and boy characters.For each hotkey set, I wrote their selection scripts.(Ass_Bone_Boy) (Ass_Bone_Girl)

(For example)

select -r Russell_Rig:MD_Torso_01_Hip_Ctrl ; (( Boy character ))

select -r Neka_Rig:MD_Torso_01_Hip_Ctrl ; (( Girl Character ))

The problem is that the boy and girl characters have the same script.I don't know why this automatic change happened.
When I animate a boy character with (boy character hotkeys set) and switch to a girl character and changed (girl character hotkeys set)but the girl character scripts are automatically changed into a boy character script,
I assigned Girl character again and switched back to a boy character,the boy character hotkeys in the script were changed to girl character hotkeys again.


Sorry if I disturbed you. I explained as much as I could.Thanks anyway.
Message 5 of 9
jack2k211
in reply to: Kahylan

I have two hotkeys set for girl and boy characters.For each hotkey set, I wrote their selection scripts.(Ass_Bone_Boy) (Ass_Bone_Girl)

(For example)

select -r Russell_Rig:MD_Torso_01_Hip_Ctrl ; (( Boy character ))

select -r Neka_Rig:MD_Torso_01_Hip_Ctrl ; (( Girl Character ))

The problem is that the boy and girl characters have the same script.I don't know why this automatic change happened.
When I animate a boy character with (boy character hotkeys set) and switch to a girl character and changed (girl character hotkeys set)but the girl character scripts are automatically changed into a boy character script,
I assigned Girl character again and switched back to a boy character,the boy character hotkeys in the script were changed to girl character hotkeys again.


Sorry if I disturbed you. I explained as much as I could.Thanks anyway.
Message 6 of 9
Kahylan
in reply to: jack2k211

You didn't disturb me, no worries. But if you create two different scripts with different names, this shouldn't happen...

 

Could it be that you hit "Edit", instead of "New" when you created the second script?

 

I attatched a Video where I'm doing what you want to do here. Well, I used print statements instead of select because I didn't have any rigs loaded, but the process is exactly the same. Maybe you can find out what you are doing different?

 

I hope this helps!

Message 7 of 9
jack2k211
in reply to: Kahylan

It worked correctly. Thank you so much for your time.So I have 2 scripts on my hotkeys set.(boy and Girl)This could be a bad effort at my work. I mean, this could be a crash or delay?
Message 8 of 9
Kahylan
in reply to: jack2k211

Having both scripts in both sets is perfectly normal, it won't cause any problems with Maya, the only thing it makes slower is the start up of Maya because that's when all your custom scripts get loaded together with the preferences, but a short script like this only takes about 0.00001sec to load (probably even less) so you would have to have 10'000 scripts like this to even notice a second of delay when starting the program and it still wouldn't slow you down during work.

Message 9 of 9
jack2k211
in reply to: Kahylan

great explanation. I should create Autodesk account early.instead of wasting time on other websites.Thanks again bro.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report