Você está na página 1de 1934
VERSION FOUR www.discreet.com MAXSCRIPT REFERENCE 4 4 4 January 2001

VERSION FOUR

www.discreet.com

MAXSCRIPT REFERENCE

444

January 2001

VERSION FOUR www.discreet.com MAXSCRIPT REFERENCE 4 4 4 January 2001

Copyright © 2001 Autodesk, Inc.

All Rights Reserved

This publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose.

AUTODESK, INC. MAKES NO WARRANTY, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, REGARDING THESE MATERIALS AND MAKES SUCH MATERIALS AVAILABLE SOLELY ON AN "AS-IS" BASIS.

IN NO EVENT SHALL AUTODESK, INC. BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING OUT OF PURCHASE OR USE OF THESE MATERIALS. THE SOLE AND EXCLUSIVE LIABILITY TO AUTODESK, INC., REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THE MATERIALS DESCRIBED HEREIN.

Autodesk, Inc. reserves the right to revise and improve its products as it sees fit. This publication describes the state of this product at the time of its publication, and may not reflect the product at all times in the future.

Autodesk Trademarks

The following are registered trademarks of Autodesk, Inc., in the USA and/or other countries: 3D Plan, 3D Props, 3D Studio, 3D Studio MAX, 3D Studio VIZ, 3DSurfer, ActiveShapes, ActiveShapes (logo), Actrix, ADE, ADI, Advanced Modeling Extension, AEC Authority (logo), AEC-X, AME, Animator Pro, Animator Studio, ATC, AUGI, AutoCAD, AutoCAD Data Extension, AutoCAD Development System, AutoCAD LT, AutoCAD Map, Autodesk, Autodesk Animator, Autodesk (logo), Autodesk MapGuide, Autodesk University, Autodesk View, Autodesk WalkThrough, Autodesk World, AutoLISP, AutoShade, AutoSketch, AutoSurf, AutoVision, Biped, bringing information down to earth, CAD Overlay, Character Studio, Design Companion, Drafix, Education by Design, Generic, Generic 3D Drafting, Generic CADD, Generic Software, Geodyssey, Heidi, HOOPS, Hyperwire, Inside Track, Kinetix, MaterialSpec, Mechanical Desktop, Multimedia Explorer, NAAUG, ObjectARX, Office Series, Opus, PeopleTracker, Physique, Planix, Powered with Autodesk Technology, Powered with Autodesk Technology (logo), RadioRay, Rastation, Softdesk, Softdesk (logo), Solution 3000, Tech Talk, Texture Universe, The AEC Authority, The Auto Architect, TinkerTech, VISION*, WHIP!, WHIP! (logo), Woodbourne, WorkCenter, and World-Creating Toolkit.

The following are trademarks of Autodesk, Inc., in the USA and/or other countries: 3D on the PC, 3ds max, ACAD, Advanced User Interface, AEC Office, AME Link, Animation Partner, Animation Player, Animation Pro Player, A Studio in Every Computer, ATLAST, Auto- Architect, AutoCAD Architectural Desktop, AutoCAD Architectural Desktop Learning Assistance, AutoCAD Learning Assistance, AutoCAD LT Learning Assistance, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk Animator Clips, Autodesk Animator Theatre, Autodesk Device Interface, Autodesk Inventor, Autodesk PhotoEDIT, Autodesk Point A (logo), Autodesk Software Developer's Kit, Autodesk View DwgX, AutoFlix, AutoPAD, AutoSnap, AutoTrack, Built with ObjectARX (logo), ClearScale, Colour Warper, Combustion, Concept Studio, Content Explorer, cornerStone Toolkit, Dancing Baby (image), Design 2000 (logo), DesignCenter, Design Doctor, Designer's Toolkit, DesignProf, DesignServer, Design Your World, Design Your World (logo), Discreet, DWG Linking, DWG Unplugged, DXF, Extending the Design Team, FLI, FLIC, GDX Driver, Generic 3D, Heads-up Design, Home Series, i-drop, Jobnet, Kinetix (logo), Lightscape, ObjectDBX, onscreen onair online, Ooga-Chaka, Photo Landscape, Photoscape, Plugs and Sockets, PolarSnap, Pro Landscape, QuickCAD, Real-Time Roto, Render Queue, SchoolBox, Simply Smarter Diagramming, SketchTools, Sparks, Suddenly Everything Clicks, Supportdesk, The Dancing Baby, Transform Ideas Into Reality, Visual LISP, Visual Syllabus, VIZable, Volo, Where Design Connects, and Whereware.

Third-Party Trademarks

All other brand names, product names, or trademarks belong to their respective holders.

Third-Party Software Program Credits

