Reply
Reply
 
Thread Tools Display Modes
Rick Stirling's Avatar
Old (#1)
Anyone know if its possible to assign a keyboards shortcut to a button in a maxscript?

I've got one that copies a vert weight, and then pastes it to another vert. Adding a shortcut for copy and one for paste would save me ages.
Offline , veteran polycounter, 4,217 Posts, Join Date Oct 2004, Location Edinburgh, Scotland Send a message via MSN to Rick Stirling  
   Reply With Quote

FatAssasin's Avatar
Old (#2)
You can do something following:

Let's say this is the script with the rollout and the button that you want to press:

<font class="small">Code:</font><hr /><pre>rollout testRlt "Test Rollout"
(
button testBtn "Press Me"
on testBtn pressed do (print "Button pressed")
)
testFltr = newRolloutFloater "Test Floater" 150 60
addRollout testRlt testFltr</pre><hr />

You would make a new macroscript that basically just says something like this:

<font class="small">Code:</font><hr /><pre>testRlt.testBtn.pressed()</pre><hr />

Then assign that one to a hot key. You'd have to make a seperate macroscript for each button. And you might have to declare the main rollout as global in the original script. Also, the rollout would have to be open for the other button pressing scripts to work.

Hope that helps.
Offline , polycounter, 813 Posts, Join Date Oct 2004, Location Kirkland, WA  
   Reply With Quote

monster's Avatar
Old (#3)
When I need to make a keyboard shortcut quickly I just select the text from the listener or script window and drag and drop it onto a tool bar.

Then if you go to Customize User Interface/Keyboard and look in the "Drag and Drop" Category you'll find the script you just dropped.

It's pretty handy.

Lately I just have a toolbar called "Temp" and I just drag and drop scripts to it all the time. I don't even bother with the hotkeys anymore.
Juan Martinez | Blog | Animator at Verse, Inc
Offline , polycounter, 950 Posts, Join Date Oct 2004, Location Dallas, TX USA Send a message via ICQ to monster Send a message via AIM to monster  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch