Hello all,
I hope I post in the good place,
I'm a beginer in maxscript and I just can't find how to get the actual frame of the SliderTime. I mean, I can give to the SliderTime a frame, ok no problem BUT not the invers, get the frame of the SliderTime. I'm sure this is somewhere in the MAXScript reference but can't find it !
I'm not totaly new in scripting stuff since I have already do a some actionScript in flash, but this MaxScript reference give me some hard time finding what I need ! : )
Thanks !
Blob
Replies
Just remember that you can only set the sliderTime to something in the animation range, it defaults to 0-100. So if you try to set the sliderTime to 110 it will actually be 100. That's caused me some trouble recently.
The Flying Monk,this is a good thing to now about the animation range, that will be usefull for me soon. : )
Thanks for your help everyone ! : )
sliderTime.frame
Will give you the frame number without the f at the end. In case you need that.
sliderTime.normalized
Will give you the percentage of the way through the animation.
and...
(sliderTime.frame - animationRange.start.frame)/frameRate
Will give you the time in seconds through the animation.
I have another question. The title of the topic isn't appropriate anymore but since is in the same script...
I can't find how to insert a group of buttons in a UI. I mean, I create a Ui with a button, when I press this button it add several other buttons below in a group inside the same UI.
I have thinking to that, but that seems incorect :
on create pressed do
(
group "Frames"
(
button Frame1 "Frame1"
)
)
This part of my script don't work. For now, all I can do is creat this button in another UI, which is a dirty for my purpose.
Yours lights are greatly appreciate : )
Thanks
Blob
One way to to create all the UI elements you need and disable and enable them as needed. (This is the most common method)
A similar method is to use their visible property to turn them off and on.
The most complex way is to generate a maxscript on the fly and use the execute command to create the UI elements.
Here's an example of each method:
http://dl.dropbox.com/u/2904948/Tutorials/Martinez_DynamicUI.ms
"generate a maxscript on the fly and use the execute command to create the UI elements" Sorry can you tell me more about that ?
Thanks !
I'm not really sure how to explain better than that, but here's another example script that uses a spinner to generate the specified number of buttons.
http://dl.dropbox.com/u/2904948/Tutorials/DynamicUISpinner.ms
Thanks
append myDropdownlist.items test
If you are adding items in a For loop. Sometimes you need to do this after the loop to make sure it refreshes
myDropdownlist.items = myDropdownlist.items