ACIS®Copyrighted © 2000, SPATIAL TECHNOLOGY INC. © 2000 Microsoft Corporation. All rights reserved. License management portions of the product Copyrighted © 2000 C-Dilla Ltd. All rights reserved. Portions Copyrighted © 2000 Intel Corporation Portions Copyrighted © 2000 Blur Studio, Inc. Portions Copyrighted © 1989-2000 mental images GmbH & Co. KG Berlin, Germany Portions developed by Digimation, Inc. for the exclusive use of Autodesk, Inc. Portions developed by Lyric Media, Inc. for the exclusive use of Autodesk, Inc. Portions of this software are based on the copyrighted work of the Independent JPEG Group. Wise for Installation System for Windows Installer © 2000 Wise Solutions, Inc. All rights reserved. AnswerWorks®Copyright © 1997-2000 WexTech Systems, Inc. Portions of this software © Lernout & Hauspie, Inc. All rights reserved.

GOVERNMENT USE

Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in FAR 12.212 (Commercial Computer Software-Restricted Rights) and DFAR 227.7202 (Rights in Technical Data and Computer Software), as applicable.

Contents

Introduction

xxxi

3ds max 4 MAXScript Online Reference

xxxi

MAXScript Overview

xxxii

Using the MAXScript Documentation

xxxiii

The MAXScript Utility Panel

xxxiv

The MAXScript Listener Window

xxxvi

Using the MAXScript Listener

xxxvii

Listener Commands

xxxviii

Using the ‘?’ Symbol

xli

Turning On the Listener Log

xli

Controlling the Listener Contents and the Insertion Point

xlii

The MAXScript Editor Windows

xliv

MAXScript Editor Commands

xlvi

Running Scripts

xlix

Accessing Scripted Utilities

l

The Macro Recorder

l

General MAXScript Topics

lii

Error Messages

liii

Aborting Execution with the ESC Key

lv

MAXScript Desktop State

lvi

Startup Scripts

lvi

Running Scripts from the Command Line

lvii

Source Code Layout and Continuation Lines

lvii

Including Scripts Within Scripts

lix

Encrypting Script Files

lx

Syntax Definitions in This Document

lx

Objects and Classes in Object-Oriented Programming

lxii

Inheritance and Polymorphism

lxiii

Properties, Methods, Operators, and Literals

lxiv

Programming lxii Inheritance and Polymorphism lxii i Properties, Methods, Operators, and Literals lxiv

iv

Contents

Chapter 1

What’s New in 3ds max 4 MAXScript

1

Whats New in 3ds max 4 MAXScript

1

version 4 MAXScript New Features

9

Action Manager

9

ActiveX Controls in MAXScript Rollouts

10

Asset Browser

22

Asset Browser enhancements

22

Bones

23

Access to the node bone properties and methods

23

Bone Creation

25

Cache Modifiers

26

Point Cache Modifier

26

CallBack Notification Codes

27

Notify Callbacks for Animate button on and off Transitions

27

RenderEffects Progress Callback Mechanism

28

General Event Callback Mechanism

29

Color Manager

35

Combustion

38

Constraints

39

Path Constraint

39

LookAt Constraint

40

Orientation Constraint Controller

40

Position Constraint

41

Link Controller for Constraints

42

Controller Functions for use with Constraint Assignments

42

Context Filters

43

Custom Attributes

45

Scripted Custom Attributes

45

Depth of Field

54

Edit Mesh

54

ApplyOperation function

54

Editable Patch

55

Patches

55

Filters

59

class id filter

59

Selection Filter

61

i-drop - drag and drop

62

Interfaces

67

Core Interfaces

70

Other Interfaces

71

Inverse Kinematics

73

HD IK controller chains can be assigned to existing hierarchies

73

IKLimb Solver

74

Materials

75

Multi/Sub Material

75

Menu Manager

75

Contents

v

Mesher

Affect Region Function

82

Network Render Interface

82

Node Handles

83

Node vertexColorType

83

OLE Automation

84

MAXScript.reg - Registery file

84

Parameter Wiring

85

Plug-In Manager

86

Portable Licence Manager

87

maxOps

87

Quad Menu

90

Reactors

91

Reactor controller

91

Render Element Manager

92

Scripted Plug-Ins

93

type:#integer parameters in scripted plug-in parameter blocks

93

Scripted Plug-in Events

93

Scripted Cameras

94

Scripted Controllers

95

dependsOn For Scripted Controllers

95

Matrix3 Scripted Controller

96

Scripted Manipulators

97

Scripted Objects

106

on detachedFromNode For Object Scripted Plug-ins

106

Scripted RenderEffects

107

RenderEffects Progress Callback Mechanism

107

Scripted Rollouts

108

Multi-line editText UI items in Scripted Rollouts

108

Skin

109

Joint Angle Morph

109

Spring Controller

109

SubObject Mode

112

System Tools

112

Trackbar Interface

113

Trackviews

114

Visual MAXScript

117

Xref Objects

120

Zip-file Script Packages

122

version 4 MAXScript Language Improvements

127

Additional Keyword Parameter On pickObject() forceListenerFocus:

