Hi,
Since I found Macro Recorder in the Scripting Listener, I would like to create scripts and assign hotkeys to them.
Is this possible? How one would go about it?
Also, Can I preview code for actions (commands) directly in the HotKey Editor?
Many thanks,
DS
Solved! Go to Solution.
Solved by darawork. Go to Solution.
Hi,
There is a video here, everything explained in the video is pretty much how it's done, except for the Hotkey editor has moved now to it's own dedicated editor window under the Customise dropdown menu. https://www.youtube.com/watch?v=_7NGvK5z6jo
As for previewing code in the Hotkey Editor itself, not exactly sure what you mean here, but there is no Maxscript Viewer built into it, if that's what you mean? Although you can quite easily view the code in the macro recorder, or Maxscript Editor under the Scripting dropdown menu.
Regards,
Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760
Thank you for the reply!
I am about to watch the tutorial.
Attached to this post you will find recorded Hotkey Editor from Maya, where i show previewing code and custom hotkeyed scripts.
Ahh,
Cool. But, Nope, unfortunately that looks like a Maya only functionality... far too nice for us lowly Max users.
Regards,
Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760
I watched the tutorial.
Thanks! Shortcuts and hotkeys can be assigned to custom scripts.
My custom script (switch to Border component mode and Cap) does work when activated from toolbar (shelf), but not from hotkey.
Do you know why that may be?
I recorded what is going on.
This is the code btw:
macroScript DSCap
category:"Custom"
internalCategory:"Custom"
tooltip:"DS Cap"
ButtonText:"DS Cap"
autoUndoEnabled:false
Icon:#("UVWUnwrapSelection",28)
(
subobjectLevel = 3
$.EditablePoly.capHoles #Edge
)
Btw, what the hell with the icons? What am I doing wrong when trying to change them?
Hi,
You might have to restart Max so as to refresh the customisation completely, as a lot of these things are loaded during the program start up.
Another thing to look out for is a possible clash of a pre-existing Hotkey definition. [O] is usually a Shortcut for Orthographic viewport projection (you can switch from Actions to Hotkeys to see any pre-existing definitions in place).
Regards,
Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760
Yeah, Icons only refresh on relaunch of Max too.
Your Maxscript looks correct to me.
Regards,
Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760
"Another thing to look out for is a possible clash of a pre-existing Hotkey definition. [O] is usually a Shortcut for Orthographic viewport projection (you can switch from Actions to Hotkeys to see any pre-existing definitions in place)."
That one thing Max has better imo.
Manually one has to remove a hotkey from already assigned action/command.
Maya is more like Photoshop. It asks if you want to change already assigned shortcut, but its already one foot in door to do it. Sometimes accidentally changing assigned shortcuts (with help of a certain bug, but nvm).
It works, thanks!
Restarting Max helped for both, changing icon and the hotkey.
Yeah, Maya got a few things better.
No need to juggling with files this much or at all. More is being done within Maya.
No need to create a new script file for each new command used in Hotkey editor.
No need to restart Maya, unless we have a code in an external file, which we want to source.
Can't find what you're looking for? Ask the community or share your knowledge.