ScriptSpot

Forum topic · Scripts Wanted

Cycle through X/Y/Z/XY Axis Constraint with single hotkey

By igamaximus · 2019-02-23

Description

Good evening guys and girls,

Could you please help me with the tool that would be single hotkey solution to cycle between active X, Y, Z axis and XY plane inside of Axis Constraint?
So for example if i am already in XY plane mode, single hotkey tap would turn X axis on. Next tap from there would activate Y axis, 2 next taps from there would acitvate XY plane again. So on each hotkey button (in Max 2012), it would switch to next state of these 4 states.

Thank you very much for your help, i really appreciate it,
Igor

Comments (8)

Yessss ...

Marco999 · 2022-04-05

wow ... thanks a lot Jahman !!!

Yessss ...

Marco999 · 2022-04-05

wow ... thanks a lot Jahman !!!

.

jahman · 2019-02-23

;)


case toolmode.axisConstraints of
(
	#XY : toolmode.axisConstraints = #X
	#X  : toolmode.axisConstraints = #Y
	#Y  : toolmode.axisConstraints = #Z
	#Z  : toolmode.axisConstraints = #XY
	default: toolmode.axisConstraints = #XY
)

Hey Andrey,

igamaximus · 2019-02-23

that was quicker than ever before! :)
And another giant Thank You for all of your help! Can you please tell me where should i place the file to get it visible in CUI, keyboard tab?

Thank you so much!

.

jahman · 2019-02-23

Just run it once and it will save itself in userscripts. Then you'll be able to bind it to shortcut

That's it !

igamaximus · 2019-02-24

Yes, that's it! Works perfectly with this beautiful seamless cycling! :)

Thanks a lot for your great help Andrey, AGAIN!
Best regards,
Igor

i will test this and let you know...

igamaximus · 2019-02-23

macroscript cycleaxisconstraint
category:"JahmanTools"
tooltip:"Cycle Axis Constraint"
buttonText:"CycleAxisConstraint"
(
case toolmode.axisConstraints of
(
#XY : toolmode.axisConstraints = #X
#X : toolmode.axisConstraints = #Y
#Y : toolmode.axisConstraints = #Z
#Z : toolmode.axisConstraints = #XY
default: toolmode.axisConstraints = #XY
)
)

StormBrig · 2019-03-13

Works like a charm. Thank you.