127

127

Aproposand ShowPropertiesand now Helpand Show

128

BinStream for Binary Reading and Writing

128

By Reference Parameter Passing

129

C++-style bracketing comments

131

Coercion of bitArray to array and integer arrays to bitArrays

132

Command line -U MAXScript startup scripts

133

vi

Contents

Detecting Deleted Nodes

133

Dereferencing Operator

133

forceUpdate Function added to UVWUnwrap

134

hasProperty() function

135

Improved the Performance of Iterating and Indexing the selectionand $Object Sets

135

Readable/Writable Checks

135

isValidNode

136

RubberBanding in pickObject() Function

136

SetDir

136

Shortcut system replaced

137

startObjectCreation()

138

Subanim Indexing Operator, [], on MAX Objects Now Takes Subanim Names

139

superclasses read-only global variable

139

Symbolic Pathnames

140

System Information

141

The Super Class ID and the Class ID

141

validModifier() function

142

Visible Class For &Reference Values

142

Controllers

143

List Controller

143

mapKeys() method

144

moveKeys function

145

Geometry, Modifiers, Space Warps

146

Hose - superclass: GeometryClass

146

Drag - superclass: SpacewarpObject

149

MultiRes - superclass: modifier

153

Vortex - superclass: SpacewarpObject

156

Keys

158

Object Inspector Functions

159

Class and Object Inspector Functions Enhanced

159

Renderer

160

render() Function Re-entrant

160

SuperClasses

161

Bitmap Manager Function Published BMM control

161

Utilities, Global Utilities and Render Element plug-ins

161

Renderer

162

2 New Scripted Plug-in Superclasses on apply handlers for scripted RenderEffects

162

Globals and Locals

162

Definition Constructs Can Include Global Variable Declarations At Top Level

162

Changes to Undeclared Implicit Global Variables

163

Material Editor, Material and Textures

163

Accessing The Material Editor Active Slot

163

BitmapTex Reload and viewImage

164

BMP, PNG, JPEG and TGA I/O Interfaces

164

Material Editor Access

165

Material Level Show-in-viewport State

166

showTextureMap() function

167

Contents

vii

User Interface

168

Angle UI element

168

CreateDialog

169

Curve Control

170

getTextExtent

175

isActive

176

keyboard.escPressed

176

macroScript Localization Support for CUI and menu files

176

MAX Open & Save Dialogs

177

Menu and CUI Loading

178

mtlBrowser

180

SetBackground Method

180

mouseTrack() Function

180

snapMode

182

Spinner UI Item setKeyBrackets

182

Timer UI element

183

TimeSlider on/off toggle

183

Undo/Redo Dropdown Labels

184

Zoom to Bounds

184

Command Panels and Rollout Pages

185

Customize The Order of Rollup Pages

185

MAXScript Dialogs and Rollout Floaters as Extended viewports

186

Rollout .Controls Property

187

Rollout Systems categoryMechanism

188

version 4 All Const and MAXScript Functions

188

Definitions for MAXScript internal organization

188

MAXScriptFunction List

190

Const Class

191

Const Generic

195

Const MappedGeneric

207

Const NodeGeneric

209

Const Primitives

213

Const StructDef

231

Const StructDef Pages

232

AttachCtrl const StructDef

232

autoBackup const StructDef

232

bit const StructDef

233

boolObj const StructDef

233

callbacks const StructDef

233

cui const StructDef

234

custAttributes const StructDef

234

DOF const StructDef

234

fileProperties const StructDef

235

flexOps const StructDef

235

gw const StructDef

235

ik const StructDef

237

keyboard const StructDef

237

viii

Contents

LE const StructDef

237

LinkCtrl const StructDef

238

ListCtrl const StructDef

238

ListCtrl const StructDef

238

logsystem const StructDef

239

macros const StructDef

239

mapPaths const StructDef

239

meshop const StructDef

239

meshOps const StructDef

243

modPanel const StructDef

244

mouse const StructDef

244

mtlBrowser const StructDef

244

options const StructDef

245

patch const StructDef

245

patchOps const StructDef

247

persistents const StructDef

247

polyop const StructDef

248

polyOps const StructDef

251

preferences const StructDef

252

refs const StructDef

252

scanlineRender const StructDef

252

schematicView const StructDef

252

skinOps const StructDef

253

snapMode const StructDef

254

splineOps const StructDef

255

sysInfo const StructDef

255

systemTools const StructDef

256

terrainOps const StructDef

256

timeConfiguration const StructDef

256

toolMode const StructDef

257

trackbar const StructDef

257

trackView const StructDef

257

units const StructDef

258

viewport const StructDef

258

WAVsound const StructDef

258

xrefPaths const StructDef

259

xrefs const Structdef

259

version 4 New Classes

259

New Classes in version 4

259

New Classes in version 4 Pages

262

Additive_Euler_XYZ - superclass: RotationController

262

