[Closed] A small question
Hey
What is the way to change the traslation mode to rotate (“max rotate”) each time that the user selects a specific object?
Is there a way to implant such script in a scene, in a way that it’ll evaluated each time the scene is opened?
thanks.
Take a look at max commands in the reference. The rotate tool can be selected by using:
max rotate
As for the selection part, take a look at the general event callback mechanism in the maxscript reference. For example:
--Remove any existing callbacks with this ID.
callbacks.removeScripts id:#MXSHelp
--Add a new callback script
callbacks.addScript #selectionSetChanged "if $ == $Box01 then ( max rotate ) else ( max move )" id:#MXSHelp
This will call the if statement each time the selection set changed. And if Box01 is selected, the rotate tool will become active, else the move tool will be active.
Hope that helps:)
Hey Pjanssen, sorry it took me a while to answer…
Thank you for your help, it just what i tried doing for a small rig UI helper.
I was’nt familiar with the callback mechanizm, i’m just playing with maxscript here and there :shrug: