How to assign hotkey for these commands? (vertices properties in spline)

5vil
Advocate
Advocate

How to assign hotkey for these commands? (vertices properties in spline)

5vil
Advocate
Advocate

These command list below in this image. Spline \ corner, bezier, smooth, etc... Haven't figure out to assign hotkey to any of them. I know rightclick menu is quite fast, but for some tasks in my current work, those command need to execute a lot of time and I prefer hotkey than context menu.

 

And I know how to assign hotkey/shortcut key in 3ds max for other commands. Normal way is rightclick>customize>Keyboard tab, pick the right Category (or Group), then navigate to the wanted command, assign a letter/symbol,key to it. But these vertex command such as corner, bezier... I couldn't find out in entire list of commands in 3ds max. They must be somewhere there but I can't find. Hope you guys give me answer quickly.

 

HOTKEYVERTICECORNER.gif

 

http://i.imgur.com/otfuhmL.gif

0 Likes
Reply
Accepted solutions (1)
2,685 Views
10 Replies
Replies (10)

5vil
Advocate
Advocate

Nobody have any idea? This's not something that would got answered in minutes, is it? Basic 3ds max related question...

0 Likes

Alfred.DeFlaminis
Alumni
Alumni

Hello @5vil,

 

I don't believe this is possible.  When you switch between those modes there is no corresponding maxscript command in the listener, and as far as I can tell you cannot edit Tools 1 and Tools 2 quad menus despite me trying for quite a while.  I was thinking you could set the hotkey there but alas, no dice.  

 

Best Regards,

0 Likes

Swordslayer
Advisor
Advisor
Accepted solution

If you don't mind that there's no undo:

 

macroScript CornerKnots
    category:   "Shortcuts"
    buttonText: "Corner Knots"
    toolTip:    "Switch Knot Type to Corner"
(
	mapped fn setKnotTypes index obj spline type:#corner =
		setKnotType obj spline index type

	on execute do if Filters.Is_EditSplineSpecifyLevel #{2} do
	(
		local obj = selection[1]
		local splineCount = numSplines obj

		for spline = 1 to splineCount
			where (local selectedKnots = getKnotSelection obj spline) != #() do
				setKnotTypes selectedKnots obj spline

		updateShape obj
	)
)

After executing once (CTRL+E in maxscript editor), it will appead under Shortcuts category in the Customize UI dialog and you bind it to a shortcut. You can make different variants if you replace #corner with #smooth, #bezier or #bezierCorner.

Alfred.DeFlaminis
Alumni
Alumni
0 Likes

yCekyLL
Contributor
Contributor

Did this post survive to 2022??

Hello Swordslayer, I found your solution devastating!
- But it doesn't seem to work (at least in 3ds 2017 and 2021 versions) Can you review?

I'm working on a project to integrate shortcut keys for all applications in the world!! (can you imagine? - never having to worry about keysstrokes again and only pay attention to art? )

Finally, if you can take a look at your script I would be very grateful! I am attaching the error image:

::
error.jpg

0 Likes

yCekyLL
Contributor
Contributor

Wonderful! - Everything works perfectly!

There is also the [ Reset Tanget ] function. i tried to guess what the string would be.. i tried tangentCurve3D and #tangentBezier3D and also just #reset and none worked :'(

If it won't take up too much time, could you give me a hint on how to find out which one it would be?

Once again, thank you very much.
:::
reset tanget.jpg

0 Likes

vedzizhev
Community Visitor
Community Visitor

Thank you very much! This work in editable spline, but didn't work in edit spline, so unfortunately it is not equal to click right mouse button and choos corner, smooth etc. So please help us with this function it will be really really usefull!!!

0 Likes