Alpha - superclass: MAXObject

262

alphaRenderElement - superclass: MAXObject

263

Atmosphere - superclass: MAXObject

264

atmosphereRenderElement - superclass: MAXObject

265

AutomaticAdaptiveExposureControl - superclass: MAXObject

267

Automatic_Exposure_Control - superclass: MAXObject

268

Contents

ix

BackgroundRenderElement - superclass: MAXObject

269

bgndRenderElement - superclass: MAXObject

270

BlendRenderElement - superclass: MAXObject

271

clrShadowRenderElement - superclass: MAXObject

272

Colored_Shadow - superclass: MAXObject

273

Combustion.coordinates - superclass: MAXObject

274

Cone_Angle - superclass: helper

276

ConeAngleManip - superclass: helper

277

ConvertToPatch - superclass: modifier

278

DeletePatch - superclass: modifier

279

Diffuse - superclass: MAXObject

279

diffuseRenderElement - superclass: MAXObject

280

Drag - superclass: SpacewarpObject

281

emissionRenderElement - superclass: MAXObject

285

FloatList - superclass: FloatController

286

FloatReactor - superclass: FloatController

287

Hose - superclass: GeometryClass

287

HSDS_Modifier - superclass: modifier

290

HSDSObject - superclass: modifier

292

imageMotionBlur - superclass: renderEffect

294

Link - superclass: Matrix3Controller

294

Link.link_params - superclass: MAXObject

295

Link_Constraint - superclass: Matrix3Controller

295

Link Constraint.link params - superclass: MAXObject

296

LinkedXForm - superclass: modifier

297

LookAt_Constraint - superclass: RotationController

297

Mesher - superclass: GeometryClass

298

meshsmooth - superclass: modifier

298

Motion_Blur - superclass: renderEffect

302

MultiRes - superclass: modifier

302

Normalize_Spl - superclass: modifier

305

Orientation_Constraint - superclass: RotationController

306

particleMesher - superclass: GeometryClass

306

Patch_Select - superclass: modifier

307

Path_Constraint - superclass: PositionController

307

PDynaflector - superclass: SpacewarpObject

309

Plane_Angle - superclass: helper

310

PlaneAngleManip - superclass: helper

311

Point3List - superclass: Point3Controller

312

Point3Reactor - superclass: Point3Controller

312

Point3Spring - superclass: Point3Controller

313

Point_Cache - superclass: modifier

314

Point_CacheSpacewarpModifier - superclass: SpacewarpModifier

315

PointCache - superclass: modifier

316

PointCacheWSM - superclass: SpacewarpModifier

317

PointHelperObj - superclass: helper

318

Poly_Select - superclass: modifier

319

x

Contents

Position_Constraint - superclass: PositionController

320

PositionList - superclass: PositionController

321

PositionReactor - superclass: PositionController

321

PositionSpring - superclass: PositionController

321

PSpawnflector - superclass: SpacewarpObject

322

Reflection - superclass: MAXObject

323

reflectionRenderElement - superclass: MAXObject

324

Refraction - superclass: MAXObject

326

refractionRenderElement - superclass: MAXObject

327

RingWave - superclass: GeometryClass

328

RotationList - superclass: RotationController

328

RotationReactor - superclass: RotationController

328

ScaleList - superclass: ScaleController

328

ScaleReactor - superclass: ScaleController

329

SDynaflector - superclass: SpacewarpObject

329

section - superclass: shape

330

Self_Illumination - superclass: MAXObject

331

ShadowRenderElement - superclass: MAXObject

332

sliderManipulator - superclass: helper

333

Specular - superclass: MAXObject

334

specularRenderElement - superclass: MAXObject

335

SpringPoint3Controller - superclass: Point3Controller

336

SpringPositionController - superclass: PositionController

337

SSpawnflector - superclass: SpacewarpObject

338

transform_script - superclass: Matrix3Controller

339

Turn_to_Mesh - superclass: modifier

340

Turn_to_Patch - superclass: modifier

342

Turn_to_Poly - superclass: modifier

343

UDynaDeflector - superclass: SpacewarpObject

345

USpawnDeflector - superclass: SpacewarpObject

346

UVWUnwrap - superclass: modifier

347

Vortex - superclass: SpacewarpObject

347

Z_Depth - superclass: MAXObject

350

ZRenderElement - superclass: MAXObject

351

version 4 MAXScript Interfaces

352

Core Interfaces

352

Core Interface Pages

353

Interface: actionMan

353

Interface: BoneSys

354

Interface: browserMgr

355

Interface: cmdPanel

356

Interface: colorMan

356

Interface: dragAndDrop

362

Interface: HDIKSys

365

Interface: IKSys

365

Interface: manip

366

Interface: maxOps

368

Contents

xi

Interface: medit

371

Interface: menuMan

372

Interface: msZip

378

Interface: NetRender

379

Working with the manager

379

Working with jobs

384

