Site Navigation

BackTechnical Solutions


Advanced Search
E-mail This Page

Copying Rotation and Position Controllers Using MAXScript

Summary: This document outlines the process of copying controllers from object to object using MAXScript.
Product(s)

Release(s)

Platform(s)

3D Studio MAX (TM)

2.x

Win95, WinNT

3D Studio VIZ

2.0

Win95, WinNT

Audience:

For Public Distribution - Global

Keywords:

MAXSCRIPT ROTATION CONTROLLER 5490

Related documents:

TD805498

Document: US-XT-TD805490.DOC

Revision: A

Creation date: October 13, 1998

Last revised: December 11, 1998

Expires: January 31, 2000

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.


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.
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 script will reset your scene by default. Save any previous work before continuing.
--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) 421 (not helpful) 
Top of Page

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

Comment on Technical Assistance