[Closed] Request for snap tool options
Hi there
I do not know if this is easy or not, i´m not a maxscripter, so sorry if this is a dumb question.
I use a lot snaps to edges which hotkey is shift+x (under vertex editing mode or edges editing mode). I find myself swapping between snap on and off tons of times, and for me it would be useful something that visually tell me if it is on or off, just that. Maybe something like when you hit autokey or an orange big dot on the corner of the screen… i mean, something i do not have to look to know it is on or off
Maybe this one already exists?
Thanks!
Hi Jhotun
Here is a small script wich is a part of what you wish.
rollout snapStateRoll "Snap State"
(
label lab1_osd "Vert" align:#left offset:[14,0]
label lab2_osd "Edge" align:#right offset:[-8,-18]
colorpicker snapVertState_osd "" color:[0,0,0] fieldWidth:40 height:48 modal:false align:#left
colorpicker snapEdgeState_osd "" color:[0,0,0] fieldWidth:40 height:48 modal:false align:#right offset:[0,-53]
button check_osd "check"
on check_osd pressed do
(
if snapMode.active and snapmode.getOSnapItemActive 5 1==true then snapVertState_osd.color=[255,128,0] else snapVertState_osd.color=[0,0,0]
if snapMode.active and snapmode.getOSnapItemActive 5 3==true then snapEdgeState_osd.color=[255,128,0] else snapEdgeState_osd.color=[0,0,0]
)
)
if snapStateFloater != undefined do ( closerolloutfloater snapStateFloater )
snapStateFloater = newRolloutFloater "snap" 128 136
addRollout snapStateRoll snapStateFloater rolledUp:false
I’m interrested to know the way for a constant update in maxscript (in my example it’s work only when you press “check”)
I often ask this question…
thanks for your answer… maybe i should learn some maxscript to do such kind of things…
i´ll keep on searching.
yes try it, it’s easy and very powerfull
Here is an update of my code (max7 only)
:lightbulb I use the timer to update automatically the interface. :lightbulb
Change the interval if you will : 1000 = 1 s
rollout snapStateRoll "Snap State"
(
label lab1_osd "Vert" align:#left offset:[14,0]
label lab2_osd "Edge" align:#right offset:[-8,-18]
colorpicker snapVertState_osd "" color:[0,0,0] fieldWidth:40 height:48 modal:false align:#left
colorpicker snapEdgeState_osd "" color:[0,0,0] fieldWidth:40 height:48 modal:false align:#right offset:[0,-53]
timer clock_osd "timer" interval:1000
on clock_osd tick do
(
if snapMode.active and snapmode.getOSnapItemActive 5 1==true then snapVertState_osd.color=[255,128,0] else snapVertState_osd.color=[0,0,0]
if snapMode.active and snapmode.getOSnapItemActive 5 3==true then snapEdgeState_osd.color=[255,128,0] else snapEdgeState_osd.color=[0,0,0]
)
)
if snapStateFloater != undefined do ( closerolloutfloater snapStateFloater )
snapStateFloater = newRolloutFloater "snap" 128 136
addRollout snapStateRoll snapStateFloater rolledUp:false
Have a nice day