Working with servers

398

Working with groups

401

Netstatus

402

Examples:

404

Interface: NullInterface

409

Interface: objXRefs

409

Interface: paramWire

410

Interface: pluginManager

414

Interface: quadMenuSettings

414

Interface: rollup

427

Interface: SceneExposureControl

427

Interface: SceneRadiosity

428

Interface: timeSlider

428

Interface: trackviews

429

Other Interfaces

432

Other Interface Pages

434

bitmapTex interfaces:

434

Block_Control interfaces:

435

BMP interfaces:

437

Flex interfaces:

438

float_list interfaces:

441

Float Reactor interfaces:

443

Float_Wire interfaces:

448

FloatList interfaces:

450

FloatReactor interfaces:

452

HSDS_Modifier interfaces:

453

HSDSObject interfaces:

453

IKChainControl interfaces:

453

imageMotionBlur interfaces:

454

JPEG interfaces:

454

Link interfaces:

455

Link_Constraint interfaces:

455

LookAt_Constraint interfaces:

455

Motion_Blur interfaces:

462

Orientation_Constraint interfaces:

462

path interfaces:

462

Path_Constraint interfaces:

468

Plugin_Manager interfaces:

473

Portable_Network_Graphics interfaces:

473

point3_list interfaces:

475

xii

Contents

Point3_Wire interfaces:

477

Point3List interfaces:

479

Point3Reactor interfaces:

481

Point3Spring interfaces:

482

Point_Cache interfaces:

484

Point_CacheSpacewarpModifier interfaces:

485

PointCache interfaces:

486

PointCacheWSM interfaces:

487

Position_Constraint interfaces:

488

position_list interfaces:

490

Position_Reactor interfaces:

492

Position_Wire interfaces:

492

PositionList interfaces:

494

PositionReactor interfaces:

496

PositionSpring interfaces:

497

radiusManip interfaces:

500

RenderElementMgr interfaces:

503

rotation_list interfaces:

505

Rotation_Reactor interfaces:

507

Rotation_Wire interfaces:

508

RotationList interfaces:

510

RotationReactor interfaces:

512

scale_list interfaces:

513

Scale_Reactor interfaces:

515

Scale_Wire interfaces:

515

ScaleList interfaces:

517

ScaleReactor interfaces:

519

sliderManipulator interfaces:

520

SpringPoint3Controller interfaces:

523

SpringPositionController interfaces:

526

Targa interfaces:

529

Unwrap_UVW interfaces:

530

uvwMappingHeightManip interfaces:

551

uvwMappingLengthManip interfaces:

555

uvwMappingUTileManip interfaces:

558

uvwMappingVTileManip interfaces:

562

uvwMappingWidthManip interfaces:

565

UVWUnwrap interfaces:

568

Float_Wire interfaces:

569

Point3_Wire interfaces:

570

Rotation_Wire interfaces:

572

Scale_Wire interfaces:

574

Contents

xiii

Chapter 2

Learning MAXScript

577

Accessing MAXScript

579

Source Code Layout

580

Entering Information into MAXScript

582

Assigning Variables

585

Mathematical Operations in MAXScript

588

Drawing a Box with MAXScript

591

Modifying the Box

593

Applying Standard Transformations

598

More Box Transformations

603

Controlling Program Flow in Scripts

607

Defining Custom Functions

614

Structure Definitions

618

3ds max Commands in MAXScript

620

Saving your Commands in a Script File

621

Loading and Running your Script File

621

Loading Other Scripts

623

Learning MAXScript by Walking Through a Script

623

Learning MAXScript with the Macro Recorder

624

The Scripts Included with 3ds max

624

Chapter 3

Reserved Keywords, Symbols, Punctuation and Variables

625

Language Reserved Keywords

625

Punctuation and Symbols

627

Reserved Global Variables

628

Predefined Globals

629

3ds max System Globals

630

MAXScript System Globals

640

Chapter 4

Variables - Assignment and Scope

643

Variable Assignment

643

Scope of Variables

646

Persistent Global Variables

651

Type-Free Variables

653

Reference Assignment

653

Memory Allocation and Garbage Collection

655

Manual Garbage Collection

656

Chapter 5

Names, Literal Constants, and Expressions

657

Names

657

Literal Constants

659

Number Literals

660

String Literals

660

Time Literals

662

Pathname Literals

662

Spaces and Other Special Characters in Pathnames

665

2D and 3D Point Literals

665

Array Literals

666

Expressions

667

xiv

Contents

Simple Expressions

669

Operands

669

Math Expressions

670

Math Assignment

671

Precedence and Association Rules

672

Polymorphism

672

Comparison Expressions

673

Logical Expressions

674

Short-Circuiting Logical Expressions

675

Function Calls

675

Positional and Keyword Arguments

676

Function Precedence

677

Code Layout

678

Special Notes About Function Calls

678

Block-Expressions

679

Context Expressions

681

