PDA

View Full Version : Request for snap tool options


Jhotun
02-17-2005, 11:51 AM
Hi there

I do not know if this is easy or not, im 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!

prettyPixel
02-17-2005, 03:18 PM
Hi there

I do not know if this is easy or not, im 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...

Jhotun
02-17-2005, 04:52 PM
thanks for your answer... :) maybe i should learn some maxscript to do such kind of things...
ill keep on searching.

prettyPixel
02-17-2005, 06:06 PM
thanks for your answer... :) maybe i should learn some maxscript to do such kind of things...
ill keep on searching.

yes try it, it's easy and very powerfull :thumbsup:

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

CGTalk Moderation
02-17-2006, 07:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.