|
|
Link Object to a Vertex Added on: Mon Aug 14 2000 |
Page: 1 2 3 4 5 6 7 8 9 10 |
This tutorial goes through the process of creating a simple script that does two things.
First it teaches you how to use MAXScript and do some basic stuff. It also allows you to create a useful script than can be used to link objects to a vertex.
Basically it is like the Linked XForm modifier, instead of linking a vertex to and object, you can link an object to a vertex. The object will move (based on its pivot point) to where ever that vertex is currently at.
This tutorial covers the following topics in MAXScript:
- Controller Access and Assignment
- Scriptable Controllers
- Conditional Statements
- Floaters
- Rollouts
- Groups
- Different Types of Buttons
- Labels
This tutorial uses the following files:
PreScript.max - This is a simple scene with some animation. You don't need to use this...it is just so you can follow along exactly with my tutorial and compare your results
LinktoVert.ms - This is the completed version of the script you are going to write.
LinktoVert-Helper.ms - This is the same script but with some modifications so you can understand the different parts of the script. You aren't writing this one but if you run into problems you should run it. Hit the define buttons to see what the different parts of the script does what.
Download all three files here: linko2v.zip
The very first thing you need to know about scripts is they are NOT hard to write.
Scripting is very useful and can greatly reduce the amount of time needed to create a complex scene.
You don't have to be a programmer. You don't have to be a math wizard. All you need to do is spend a little time looking through the on-line help and at examples.
Now, open up the PreScript.max file and hit play. It shows a simple box moving around and a teapot that is just sitting there.
When we are finished with the script you will be able to pick a vertex on the box for the teapot to be linked to. Now to access MAXScript open up the utility panel and click MAXScript. If you don't see it, hit More.
|
|
|
|