animate

683

at level, in

684

at time

685

coordsys

685

about

686

undo

687

Cascading Contexts

688

Nested Contexts

688

Sticky Contexts

689

Chapter 6

Controlling Program Flow

691

If Expression

692

Case Expression

693

While and Do Loops

694

For Loop

694

Skipping Loop Iterations

696

Loop Exit

697

Try Expression

697

Chapter 7

Creating Functions

699

Function Variables

701

Function Parameters

702

The Return Expression

705

Chapter 8

Structure Definition

707

Defining Local Functions in Structures

709

Structure Inherited Methods

711

Chapter 9

Values

713

Value Common Properties, Operators, and Methods

714

Working with Values

716

Basic Data Values

717

Number Values

717

String Values

722

Contents

xv

Name Values

727

BooleanClass Values

728

Color Values

729

Point3 Values

731

Point2 Values

736

Ray Values

737

Quat Values

738

AngleAxis Values

741

EulerAngles Values

742

Matrix3 Values

744

BigMatrix Values, BigMatrixRowArray Values

748

Box2 Values

750

Time Data Values

751

Time Values

751

Interval Values

752

Special Data Values

753

Undefined Value

753

Ok Value

754

Unsupplied Value

754

DontCollect Value

754

Bitmap Values

755

Stream Values

763

FileStream Values

763

StringStream Values

766

WindowStream Values

767

MAXKey Values

767

MAXKey Common Properties, Operators, and Methods

768

Working with MAXKey Values

769

ArrayParameter Values

770

Chapter 10

Collections

773

Collection Types

775

Array Values

776

PathName Values

780

ObjectSet Values

781

SelectionSetArray Values

783

SelectionSet Values

785

NodeChildrenArray Values

785

VertexSelection Values

786

FaceSelection Values

788

EdgeSelection Values

790

BitArray Values

791

MAXKeyArray Values

793

MAXNoteKeyArray Values

794

ModifierArray Values

794

MaterialLibrary Values

795

NURBSSet Values

797

xvi

Contents

Chapter 11

3ds max Objects

799

Identifying and Accessing MAXScript Classes and Properties

799

Class and Object Inspector Functions

799

Dynamic Properties

805

Indexed Access to Animatable Properties in 3ds max Objects

806

Third-Party Plug-In Classes

808

MAXWrapper : Value

808

MAXWrapper Common Properties, Operators, and Methods

809

Access to MAXWrapper AppData

813

Nested Object Controller Functions

814

Nested Object Properties

815

Note Track Access

816

Notetrack Values

816

MAXNoteKeyArray Values

817

MAXNoteKey Values

818

Working with Note Tracks

818

Node : MAXWrapper

820

Node Common Properties, Operators, and Methods

820

General Node Properties

836

Node Transform Properties

841

Using Node Transform Properties

843

Node User-Defined Properties and Methods

848

Node Subclasses

849

GeometryClass : Node

850

GeometryClass Common Properties, Operators, and Methods

852

Geometry - Standard and Extended Objects

852

Box : GeometryClass

853

C_Ext : GeometryClass

854

Capsule : GeometryClass

855

ChamferBox : GeometryClass

856

ChamferCyl : GeometryClass

857

Cone : GeometryClass

858

Cylinder : GeometryClass

859

Gengon : GeometryClass

861

Geosphere : GeometryClass

862

Hedra : GeometryClass

863

L_Ext : GeometryClass

865

OilTank : GeometryClass

866

Plane : GeometryClass

867

Prism : GeometryClass

868

Pyramid : GeometryClass

869

RingWave : GeometryClass

870

Sphere : GeometryClass

872

Spindle : GeometryClass

873

TargetObject : GeometryClass

874

Teapot : GeometryClass

875

Contents

xvii

Torus : GeometryClass

875

Torus_Knot: GeometryClass

877

Tube : GeometryClass

878

Geometry - Dynamics Objects

879

Damper : GeometryClass

880

Spring : GeometryClass

883

Geometry - Compound Objects

886

OldBoolean : GeometryClass

887

Boolean2 : GeometryClass

887

Conform : GeometryClass

889

Connect : GeometryClass

889

Loft : GeometryClass

890

Morph : GeometryClass

891

Scatter : GeometryClass

891

ShapeMerge : GeometryClass

893

Terrain : GeometryClass

894

Geometry - Doors and Windows

896

Awning : GeometryClass

897

BiFold : GeometryClass

897

Casement : GeometryClass

898

Fixed : GeometryClass

899

Pivot : GeometryClass

899

Pivoted : GeometryClass

900

Projected : GeometryClass

901

SlidingDoor : GeometryClass

901

SlidingWindow : GeometryClass

902

Geometry - Patch Objects

903

QuadPatch : GeometryClass

903

TriPatch : GeometryClass

904

Geometry - Particle Systems

904

Particle System Common Properties, Operators, and Methods

905

Blizzard : GeometryClass

