ScriptSpot home

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)
Marco

Yessss ...

wow ... thanks a lot Jahman !!!

Marco

Yessss ...

wow ... thanks a lot Jahman !!!

Panteleev Sergey

.

;)


case toolmode.axisConstraints of
(
	#XY : toolmode.axisConstraints = #X
	#X  : toolmode.axisConstraints = #Y
	#Y  : toolmode.axisConstraints = #Z
	#Z  : toolmode.axisConstraints = #XY
	default: toolmode.axisConstraints = #XY
)
Reply to Panteleev Sergey
igamaximus

Hey Andrey,

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!

Reply to igamaximus
Panteleev Sergey

.

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

Reply to Panteleev Sergey
igamaximus

That's it !

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

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

Reply to Panteleev Sergey
igamaximus

i will test this and let you know...

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
)
)