|
|
Link Object to a Vertex Added on: Mon Aug 14 2000 |
Page: 1 2 3 4 5 6 7 8 9 10 |
Now that we created the Floater we need to add a rollout to it.
Rollout Vert_Linker "Vertex Linker" (
) -- Close Rollout Rollout is a constructor that creates a panel where you will put all the buttons, labels, and other stuff.
It takes 2 parameters, the first is the name of it, which will be Vert_Linker.
The other "Vertex Linker" is the title or string that will show up on the Rollout when you run the script.
Now everything inside the "( )" will be stuff that is in the rollout, like buttons and what happens when you push those buttons.
Since we are doing this whole script on one rollout the " ) --Close Rollout " will be one of the last things in the script. The " -- Close Rollout " is a comment.
If you put "--" MAXScript sees that this is a comment and skips over anything left on that line. You use them to put info into your script which won't be executed when the script is run.
I always put a comment after a " ) " that way I can keep track of what I was suppose to be in the "( )".
Now is a good time to see your progress. Hit Ctrl + E. This evaluates your script so far. You should see this pop up.
All you see is your floater. But you defined a rollout too, but it isn't there.
That is because one useful feature of the floater is you can add new rollouts to it when needed. Add the following line to the VERY END of your script. It should even be past ") -- Close Rollout":
addRollout Vert_Linker MainFloater addRollout takes two parameters. The first is the name of the Rollout you have already defined and the second is the Floater you want the rollout to appear on. Now hit Ctrl + E again and see the change.
|
|
|
|