|
|
Creating a simple previewer with MXS Added on: Sun Jul 23 2000 |
Page: 1 2 3 |
Step 3 - Making Buttons and Spinners
The next thing we are going to do is create some interface buttons, spinners,
and checkboxes that will give us some cool options to the Previewer. Here is the code we are going to type in to use for reference, I will be explaining it so do not you worry.
(
Group "Frame Check"
(
Bitmap WPreview Width:180 Height:120 pos:[10, 25]
checkbox atmos "Atmos" pos:[10, 150] checked:false
checkbox shad "Shadows" pos:[65, 150] checked:false
checkbox Blur "MBlur" pos:[135, 150] checked:false
Spinner StillF "Frame" type:#integer range:[animationRange.start, animationRange.end, 0]pos:[105, 174] fieldwidth:30
Button SFrame "Render Frame" pos:[10, 171]
)
Groups - All right, the first thing to look out for is the syntaxing using all the brackets. You can see that we used an open bracket to open up the group.
The group is where we include options for control of the script including the render window, spinners, and checkboxes. Inside the group is also where we put the controls for the interface items.
Bitmap - The first thing I will explain is the Bitmap call. The Bitmap is actually the render window. I am just giving it a name of "Wpreview" so I can reference it later.
I then give it a size for both the width and height, and lastly I am just giving it a position on the floater.
Checkbox - For all the checkbox calls they are all the same syntaxing. They are basically the same as the Bitmap call. If there are any questions just see the MaxScript Online help or just throw me an e-mail.
Spinner - Now for the spinner controls. Some of the things called out are just like the rest. A couple of things that are different are the callout for a range, this is what you want to be the minimum, maximum, and start value of the spinner. In this case we said, "animationRange.start, animationRange.end, 0."
By saying this, the script will automatically know how many frames you are using in your scene and compensate for it.
The last thing for the spinner callout is the fieldwidth. This is just the size of the box where the frame number is.
|
|
|
|