Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / reset button problem
  RSS 2.0 ATOM  

reset button problem
Rate this thread
 
37980
 
Permlink of this thread  
avatar
  • fael
  • Posted: 20 December 2009 10:17 AM
  • Location: Sarasota, FL
  • Total Posts: 105
  • Joined: 20 July 2009 02:05 PM

hi. i have an attribute holder, with some parameters, and a reset all button
the problem is the button is not working
for example i have a paramter called canopy, and it goes frm 0 to 100, so to reset it i have this script at the bottom of the whole code:

parameters canopyP rollout:canopyR
(
canopy type:#float ui:(canopySp,canopySl)
)
rollout canopyR “Canopy”
(
local fW = 40, oS = [0,-23]
spinner canopySp “” range:[0,35,0] fieldWidth:fW
slider canopySl “Deploy:” range:canopySp.range offset:oS
)
rollout buttons “Options”
(
button resetAll “Reset”
)
on resetAll pressed do
(
canopy=0
)

evaluation gives me no errors, but when i press the button nothing happens like the names were wrong.
did this code changed or something?
thanks



Replies: 0
avatar
  • Anubis
  • Posted: 20 December 2009 11:12 AM

Your button handle is out of the rollout.

rollout buttons "Options"
(
 button resetAll 
"Reset"

 
on resetAll pressed do
 
(
 canopy
=0
 )
)


Max 9 through 2009, XP-Pro x64 SP2
ASUS EAH3450 Series (Driver 8.470).
Core 2 Duo E8400 3GHz, 4Gb Ram, DX9.0c.

Replies: 0
avatar
  • fael
  • Posted: 20 December 2009 01:07 PM

hey

thank you anubis now it works just fine

back on max 6 my code used to work, it would be good to check maxscript changelogs.



Replies: 0