906

PArray : GeometryClass

913

PCloud : GeometryClass

923

Snow : GeometryClass

931

Spray : GeometryClass

933

SuperSpray : GeometryClass

935

Geometry - NURBS Objects

943

NURBSSurf : GeometryClass

943

Point_Surf : GeometryClass

943

Shape : Node

944

Shape Common Properties, Operators, and Methods

945

Shapes - Splines

947

Spline Shape Common Properties, Operators, and Methods

947

Arc : Shape

949

Circle : Shape

950

Donut : Shape

951

xviii

Contents

Ellipse : Shape

953

Helix : Shape

954

Line : Shape

955

NGon : Shape

957

Rectangle : Shape

958

Section : Shape

959

Star : Shape

960

Text : Shape

962

Shapes - NURBS Curves

964

CV_Curve : Shape

964

Point_Curve : Shape

965

Light : Node

966

Light Common Properties, Operators, and Methods

966

DirectionalLight : Light

970

FreeSpot : Light

971

OmniLight : Light

972

TargetDirectionalLight : Light

972

TargetSpot : Light

973

Camera : Node

974

Camera Common Properties, Operators, and Methods

974

FreeCamera : Camera

976

TargetCamera : Camera

976

Helper : Node

977

Helper - Standard

978

Bone : Helper

978

Compass : Helper

979

Dummy : Helper

979

Grid : Helper

980

Point : Helper

980

Protractor : Helper

981

Tape : Helper

981

Helper - Atmospheric

982

BoxGizmo : Helper

982

CylGizmo : Helper

983

SphereGizmo : Helper

983

Helper - Camera Match

984

CamPoint : Helper

984

Helper - VRML 1.0/VRBL

984

Inline : Helper

984

LOD : Helper

985

VRML_VRBL : Helper

985

Helper - VRML97

985

Anchor : Helper

986

AudioClip : Helper

986

Background : Helper

987

Billboard : Helper

987

FogHelper : Helper

987

Contents

xix

InlineHelper : Helper

988

LODHelper : Helper

988

NavInfo : Helper

988

ProxSensor : Helper

989

Sound : Helper

989

TimeSensor : Helper

990

TouchSensor : Helper

990

System : Node

991

Bones : System

991

Sunlight : System

991

RingArray : System

992

SpacewarpObject : Node

992

Spacewarp - Geometric/Deformable

993

Bomb : SpacewarpObject

993

ConformSpaceWarp : SpacewarpObject

995

SpaceDisplace : SpacewarpObject

996

SpaceFFDBox : SpacewarpObject

998

SpaceFFDCyl : SpacewarpObject

999

SpaceRipple : SpacewarpObject

1001

SpaceWave : SpacewarpObject

1002

Spacewarp - Particles and Dynamics

1003

Gravity : SpacewarpObject

1003

Motor : SpacewarpObject

1004

PBomb : SpacewarpObject

1006

PushSpaceWarp : SpacewarpObject

1008

Wind : SpacewarpObject

1010

Spacewarp - Modifier-Based

1011

SpaceBend : SpacewarpObject

1011

SpaceNoise : SpacewarpObject

1012

SpaceSkew : SpacewarpObject

1014

SpaceStretch : SpacewarpObject

1015

SpaceTaper : SpacewarpObject

1016

SpaceTwist : SpacewarpObject

1017

Spacewarp - Dynamics Interface

1018

PDynaFlect : SpacewarpObject

1019

SDynaFlect : SpacewarpObject

1020

UDynaFlect : SpacewarpObject

1022

Spacewarp - Particles Only

1024

Deflector : SpacewarpObject

1024

Path_Follow : SpacewarpObject

1025

POmniFlect : SpacewarpObject

1027

SDeflector : SpacewarpObject

1030

SOmniFlect : SpacewarpObject

1031

UDeflector : SpacewarpObject

1033

UOmniFlect : SpacewarpObject

1034

XRef Objects and Scenes

1037

XRefObject : Node

1037

xx

Contents

XRefScene Values

1038

Editable Meshes, Splines, and Patches

1041

Editable_Mesh : GeometryClass and TriMesh : Value

1041

Working with Editable Meshes

1077

SplineShape : Shape

1079

Patch : GeometryClass

1088

Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper

1095

Modifier Common Properties, Operators, and Methods

1096

Modifier Sub-Object Transform Properties

1099

Modifier and SpacewarpModifier Types

1100

Modifiers

1103

Affect_Region : Modifier

1103

Bend : Modifier

1104

Bevel : Modifier

1106

Bevel_Profile : Modifier

1108

CameraMap : Modifier

1109

Cap_Holes : Modifier

1110

CrossSection : Modifier

1110

DeleteMesh : Modifier

1111

DeleteSplineModifier : Modifier

1111

Disp_Approx : Modifier

1111

Displace : Modifier

1112

Edit_Mesh : Modifier

1114

