|
|
|||||
Copying Rotation and Position Controllers Using MAXScript
Summary: This document outlines the process of copying controllers from object to object using MAXScript.
The tips, tricks, examples and suggestions
outlined in Autodesk Product Support technical documents are suggested
for use at your own risk. Document contents are subject to change without
notice. Autodesk is not responsible or liable for any damage or events
that occur as a result of following suggestions from any Autodesk Product
Support technical document.
© 1998 Autodesk. Autodesk and
the Autodesk logo are registered trademarks of Autodesk Inc. All other
brand names, product names or trademarks belong to their respective holders.
Objects in 3D Studio MAX are translated and scaled through their controllers. The movement contained in the object controllers can be copied from object to object, independent of the geometry. This document covers how to copy the movement of one object to another using MAXScript.
Note: This document addresses copying controllers, and does not discuss MAXScript language in general. For more information on controllers, refer to the MAXScript Reference under the Help menu in 3D Studio MAX. Also, Technical Document 5498 - Copying controllers between linked hierarchies offers more detailed examples of copying controllers.
Note: This script will reset your scene by default. Save any previous work before continuing.
2. Push the New Script button from the MAXScript rollout.
3. Copy and paste the following text into the new MAXScript window:
--create objects reset MaxFile #noPrompt t = teapot handle:false position: [-100,75,0] t.rotation.controller = Euler_XYZ () b = box length:3 width:75 height:5 animate on ( at time 50 (t.pos.x = 0; rotate t 90 z_axis) at time 100 (t.pos.x = 100; rotate t 90 z_axis) )
Tip: Evaluation will run the entire script. To evaluate one line of the script at a time, place the cursor at the end of that line and hold the <Shift> key while pressing <Enter>. To evaluate multiple lines, highlight the lines and press and hold <Shift> while pressing <Enter>.
-- Copy first box b2 = copy b position: [0,0,25]
-- Copy teapot’s position controller to first box b.position.controller = copy t.position.controller
b.position.controller = a.position.controller
| Was this article helpful?
(very helpful) 5 43 21 (not helpful) |
Home | Products | Tech Assist | Autodesk | Prof Net | Search | Sitemap | Purchase
©Copyright
1998 Autodesk, Inc. All rights reserved.
Reproduction or copying
of images is prohibited.
Autodesk
Privacy Policy