A plea to script writers

There are many scripts that come with values entered into spinners by default as primer. When working with the script/plugin one can get of track quickly by changing the default value. A default button "D" would be a great help for the users to get back to the start.

I respectively ask the max script writers community to embrace the following as a standard.

Please included value reset and default buttons to all spinners.

------------EXAMPLE------------

rollout myroll "default reset example"
(
      GroupBox grp1 "default reset button" width:158 height:35	pos:[3,2]
		spinner spinRS "" width:50 height:16 pos:[45,18]
		button defaultRS "D" width:15 height:14	pos:[100,19]
			on defaultRS pressed do
				(
				spinRS.value = 5.0 --whatever the default value would be.
				) 
)
createDialog myroll pos:[800,200]

------------THANKS-------------

I deleted the request of a reset to 0.0 button. I never knew that right clicking on a spinner would ZERO out the spinner.

Comments

Anubis's picture

right click to reset

Hi othoap,

you can reset any spinner in Max (not only scripted) by right click with the mouse over its arrows, and the spinner ui control in max scripting have "range" property where the coder set [min,max,def]-values, for example - spinner with range 0-360 and default value 90 w'd be:

spinner spRot "Angle:" range:[0,360,90] type:#integer

In other words, not need additional button.

[EDIT] Woops, after posting I see your underline notes that you know about :)

my recent MAXScripts RSS (archive here)