Edit_Patch : Modifier

1115

Edit_Spline : Modifier

1115

Extrude : Modifier

1115

FFDBox : Modifier

1117

FFDCyl : Modifier

1119

FFD_2x2x2 : Modifier

1121

FFD_3x3x3 : Modifier

1123

FFD_4x4x4 : Modifier

1124

FFD_Select : Modifier

1126

Face_Extrude : Modifier

1127

Fillet_Chamfer : Modifier

1127

Flex : Modifier

1128

Lathe : Modifier

1133

Lattice : Modifier

1135

Linked_XForm : Modifier

1136

MaterialByElement : Modifier

1136

MaterialModifier : Modifier

1137

Melt : Modifier

1138

MeshSmooth : Modifier

1139

Mesh_Select : Modifier

1142

Mirror : Modifier

1143

Morpher : Modifier

1144

NCurve_Sel : Modifier

1145

NoiseModifier : Modifier

1145

Contents

xxi

Normalize_Spline : Modifier

1146

NormalModifier : Modifier

1147

NSurf_Sel : Modifier

1147

Optimize : Modifier

1148

PatchDeform : Modifier

1150

PathDeform : Modifier

1151

Preserve : Modifier

1152

Push : Modifier

1153

Relax : Modifier

1154

Ripple : Modifier

1154

Skew : Modifier

1155

Skin : Modifier

1157

SliceModifier : Modifier

1165

Smooth : Modifier

1166

Spherify : Modifier

1167

SplineSelect : Modifier

1167

Squeeze : Modifier

1167

STL_Check : Modifier

1169

Stretch : Modifier

1170

Surface : Modifier

1171

SurfDeform : Modifier

1171

Taper : Modifier

1173

Tessellate : Modifier

1174

Trim_Extend : Modifier

1175

Twist : Modifier

1175

Unwrap_UVW : Modifier

1176

UVW_Xform : Modifier

1187

UVWmap : Modifier

1188

Vertex_Colors : Modifier

1191

VertexPaint : Modifier

1191

VolumeSelect : Modifier

1192

Wave : Modifier

1194

XForm : Modifier

1195

Spacewarp Binding SpacewarpModifiers

1196

Other SpacewarpModifiers

1198

Displace_Mesh : SpacewarpModifier

1198

Displace_NURBS : SpacewarpModifier

1198

MapScaler : SpacewarpModifier

1198

SpaceCameraMap : SpacewarpModifier

1199

SpacePatchDeform : SpacewarpModifier

1199

SpacePathDeform : SpacewarpModifier

1200

SpaceSurfDeform : SpacewarpModifier

1201

Surface_Mapper : SpacewarpModifier

1202

Material : MAXWrapper

1203

Material Common Properties, Operators, and Methods

1203

Material Types

1204

Blend : Material

1205

xxii

Contents

CompositeMaterial : Material

1206

DoubleSided : Material

1207

MatteShadow : Material

1208

MorpherMaterial : Material

1209

MultiMaterial : Material

1210

NoMaterial : Material

1212

RayTraceMaterial : Material

1212

StandardMaterial : Material

1224

Shellac : Material

1233

TopBottom : Material

1233

TextureMap : Material

1234

TextureMap Common Properties, Operators, and Methods

1235

TextureMap Shared Classes

1236

UVGenClass : Material

1237

StandardXYZGen : Material

1238

TexOutputClass : Material

1239

TextureMap Types

1240

Adobe_Photoshop_Plug_In_Filter : TextureMap

1241

Adobe_Premiere_Video_Filter : TextureMap

1242

BitmapTexture : TextureMap

1243

Bricks : TextureMap

1245

Cellular : TextureMap

1247

Checker : TextureMap

1249

CompositeTextureMap : TextureMap

1250

Dent : TextureMap

1251

Falloff : TextureMap

1252

FalloffTextureMap : TextureMap

1255

FlatMirror : TextureMap

1255

Gradient : TextureMap

1257

Gradient_Ramp : TextureMap

1259

Marble : TextureMap

1261

Mask : TextureMap

1262

Mix : TextureMap

1262

Noise : TextureMap

1263

NoTexture : TextureMap

1265

Output : TextureMap

1265

Paint : TextureMap

1266

Particle_Age : TextureMap

1266

Particle_MBlur : TextureMap

1267

Perlin_Marble : TextureMap

1268

Planet : TextureMap

1269

Raytrace : TextureMap

1271

Reflect_Refract : TextureMap

1276

RGB_Multiply : TextureMap

1278

RGB_Tint : TextureMap

1278

Smoke : TextureMap

1279

Speckle : TextureMap

1280

Contents

xxiii

Splat : TextureMap

1281

Stucco : TextureMap

1282

Swirl : TextureMap

1283

Thin_Wall_Refraction : TextureMap

1284

Vertex_Color : TextureMap

1285

Water : TextureMap

1286

Wood : TextureMap

1287